0
如果我在我的域名上輸入了「www.domain.com」,它可以正常工作,但是如果我像「domain.com」那樣執行操作,則不會顯示此消息:我的域名無效
警告:不能更改頭信息 - 頭已經發出在/home/eventtou/public_html/wp-includes/pluggable.php(輸出開始/home/eventtou/public_html/index.php:2)上線1228
這裏的index.php
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require(dirname(__FILE__) . '/wp-blog-header.php');
,這裏是線1197 - 我pluggable.php 1232
function wp_redirect($location, $status = 302) {
global $is_IIS;
/**
* Filter the redirect location.
*
* @since 2.1.0
*
* @param string $location The path to redirect to.
* @param int $status Status code to use.
*/
$location = apply_filters('wp_redirect', $location, $status);
/**
* Filter the redirect status code.
*
* @since 2.3.0
*
* @param int $status Status code to use.
* @param string $location The path to redirect to.
*/
$status = apply_filters('wp_redirect_status', $status, $location);
if (! $location)
return false;
$location = wp_sanitize_redirect($location);
if (!$is_IIS && PHP_SAPI != 'cgi-fcgi')
status_header($status); // This causes problems on IIS and some FastCGI setups
header("Location: $location", true, $status);
return true;
}
endif;
我該怎麼做才能解決這個問題?先謝謝你!
嘗試使用頁面頂部的ob_start()一次 – Deep
可能的重複[如何解決Headers已經發送PHP錯誤](http://stackoverflow.com/questions/8028957/how-to-fix- headers-already-sent-error-in-php) –
如果您的主機配置爲回答'domain.com'請求,請與您的ISP聯繫。這是一種子域,在您簽約主機服務時不會自動配置。如果主機歸您所有,我認爲這對於httpd.conf文件很重要。 – statosdotcom