Several complementary functions of session (2)

Source: Internet
Author: User
// ******************************** Session_get_cookie_params (PHP4 $ #@ 62; 4.0RC2) arraysession_get_cookie_params (void); returns an array that records the cookie information of the current session. Including: lifetime-coo

//********************************
Session_get_cookie_params (PHP4 $ # @ 62; = 4.0RC2)
Array session_get_cookie_params (void );
Returns an array that records the cookie information of the current session.
Include:
"Lifetime"-the lifetime of the cookie.
"Path"-cookie storage path.
"Domain"-cookie domain.
//*******************************
Session_set_cookie_params (PHP4 $ # @ 62; = 4.0b4)
Void session_set_cookie_params (int lifetime [, string path [, string domain])
This function only applies to the current script file.
//*******************************
The function to be introduced below should be very useful to everyone. are you interested in customizing a session to save without cookies? This function can achieve your assumption.
Let me think about the benefits of using cookies? At least, you don't have to worry about whether the client's cookie function is enabled, right.
Session_set_save_handler (PHP4 $ # @ 62; = 4.0b4)
Void session_set_save_handler (string open, string close, string read, string write, string destroy, string gc)
This function can define user-level session storage functions (open, close, write, etc ).
For example, this function is useful when we want to save the session in a local database.

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.