PHP pops up a prompt box and jumps to a new page (redirect)_PHP tutorial

WBOY
Release: 2016-07-13 10:39:37
Original
1268 people have browsed it

Start using the following jump:
echo "<script> alert('sucess');parent.location.href='/user/index'; </script>";

Alert contains the prompt message, and href is the page to jump to after the prompt.

Later I remembered that there is a redirect() redirection method in the TP framework, so I went to take a look.

However, TP does not come with a pop-up window, so it was modified to:

<span $url="http://www.jbxue.com";</span>
Copy after login
<span echo</span> "<script> alert('no loginid'); </script>"<span>; </span>
Copy after login
<em id="__mceDel"><span echo</span> "<meta http-equiv='Refresh' content='0;URL=<span $url</span>'>";</em>
Copy after login

Two direct jump methods:

<span header</span>("Location:".PSYS_BASE_URL."user/index"<span ); 
和 
</span><span header</span>("refresh:{<span $time</span>};url={<span $url</span>}");
Copy after login

Finally, there is another problem. The jump code is always followed by a return, because the following statements will also be executed.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/729843.htmlTechArticleStart using the following jump: echo "script alert('sucess');parent.location.href='/ user/index'; /script"; The alert contains the prompt message, and the href is the page that jumps after the prompt. Then I remembered...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!