Php Apache 2.4.9,无法修改标头信息-标头已由

Php Apache 2.4.9,无法修改标头信息-标头已由,php,apache,Php,Apache,我有在Mavericks中运行的php代码,然后我将我的系统更新为Yosemite,Apache2.4.9(unix)安装在Yosemite中,现在当我运行代码时,我遇到以下错误: Warning: Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents/odnoklasniki/indexSingle.php:10) in /Librar

我有在Mavericks中运行的php代码,然后我将我的系统更新为Yosemite,Apache2.4.9(unix)安装在Yosemite中,现在当我运行代码时,我遇到以下错误:

Warning: Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents/odnoklasniki/indexSingle.php:10) in /Library/WebServer/Documents/odnoklasniki/indexSingle.php on line 125
在125行中,我有以下代码:

header('Location: http://www.odnoklassniki.ru/oauth/authorize?client_id='.$AUTH['application_key'].'&scope=PHOTO_CONTENT&response_type=code&redirect_uri=http://localhost/odnoklasniki/indexSingle.php');
在它在小牛队发挥作用之前

代码:



您可能在header()之前使用了echo或html代码

不要在header()之前使用/呈现任何echo或html代码,如果有任何东西,请全部删除并重试,这将起作用

output started at /Library/WebServer/Documents/odnoklasniki/indexSingle.php:10

查看这几行并删除echo/blankspaces/html等。

您可能在PHP header命令之前输出了一些内容,这就是导致错误的原因。您可以使用
die()函数,并从浏览器中调用该页,您可能会看到在header()命令之前发送的输出。

header()之前我有一些echo()的可能重复,我尝试将其删除,但再次无效
output started at /Library/WebServer/Documents/odnoklasniki/indexSingle.php:10