问题
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