最大执行时间错误处理

时间:2010-07-01 08:23:38

标签: php error-handling

我有一个脚本有时会让Max执行时间达到错误。这是正常的,这不是问题。问题是在这种情况下我会写出具体的错误信息 我该怎么做?

2 个答案:

答案 0 :(得分:4)

function say_goodbye() {
   if (connection_aborted()) {
      //  Perform some action if user has aborted the transaction
   } elseif (connection_status() == CONNECTION_TIMEOUT) {
      //  perform some other action if the connection has timed out
   } else {
      //  any normal completion actions
   }
}

register_shutdown_function("say_goodbye")

您也可以将参数传递给关机功能

答案 1 :(得分:1)

相关问题