After logging on to php, if I use cookies to get the login username? After logging on to php, if I use cookies to get the login username?
Reply to discussion (solution)
What is the main idea?
Http://www.cnblogs.com/eczhou/archive/2012/03/08/2384807.html
Use cookies to record user logon
What is the main idea?
Php login, user name stored in cookie. Then obtain the cookie value from the page outside the thinkphp framework.
$ _ Is there no COOKIE?
After login, you save the user name to the cookie
Then it is possible to retrieve
$ _ Is there no COOKIE?
It cannot be obtained from the background. if it can be obtained from the background, I will use session. The page for which the cookie value is to be obtained is outside the thinkphp framework and can only be obtained using js.
After login, you save the user name to the cookie
Then it is possible to retrieve
The cookie has been saved. Now you want to obtain this cookie from a page outside the thinkphp framework. This page has no background, just html
Alert (document. cookie );