我使用php脚本进行重定向后,搜索引擎搜索到我的websiter的搜索词。php脚本重定向代码问题
和我的重定向代码工作正常
但对一些物关键词我笏留在同一个页面。对于这些代码行,我在页面中收到一条警告消息。
Warning: headers already sent
(output started at /home/friendsj/public_html/index.php:2) in
/home/friendsj/public_html/index.php on line 20
下面
为i应用于的网页
$ref=$_SERVER['HTTP_REFERER'];
if(strstr($ref,"test")){
$url="http://www.howtomark.com/robgoyette.html";
}
else if(strstr($ref,"mu+word+gmail")){
$url="http://www.howtomark.com/marketbetter.html";
}
else{
if(strstr($ref,"how+to+market+better")){
}
}
if($url !=""){
header("Location:$url");
}
您可以使用 '0101010' 按钮格式化代码。否则,它不可读。 – 2010-04-29 09:53:08
同时在“?>”后检查文件末尾是否有空格 – 2010-04-29 10:21:58