For example, if I execute the show() method in a.php, I want to jump to b.php after the function is executed. There is window.location.href in JS. What should I use in php? I forgot
For example, if I execute the show() method in a.php, I want to jump to b.php after the function is executed. There is window.location.href in JS. What should I use in php? I forgot
Use header function
header("Location: https://post.zz173.com",true,301); //确保重定向后,后续代码不会被执行 exit;
Write meta tag
<meta http-equiv="refresh" content="1;url=https://post.zz173.com">
Write javascript tag
<php? echo "< script language='javascript' type='text/javascript'>"; echo "window.location.href='https://post.zz173.com'"; echo "< /script>";
header
That’s the method. Try it
<code>header("Location:b.php"); exit();</code>