刚刚接触php,看别人的源码,其中得COOKIE是通过
$HTTP_COOKIE_VARS["a"];然而这样并得不到值,为空,而改成
$_COOKIE就正常了.
是什么原因?我用的PHP是5.2版本的.方法里都包含:
global $HTTP_COOKIE_VARS
是什么意思?
$HTTP_COOKIE_VARS["a"];然而这样并得不到值,为空,而改成
$_COOKIE就正常了.
是什么原因?我用的PHP是5.2版本的.方法里都包含:
global $HTTP_COOKIE_VARS
是什么意思?
在 PHP 4.1.0 及以后版本使用$_COOKIE。之前的版本,使用 $HTTP_COOKIE_VARS。
你可以到这里看看``
我感觉讲的还可以``
可以解决你的疑问
是什么意思?
我应该如何改呢?发现如果是$HTTP_COOKIE_VARS是得不到COOKIE的,为何会这样?
如果改为_COOKIE反而可以了.
我该如何改?
extract($_SERVER);
其他地方都不要动
register_globals = On; Whether or not to register the old-style input arrays, HTTP_GET_VARS
; and friends. If you're not using them, it's recommended to turn them off,
; for performance reasons.
register_long_arrays = On; This directive tells PHP whether to declare the argv&argc variables (that
; would contain the GET information). If you don't use these variables, you
; should turn it off for increased performance.
register_argc_argv = On
三项打开后,正常了.这样不会带来什么不好的后果吧?
直接用$_COOKIE
http_那个是为了兼容老代码