在localhost上显示标头错误 [英] Show Header error on localhost

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

问题描述

当我将我的网站上传到服务器时,我遇到了这些错误。

When I uploaded my site to the server I got these errors.


警告:无法修改标头信息 - 已经发送的标头(输出开始于/ home / content / j / o / u / jou / html / biggydaddy / wp-login中的/home/content/j/o/u/jou/html/biggydaddy/wp-config.php:25)。第12行的php

Warning: Cannot modify header information - headers already sent by (output started at /home/content/j/o/u/jou/html/biggydaddy/wp-config.php:25) in /home/content/j/o/u/jou/html/biggydaddy/wp-login.php on line 12

我理解它们背后的原因,但在我的localhost中没有显示此警告。

I understand the reasons behind them, but in my localhost this warning not shown.

如何显示这些错误?

推荐答案

1)当您打印任何东西时会出现此错误在php hreader命令之前

1)This error comes when you print any thing before php hreader command

请检查任何 echo或print / print_r ..(或者可能是White Space)

2)
您需要同时设置 error_reporting <强> DISP lay_errors 。这些可以在php.ini中设置,在Apache中(如果你使用PHP作为Apache模块)或在运行时设置,但如果你在运行时设置它,那么它不会影响某些类型的错误,例如作为解析错误。

Please check for any echo or print / print_r .. (or may be White Space)
2) You need to set both error_reporting and display_errors. These can be set in php.ini, in Apache (if you're using PHP as an Apache module) or during run-time, though if you set it during run-time then it won't effect some types of errors, such as parse errors.

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

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