Maximum execution time of 30 seconds exceeded error solution.
A brief summary of the solution:
Error 1: The Memory exceeds the upper limit. If you forget the specific error statement, let's briefly describe the solution.
Batch import using a loop;
Sleep (5) is used at the beginning of each loop. The statement is executed in a delayed manner to prevent the server from occupying too much memory at the same time and modifying the number in it;
Use ob_flush () at the end of each loop; refresh the output buffer
Flush (); sends all output of the program so far to the user's browser
Both must be used to refresh the output buffer www.2cto.com.
Error 2: 30 seconds running timeout error (Maximum execution time of 30 seconds exceeded)
Solution:
Method 1: Modify the php. ini file
Max_execution_time = 30; Maximum execution time of each script, in seconds
Set it to the required value. If it is set to 0, it never expires.
Method 2: Modify the php Execution File
Add
<?
Set_time_limit (0 );
?>
Max_execution_time = 30; Maximum execution time of each script, in seconds
Set it to the required value. If it is set to 0, it never expires.
From the PHP website construction of shunzi Network