In phpcookie, the periods (periods) are automatically converted into underscores. In phpcookie, the dot (full period) is automatically converted to an underscore. in cookie, the dot (full period) cannot be used in phpcookie. In fact, the dot (full period) in php cookie can be used) cookie underline
Php cookies cannot use periods (periods). In fact, they are not very strict. we should say that we can use the cookie name of periods, but it will be converted. you name a cookie:
$ _ COOKIE ['My. name'] = 1;
In fact, you cannot find this value in the cookie through 'My. name'. it can only be 'My _ name ':
Echo $ _ COOKIE ['My _ name'];
Php has automatically converted to underline.
Why does php do this? This is because $ _ GET/$ _ POST/$ _ SERVER/$ _ COOKIE... In many previous versions, the values of these global functions can be directly accessed locally using the register_globals parameter. for example, after register_globals = on is enabled, the value of $ my_name for access is 1. If it is $ my. name, it does not comply with the naming principles of php variables. this is not just a problem of periods.
Therefore, the $ _ COOKIE name complies with the php naming standard.
In addition, enabling register_globals is a bad decision, because it may overwrite the original value in the script, for example:
// Other code
If ($)
$ Uc_is_login = true;
//...
The user only needs to send a url? A = 1 http request can be logged in by default. This is a very dangerous practice and should be disabled. In fact, php6 has removed this option.
Php cookie usage problems
Setcookie ("name", "val", expire_time, "/", ".domain.com ");
Add a period before .domain.com so that the sub-directories in domain.com can be used.
"/" Is the root directory.
In this way, you can obtain the saved cookie.
Php cookie problem, 100 help
Can I underline your domain name? I understand that only a hyphen can be used!
Http://www.bkjia.com/PHPjc/897693.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/897693.htmlTechArticlephp cookie in the dot (periods) automatically converted to the underline problem, cookie underline php cookie can not use the dot (periods), in fact not very strict, it should be said that you can use the dot...