[PHP] Maximumexecutiontimeof30secondsexceeded
# Preface when using 'php' to render page pages, if the processing time of the program is too long, it exceeds the configuration file (PHP. ini) when the timeout value is set, the following prompt is displayed:> Maximum execution time of 30 seconds exceeded for example: import a large amount of data into the database; Request resource time is too long ...... # What should I do if an error prompt occurs when the PHP program times out? # Method * directly modify the configuration file (php. ini) [timeout] "# The default maximum execution time is 30 s, which can be modified according to your needs # if it is 0, max_execution_time = 30; "* indirectly modify the configuration information [timeout] add the following code to the php execution File:" phpset_time_limit (0); "* refresh the output buffer [out-of-memory limit] 1. delayed execution in a loop: add the function 'sleep (time) '2. output Buffer: Use the 'OB _ flush () 'and 'flush ()' functions to send data to the browser "php
'; Ob_flush (); flush ();}"