当我在下面运行此脚本时,我有这个错误
致命错误:允许的内存大小为134217728字节耗尽(试图分配36个字节)
我在其他相同的脚本之前运行但是对于其他表:
$row = array();
$infos = array();
$db=mysqli_connect($this->hostname_mysql, $this->username_mysql, $this->password_mysql,$this->database_mysql) or die(mysql_error());
mysqli_set_charset( $db, 'utf8');
mysqli_select_db($db,$this->database_mysql);
$sqlprocessdechets="select * from t_lig_dect_fs order by decht_id ASC";
$resultdechets=mysqli_query($db,$sqlprocessdechets) or die( mysql_error() . "<br>$sqlprocessdechets" );
while ($row=mysqli_fetch_array($resultdechets) )
{
$infos[]=$row;
} // while
return $infos;
我怎么能事先解决这个问题
答案 0 :(得分:0)
ini_set('memory_limit','-1');
在你的PHP脚本上面添加以上内容,保存数组值的内存取决于服务器设置的MAX容量。
所以你需要无限制地设置它。