PHP session variables interchanged with local variables?

后端 未结 1 397
暖寄归人
暖寄归人 2021-01-24 02:25

I\'ve encountered a very odd issue in regards to session variables and local variables in php.

I\'m trying to figure out if I am not understanding something about sessi

相关标签:
1条回答
  • 2021-01-24 03:12

    This is probably because the register_globals directive is on. It doesn't say it on that page that $_SESSION variables are included, but it says here:

    If register_globals is enabled, then the global variables and the $_SESSION entries will automatically reference the same values which were registered in the prior session instance. However, if the variable is registered by $_SESSION then the global variable is available since the next request.

    0 讨论(0)
提交回复
热议问题