PHP session失灵 跳出 iframe

WBOY
Release: 2016-06-13 13:04:26
Original
912 people have browsed it

PHP session失效 跳出 iframe

??? 在安全退出的方法中:

session_destroy();
Copy after login

??? 只要这句就行了。

?

??? 然后要想跳出iframe 那么就要用js来实现。

?

 <script type="text/javascript">
	  function dap(){
      		if (top.location !== self.location) {   //self:在相同的框架或窗口中载入目标文档  top:把文档载入包含该超链接的窗口,取代任何当前正在窗口中显示的框架
				top.location = "/admin/index.html";//跳出框架,并回到首页
			}
	  }
 </script>
Copy after login

?

??? 后面调用这个js就行了。

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!