가능한 복제를 수정할 수 없습니다 :
Headers already sent by PHP헤더 정보를
나는 다음과 같은 코드에서 다음과 같은 오류를 얻고있다, 그리고 나는 이유를 완전히 확실하지 않다. 만약 당신이 그것을 고칠 방법을 말해 줄 수 있다면, 좋을 것입니다. 고맙습니다.
경고 : 헤더 정보를 수정할 수 없습니다 - 이미가 보낸 헤더 (출력에서 시작 ...) 라인에 에코 전화를 꺼내, 당신이하기 전에 브라우저에 정보를 보낼 수 없습니다 45
<?php
// Initialization
$conn = mysql_connect(DB_HOST,DB_USER,DB_PASSWORD);
mysql_select_db(DB_NAME, $conn);
// Error checking
if(!$conn) {
die('Could not connect ' . mysql_error());
}
// Localize the GET variables
$ref = isset($_GET['ref']) ? $_GET['ref'] : "";
// Protect against sql injections
// Insert the score
$retval = mysql_query("INSERT INTO $table(
site
) VALUES (
'$ref'
)",$conn);
if($retval) {
echo "Successfull";
} else {
echo "Unsuccessfull " . mysql_error();
}
mysql_close($conn);
?>
<?php
$url = $_GET['url'];
$loc = 'Location: '. $url;
header($loc);
exit;
?>
http://stackoverflow.com/search?q=Cannot%20modify%20header%20%20information 또는 http://www.google.com/search?q=cannot+ 수정 + 헤더 + 정보 – mario