开始使用如下跳转:
echo "<script> alert('sucess');parent.location.href='/user/index'; </script>";
alert里面是提示的消息,href是提示后跳转的页面。
后来想起TP框架里面有个redirect()重定向的方法,就去看了看。
立即学习“PHP免费学习笔记(深入)”;
不过TP自带的不是弹出窗,于是修改为:
<span $url="http://www.jbxue.com";</span>
<span echo</span> "<script> alert('no loginid'); </script>"<span>; </span><em id="__mceDel"><span echo</span> "<meta http-equiv='Refresh' content='0;URL=<span $url</span>'>";</em>
两个直接跳转的方式:
<span header</span>("Location:".PSYS_BASE_URL."user/index"<span );
和
</span><span header</span>("refresh:{<span $time</span>};url={<span $url</span>}");
最后还有一个问题,跳转代码后都跟上一个 return,因为还会执行后面的语句。
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号