function redirect($url = 'https://www.z6.net.cn/php/816.html'){
if (!headers_sent()) {
header("Location: {$url}");
exit();
}else{
$str = "<meta http-equiv='Refresh' content='0;URL={$url}'>";
exit($str);
}
}
未经允许不得转载:任鹏个人博客 » php常用方法之重定向

