gpt4 book ai didi

php - 警告 : session_destroy()?

转载 作者:行者123 更新时间:2023-12-04 16:03:56 34 4
gpt4 key购买 nike

我试图修复我的登录脚本,在我的本地主机上它可以工作,但上传到我的在线测试服务器时,注销被破坏,我得到这个错误:

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/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com