Question

I have a php applicacion to repair. The boss's solution is to restart the server each time the app fails. He wants to run a script when the page spends 30 seconds or more loading. How can I run the script when the execution time is up to 30s? Thanks in advance.

Était-ce utile?

La solution

I believe you should be able to use register_shutdown_function

set_time_limit(1);

function test() {
    echo "Processing timeout";
}

register_shutdown_function('test');

while(1);
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top