Session_Start () creates a new session or reuses existing sessions. If you submit a session ID by either a GET or POST, or by using a cookie, the existing session is reused.
The session_start() session Manager's open and read callback functions are
Http://www.2cto.com/kf/201206/135471.htmlHTTP protocol and status hold The HTTP protocol itself is stateless, which is consistent with the HTTP protocol's original purpose, the client simply needs to request to the server to download some files,
read/Set expiry time for current cacheIntSession_cache_expire([string $new _cache_expire])When the request starts, the cache expiration time is reset to 180 minutes and is saved in the Session.cache_expire configuration item. Therefore, for each
PhpSessionsThe PHP session variable is used to store information about user sessions (session) or to change settings for user sessions. The Session variable stores information for a single user and is available for all pages in the application .The
Example of how to set session values and cookies in php. Step 1: first write a login page and a content page locally (only after logging in. The code is roughly as follows: The following is login. php, which is used for request login. pass the first
Application1. Application is used to save information shared by all users. When IIS is stopped, it is initialized.2.In the ASP era, it is ideal to use application if the data to be stored does not or rarely change during the lifetime of the
This article mainly introduces the PHP independent Session database storage operation class sharing. If you need it, refer to the following code:
The Code is as follows:
Class DbSession{
Const TYPE_INT = 1;Const TYPE_STR = 2;
/*** Database
PHP independent Session database storage operation class sharing. Directly run the code: Copy the code as follows: classDbSession {constTYPE_INT1; constTYPE_STR2; *** Databaseconfigration ** @ vararray * private $ _ configarray ('H directly run the
Step 1: first write a login page and a content page locally (only after logging in. The code is roughly as follows:
The following is login. php, which is used for request login. parameters are passed through post. If the login is successful, the
I have never understood the Session and the login verification of cookies. I tried HttpURLConnection and HttpClient yesterday, respectively, to understand the mechanism and
I have never understood the Session and the login verification of cookies. I
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.