SID constant What the hell is going on?

Source: Internet
Author: User
This post was last edited by Lghyt on 2013-12-11 20:45:15

SESSIN_ID () and Sid come out of the result is not the same?
PHP has a lot of predefined constants, such as __file__, and checking the manual SID is one of them.
The manual explains the following:
SID (String)
A constant containing the session name and the session ID, in the form "Name=id", or an empty string if the session ID is already set in the appropriate session cookie. This and session_id () return the same ID.
But after seeing it, I couldn't understand it. That is constant then it can print out, I printed with echo SID, the result is SID,
This is not a string!
What is the point of such a constant?


Reply to discussion (solution)

Oh, understand, the original is one thing, a poem for proof

1970 01 01 00:00:00
f0490a5095e1fad9e357241097ecd310

Back to phpsessid=f0490a5095e1fad9e357241097ecd310
The province is divided.

  • 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.