$fp = fsockopen("www.example.com", 8000, $errno, $errstr, 1); //last param is timeout in seconds
if (!$fp) {
header('Location: http://www.anothersite.com/some_message');
} else {
fclose($fp); // radio OK
}
代码无效,无法重定向。
答案 0 :(得分:0)
ob_start();
//something
ob_end_clean(); //erase output
header('Location: ');