【发布时间】:2019-02-04 07:02:20
【问题描述】:
与文档相矛盾的是,在接下来的循环中(我正在创建一个选择),当变量 $retval 达到 2048 个字符时,它被设置为 null。
foreach ($cache_ecmcategories as $category) {
$retval.= '<option value="'.$category['rowid'].'"';
if (($isfilter ? $category['label'] : $category['rowid']) == $defaulttx)
$retval.= ' selected="selected"';
$retval.= '>'.$category['label'].'</option>'; <== This line generate the problem
}
另外,把PHP版本从5.6.25改成7.0.10,问题依旧
这种奇怪行为的原因是什么?
【问题讨论】:
-
你的内存大小是多少?
-
你的 php error_log 说什么?我有一个超过 2048 的选项,它可以工作。
-
与 文档的哪一部分相矛盾?
-
我读到字符串可以达到 2GB。
标签: php string string-length