Use of Session in PHP

Source: Internet
Author: User

The use of the session in PHP is relatively simple, through Session_Start (), start the sesssion session function (you can also set the PHP configuration file Session.auto_start =1 so that you do not need to call session_start (), The session can be used directly, and the statement must precede all output statements in the script (if you are using cookie-based sessions in the PHP manual, you must call Session_Start () before Anything is outputted to the browser.).

You can then manipulate the $_session array just as you would with an array, such as $_session[' something ']= ' nothing '. You can complete settings and modifications.

As for the early destruction session, use the Session_unset () function to destroy the session record of the conversation.

For a more detailed understanding of the session mechanism in PHP, see www.cnblogs.com/acpp/archive/2011/06/10/2077592.html

Use of Session in PHP

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.