PHP Study Notes: COOKIE basics, php Study Notes cookie
Why learn from cookies? I can say that I just clicked on a Cookie! Cookies-cookies; small desserts; attractive young women; sweet breads; in the eyes of programmers ....... below is a small amount of Cookie information, PHP code is used to explain how to set the Cookie <? Phpsetcookie ("user", "axl503", time () + 60); echo "Save Cookie";?> This is two ways to get the Cookie value <? Phpecho $ _ COOKIE ["user"]; // directly retrieve the user's Cookie and directly retrieve the user's value, that is, axl503print_r ($ _ COOKIE ); // $ _ when a COOKIE is obtained by a predefined variable (array), all key-value pairs are retrieved as arrays?> /* If you enable or set a comment in Lili, you must add three parameters. The first one is that the user is the key value, user can be customized. I regard user as the second value of ID card as the value corresponding to user, and value as the third time () + XXX of ID card information as the expiration time () +-the expiration time of the ID card * // if the third time parameter is not set, the cookie becomes invalid (in this case, cookie is saved in the browser cache) finally, what I wrote today is how to create a Cookie on the web Cookie is used to store client user information, that is, browser page information. How to run a Cookie between the browser and the server I will explain in detail la la *************************************** ****************************