简体   繁体   中英

CodeIgniter php script is not running more than 2 minutes??

我的代码Igniter应用程序中有一个PHP脚本,它在服务器上运行并获取一些数据,但它运行的时间大约不超过2分钟。当我不使用代码点火器运行此脚本时,它的工作正常。这个?

thanks @air4x its works . by setting set_time_limit(300) in the system/core/CodeIgniter.php

if (function_exists("set_time_limit") == TRUE AND @ini_get("safe_mode") == 0)
{
    @set_time_limit(300);
}

after setting this code script running well..

Try adding this before you run your code: set_time_limit(0);

More info: http://php.net/manual/en/function.set-time-limit.php

If that doesn't work, you'll need to share what code you are running and what happens when it stops running.

There must be, Set_time_limit - Sets the maximum execution time of a script.

bool set_time_limit ( int $seconds )

When set_time_limit() called. It returns the counter to zero. In other words, if the default limit is 30 seconds, and after 25 seconds of script execution the set_time_limit(20) call is made, then the script will run for a total of 45 seconds before finishing .

Please visit http://php.net/manual/fr/function.set-time-limit.php for more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM