页面重定向的几种方法!
2018-06-04 本文已影响88人
DragonersLi
一、header跳转
$start = 0;
$end = 10;
$start = $start + $end;
sleep(1);#睡一秒
header("Location:http://".$_SERVER['SERVER_NAME']."/sync/member/{$start}/{$end}");
二、meta跳转
//自刷新
echo "<meta http-equiv="refresh" content="1"> ";
//定时跳转
echo "<meta http-equiv=\"refresh\" content=\"1;url={$url}\">";
三、JS跳转
// 直接跳转
echo "<script>window.location.href='/sync/file'</script>";
//定时跳转
echo "<script>setTimeout(\"javascript:location.href='/sync/file'\", 1000)</script>";