Variable transfer between phpsession pages-PHP source code

Source: Internet
Author: User
Ec (2); SESSION: If window A has been logged on and has a session, clicking any new connection window in window A has a session. From window A, use window. open () and other js methods open windows also have sessions. from window A, click File (F)-& gt; new window, so that the new window also has SESSION. the creation window in MyIE is similar to that in IE. Click the file in the same window-script ec (2); script

SESSION:
If window A has been logged on and has a session, clicking any new connection window in window A will have a session.
From window A, windows opened using window. open () and other js methods also have sessions.
From window A, click File (F)-> new window, so that the new window also has SESSION.
The creation window in MyIE is similar to the one in IE. click File> New window in the same window, so you can get the SESSION if you enter the correct address.
The SESSION cannot be obtained in the new window.
IE, manually open A new window (click the icon to open A new window). In this case, the SESSION cannot be obtained even if the correct address is the same as that of window.
In IE, when WebFolder is enabled, or online editing software such as MsOffice that supports the HTTP1.1 extension protocol, the SESSION cannot be obtained.
Summary:
The main reason why the SESSIOn cannot be obtained is that http is a stateless communication protocol, so the SESSIOn cannot be shared among different processes. Although you double-click a new window and enter the same address, however, the client and server do not actively record the connection status of the http protocol. SESSION and COOKIE are exactly a mechanism to clarify the communication records between the client and the server, or to indicate the relationship between them ..
You can think of the SESSION/COOKIE Mechanism as a membership card of jingkelong supermarket. if you have this membership card, the salesperson will know what kind of membership you are and what kind of membership price the product should sell to you.
The default Processing Mechanism of PHP is to save the SESSION in the server segment as SESSION_ID.
It can be understood that the supermarket only gives you an idcard. All your information is stored in the computer of the supermarket, rather than an IC card. The information is stored in the card. because there is no Internet connection between supermarket branches, your idcard cannot be used in other branches.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.