Timothy Hitchens ) wrote:
Ok I think I understand what you are proposing. I just have one question about your example code.There is one last option ... register an output buffer as I suggested before suggested but this time do the reverse and you don't have to rewrite your scripts:
Where does the string "Maximum execution" come from? Is this output automatically by PHP when a script times out?
Would it be possible to use:
if (connection_status == 2) {}
Jc
<?phpob_start('scriptTimeout'); // set to 1 this should show the error below set to 2 and above you should get the normal output!! set_time_limit(1); function scriptTimeout($buffer) { if (eregi('Maximum execution', $buffer)) { $buffer = 'Server Overloaded!!'; } return $buffer; } // // content area // for ($i = 0; $i < 1000000; $i++) { $output = $i; } echo 'We are upto a final count of: '.$output; ?>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php