PHP header location - not displaying error?

≯℡__Kan透↙ 提交于 2019-12-08 06:02:11

问题


When I echo something before header("LOCATION: page.php"); - I expect to show an error but it didnt, it just redirect to that page. What gone wrong?

Example:

<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
echo "Hello";
header("LOCATION: page.php");
?>

In the php.ini

output_buffering = off
error_reporting =  E_ALL
display_errors = on

I am using Wamp, PHP 5.3.0


回答1:


var_dump(ini_get('output_buffering'));

and what about this one

var_dump(ob_get_status(1));

?



来源:https://stackoverflow.com/questions/8093719/php-header-location-not-displaying-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!