Defining header response not working in hiawatha and php
I have a local server and a remote server. On the local server what I'm trying to do works, but the remote server which is hiawatha doesn't.
I'm trying to set a not found header and then respond with the login page. I'm using the following code to do that
if($e === "ErrorSessionExpired")
{
开发者_如何学JAVA header("HTTP/1.0 404 Not Found");
$output = $this->smarty->fetch("login.tpl");
echo $output;
exit();
}
As I said this works fine on the developing machine, which uses the embedded server of PhpED
Try:
header("Status: 404 Not Found");
精彩评论