header('HTTP/1.0 404 Not Found'); not doing anything

后端 未结 7 1936
孤街浪徒
孤街浪徒 2020-12-09 07:30

I have a 404.php file in my site\'s main directory and I was using header(\'Location: 404.php\'); for a while until someone said that you should use heade

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-09 07:52

    Another reason may be if you add any html tag before this redirect. Look carefully, you may left DOCTYPE or any html comment before this line.

提交回复
热议问题