How to differentiate cookies with the same name? if it is ASP & nbsp; I will write it into: response. cookies (cookies_name) (admin) read: request. cookie (cookies_name) (admin) without cookies_name, may cause mixing of cookies on multiple sites on my computer. logging on to A is equivalent to logging on to BPHP, and I only find and read: $ How to differentiate cookies with the same name
If it is ASP, I will write
Write:
Response. cookies (cookies_name) ("admin ")
Read:
Request. cookies (cookies_name) ("admin ")
If cookies_name is not added, it may cause mixing of Cookies on multiple sites on my computer. logon to A equals to logon to B.
Php I only found
Read:
$ _ COOKIE ["admin"]
PHP needs to be written in the same way as ASP
Share: More
------ Solution --------------------
Cookies (cookies_name) ("admin") in ASP are called hierarchical cookies.
PHP is not so complex (because php supports joined key arrays, but asp does not)
Write setcookie ('Cookies _ name [admin] ', 'value ')
Read $ _ COOKIE ['Cookies _ name'] ['admin']