I am having weird problems with custom error handler, here it is:
function errHandler($errno, $errstr, $errfile, $errline)
{
if($errno)
{
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600');
exit;
}
return true;
}
everytime when running:
set_error_handler('errHandler');
The header is being sent despite lack of any error? Any ideas?
尝试对var_dump()
$errno, $errstr, $errfile, $errline
进行查看,看是否有任何提示。
Syntax is "503 Service Unavailable"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.