回复内容:
比如执行a.php中的show()方法,我想在函数执行完后跳转到b.php去,JS中有window.location.href,php中应该用什么呢,忘记了
-
使用header函数
header("Location: https://post.zz173.com",true,301); //确保重定向后,后续代码不会被执行 exit; -
写入meta 标签
-
写入javascript标签
"; echo "window.location.href='https://post.zz173.com'"; echo "< /script>";
header方法就可以的。你试试
header("Location:b.php"); exit();