Warning: session_destroy() [function.session-destroy]: Tryin
程序员文章站
2024-04-06 13:52:49
...
在使用session_destroy(),进行Session变量的注销时,出现了
Warning: session_destroy() [function.session-destroy]: Trying to destroy
uninitialized session in
的错误!!经查证,在进行使用session_destroy()函数必须先调用session_start()函数。
也就是要有如下代码:
session_start();
session_destroy();
?>
分析
还是经验不足啊,对session的理解不足。出现了这个错误,后来查了一下,
在调用session_destroy()之前,需要调用 session_start();
来告诉系统你当前是有session的。然后再去关闭
推荐阅读
-
Warning: session_destroy() [function.session-destroy]: Tryin
-
Warning: session_destroy() : Trying to destroy uninitialized
-
Warning: session_destroy : Trying to destroy uninitialized sessionq错误
-
Warning: session_destroy() : Trying to destroy uninitialized sessionq错误
-
Warning: session_destroy() : Trying to destroy uninitialized sessionq错误_php技巧
-
Warning: session_destroy() [function.session-destroy]: Tryin_PHP教程
-
Warning: session_destroy() : Trying to destroy uninitialized_PHP教程
-
Warning: session_destroy() : Trying to destroy uninitialized_PHP
-
Warning: session_destroy() : Trying to destroy uninitialized sessionq错误
-
Warning: session_destroy() : Trying to destroy uninitialized_PHP