有人可以解释这个
PHP代码有什么问题吗? (
PHP版本5.3.5)
- <?PHP
- header('Bad Request',true,400);
- exit;
我得到状态500而不是400.在apache错误日志我得到
malformed header from script. Bad header=Bad Request: listener.PHP
我在这里做错了什么?我误解了the docs吗?
你必须写:
- header('HTTP/1.0 400 Bad Request',400);