Home  >  Article  >  Backend Development  >  PHP pops up a prompt box and jumps to a new page (redirect)_PHP tutorial

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

WBOY
WBOYOriginal
2016-07-13 10:39:371269browse

Start using the following jump:
echo "3f1c4e4b6b16bbbd69b2ee476dc4f83a alert('sucess');parent.location.href='/user/index'; 2cacc6d41bbb37262a98f745aa00fbf0";

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>
<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>

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>}");

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...
Statement:
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