PHP 标头位置 - 不显示错误? [英] PHP header location - not displaying error?

查看:28
本文介绍了PHP 标头位置 - 不显示错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 header("LOCATION: page.php"); 之前 echo 某些东西时 - 我希望显示一个错误,但它没有,它只是重定向到该页面.出了什么问题?

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?

示例:

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

在php.ini

output_buffering = off
error_reporting =  E_ALL
display_errors = on

我使用的是 Wamp,PHP 5.3.0

I am using Wamp, PHP 5.3.0

推荐答案

var_dump(ini_get('output_buffering'));

还有这个呢

var_dump(ob_get_status(1));

?

这篇关于PHP 标头位置 - 不显示错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆