Home  >  Article  >  Backend Development  >  Solution to IE7 iframe session loss problem in php_PHP tutorial

Solution to IE7 iframe session loss problem in php_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:57:10899browse

This article will introduce the solution to the IE7 iframe session loss problem in PHP at home. Students who have encountered such problems can refer to it for reference

Assuming that the iframe method is used, you are likely to encounter such a problem. And this problem only exists in the IE7 browser. I have tested it in firefox, IE6 and chrome and there is no problem


Before running session_start, add the following sentence to the program (taking PHP language as an example), which roughly declares the security level to the browser, so that there will be no problem when the iframe subpage creates a session:

The code is as follows
 代码如下 复制代码

header(’P3P: CP=”ALL ADM DEV PSAi COM OUR OTRo STP IND ONL”‘);

Copy code

header(’P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"');

In addition, I also learned that if the second-level domain name contains underscores, such as: your_domain.yourhost.com, there may also be problems when establishing and transmitting sessions.

http://www.bkjia.com/PHPjc/632108.htmlwww.bkjia.comtrue
http: //www.bkjia.com/PHPjc/632108.html
TechArticle
This article will introduce the solution to the problem of IE7 iframe session loss in php at home. Anyone who has encountered this kind of problem Students can enter the reference reference. Assuming that the iframe method is used, you are likely to encounter this...
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