致命错误:在 codeigniter 中超过 30 秒的最大执行时间

问题描述 投票:0回答:3
Fatal error: Maximum execution time of 30 seconds exceeded in D:\wamp\www\moneymanager18_8_15\system\database\drivers\mysqli\mysqli_driver.php on line 221

这发生在上传过程中。文件正在上传,但同时显示此错误。

codeigniter fatal-error
3个回答
10
投票

把这个写在你的控制器上面。

ini_set('max_execution_time', 0); 
ini_set('memory_limit','2048M');

3
投票

有些东西 CodeIgniter 没有在他们的文档中包含这个。 转到

system/core/CodeIgniter.php
中的页面并搜索并根据您的要求进行更改

if (function_exists("set_time_limit") == TRUE AND @ini_get("safe_mode") == 0)
{
    @set_time_limit(300);// change according to your requirement
}

0
投票

为了解决此错误,您需要将执行时间设置为无限制或需要增加它。

需要打开根文件夹下的root index.php文件,设置执行时间。

ini_set('max_execution_time', 0); // 0 = Unlimited
© www.soinside.com 2019 - 2024. All rights reserved.