开发者

Make page act like 404

开发者 https://www.devze.com 2023-03-31 17:29 出处:网络
I want to make a page act like if it isn\'t exists and print out a 404 error message. This works perfectly but the page it self is showing under the whole website when the 404 page is visible.

I want to make a page act like if it isn't exists and print out a 404 error message. This works perfectly but the page it self is showing under the whole website when the 404 page is visible.

Code:

header('HTTP/1.1 404 Not Found', true, 404);
require_once('error.php');

Screenshot:

Make page act like 404

Does anyone here know how I can fix this problem? T开发者_如何学Chanks in advance.


header('HTTP/1.1 404 Not Found', true, 404);
require_once('error.php');
exit ();
0

精彩评论

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

关注公众号