use*_*967 3 php drupal module session-variables
我在Drupal模块中有几行代码,如下所示:
if ($arg == 'true' && isset($_SESSION['xyz']['noredirect'])) {
unset($_SESSION['xyz']['noredirect']);
}
Run Code Online (Sandbox Code Playgroud)
当第二行执行时,我收到错误:
Error messageNotice: Undefined variable: _SESSION in blah() (line 122 of /home/xxxxxxx/public_html/sites/all/modules/blah/blah.module).
Run Code Online (Sandbox Code Playgroud)
我简直无法理解为什么如果设置会话,我不能解开它.
有任何想法吗?
谢谢