[英]Logout file works on localhost but not on iPage
My logout file works on my localhost, but when I try to use it on my iPage hosting account, it keeps the session saved. 我的注销文件可以在我的本地主机上运行,但是当我尝试在iPage托管帐户上使用它时,它将保存会话。 I tested it by printing the session variable on the page which the login redirects to.
我通过在登录重定向到的页面上打印会话变量来测试它。
The code of my logout.php file is: 我的logout.php文件的代码是:
<?php
session_start();
session_destroy();
header("Location: index.php");
?>
Any help? 有什么帮助吗? Thank you
谢谢
After using session_destroy();
使用
session_destroy();
the values in $_SESSION may still be available, but they will not be on the next page load. $ _SESSION中的值可能仍然可用,但不会在下一页加载中。
$_SESSION = array(); // Destroy the variables.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.