开发者

Custom error handler strange behaviour - PHP

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 e开发者_JAVA百科rror? Any ideas?


Try to var_dump() $errno, $errstr, $errfile, $errline to see if that gives any hint.


Syntax is "503 Service Unavailable"

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜