After PHP login, if you get the login username via cookies?

Source: Internet
Author: User
After PHP login, if you get the login username via cookies?


Reply to discussion (solution)

What is the landlord thinking?

Http://www.cnblogs.com/eczhou/archive/2012/03/08/2384807.html
Logging users ' logins with cookies

What is the landlord thinking?


PHP sits on the login, user name deposit cookie. Then get this cookie value from a page outside the thinkphp framework

Not in $_cookie?

After logging in, you save your username to a cookie
Then it is possible to retrieve

Not in $_cookie?


Can not be obtained from the background, if you can from the background, I will use the session. The page to fetch the cookie value is outside the thinkphp frame, can only use JS to get

After logging in, you save your username to a cookie
Then it is possible to retrieve


has been saved to a cookie. Now you want to get this cookie from a page outside the thinkphp framework. This page has no background, just HTML


alert (Document.cookie);

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