php实现页面跳转

方法一:php 函数跳转,缺点:header 头之前不能有输出,跳转后的程序继续执行,可

用 exit 中断执行后面的程序。

header("Location: 网址"); //直接跳转
header("refresh:3;url=http://axgle.za.net"); //三秒后跳转

方法二:利用 meta

echo "<meta http-equiv=refresh content='0; url=网址'>";


Barley博客
  • 最新评论
  • 总共0条评论