In a simple example, 1500 statements are displayed on the webpage. If no expiration time is set, the execution of the program ends at 791. if set_time_limit (0) is set ); the program will not end until 1. Set_time_limit (0 );
The number in the brackets indicates the execution time. if the number is zero, the execution is permanently performed until the program ends. if the number is greater than zero, the program ends regardless of whether the program is executed successfully or not.
In a simple example, 1500 statements are displayed on the webpage. If no expiration time is set, the execution of the program ends at 791. if set_time_limit (0) is set ); the program will not end until 1.
0) {$ SQL = "insert into php (php) VALUES ('$ I')"; if ($ conn-> execute ($ SQL) === flase) {// echo "data insertion error ". $ conn-> errormsg ();} else {$ phpid = $ conn-> Insert_ID (); echo $ I. "saved to database, no :". $ phpid ;}$ I --; echo "" ;}?>
For more information about setting the execution time of a php set_time_limit (0) function, see PHP!