我的網站運行良好,直到我轉移到了HostGator的服務器,但切換後,我發現每一頁上的錯誤。
Cannot modify header information - headers already sent by (output started at /home/flip/public_html/index.php)
我打開了我的代碼,我讀了一些地方不<?php ?>
我的代碼開始這樣
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php
@session_start();
include_once("includes/connection.php");
$id=$_SESSION['user_id'];
if(!isset($_SESSION['user_id']))
{
header("location:index.php");
}
if (!isset($_GET["event"])) {
$caseVar = "share";
} else {
$caseVar = $_GET["event"];
}
?>
前豎起HTML和它運行在以前的服務器罰款但是當我切換到新的時候,它開始給每個頁面上的標題錯誤。但後來我把之後的doctype
和它開始像以前一樣工作。我真的很想知道爲什麼會發生這種情況。在<?php ?>
之前會寫入不可用的html,並且每次我從服務器切換到服務器時都必須更改我的代碼?
爲什麼反對票如果我不知道這就是爲什麼我要求幫助 – 2012-08-16 18:44:31