用這個代替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;
}