开发者

Defining header response not working in hiawatha and php

开发者 https://www.devze.com 2023-03-04 21:00 出处:网络
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 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");
0

精彩评论

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

关注公众号