我试图修复我的登录脚本,在我的本地主机上它可以工作,但上传到我的在线测试服务器时,注销被破坏,我得到这个错误:
Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in htdocs/logout.php on line 17
Warning: Cannot modify header information - headers already sent by (output started at htdocs/logout.php:17) in htdocs/logout.php on line 18
Warning: Cannot modify header information - headers already sent by (output started at htdocs/logout.php:17) in www/htdocs/logout.php on line 34
不太确定是什么原因造成的,因为它在我的本地主机上工作,有什么想法吗?
最佳答案
session_start();
session_destroy(); /*or sesion_unset();*/
关于php - 警告 : session_destroy()?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5752858/