HTTP protocol is a stateless connection, in order to track the behavior of users must have a can work on different from the page variables, in PHP can be used in the cookie and session two ways to achieve.
Cookie is more familiar, is to save the variable as a file on the client side, but if the customer forbid the cookie will not be able to. This requires a session, in the PHP4, the session can be implemented in two ways, one is to use a cookie, that is, the sessionid stored in a cookie file, and the second is to carry the SessionID attached to the URL for delivery.
Although there are two ways to do this, but as to which method is not necessary for the programmer to worry about, PHP will automatically check the settings of the customer cookie (referring to the Linux/unix platform, Win32 unknown), and the default is to use the cookie preference (you can modify the php.ini file in the [ Session] section of the Session.use_cookies value to change). Of course you can also force the use of URLs to pass SessionID, as follows:
The > Submit Form
Add only one sentence to the link It's all right, easy? In the php.ini there are many settings about the session, such as Session.cookie_lifetime is the time of the session, and so on, in the [Session] section, if you look at the session in PHP will have more understanding.
http://www.bkjia.com/PHPjc/532091.html www.bkjia.com true http://www.bkjia.com/PHPjc/532091.html techarticle HTTP protocol is a stateless connection, in order to track the behavior of users must have a can work on different from the page variables, in PHP can be used in the cookie and session two ways to achieve. Co ...