用這個代替header
header 調用之前,不能輸出http 頭。如果在之前輸出,echo ,<html> ,session ,space都會出現錯誤。
下面的function 無此限制function redirectURL($url, $seconds = 0){
/*can replace the head() function
@para $url eg:$url='welcome.php?sid=$sid|3';
redirectURL($url); //3 s, redirect $url
*/
if(!is_int($seconds))
$seconds=0;
$mta = "<META HTTP-EQUIV=REFRESH CONTENT=\"".$seconds.
";URL=".$url."\">";
echo $mta;
exit;
}
header 調用之前,不能輸出http 頭。如果在之前輸出,echo ,<html> ,session ,space都會出現錯誤。
下面的function 無此限制function redirectURL($url, $seconds = 0){
/*can replace the head() function
@para $url eg:$url='welcome.php?sid=$sid|3';
redirectURL($url); //3 s, redirect $url
*/
if(!is_int($seconds))
$seconds=0;
$mta = "<META HTTP-EQUIV=REFRESH CONTENT=\"".$seconds.
";URL=".$url."\">";
echo $mta;
exit;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货