【php开源代码栏目提醒】:网学会员为广大网友收集整理了,adminLogOut.php,希望对大家有所帮助!
<?php
session_start();
function session_clear() {
$exists = "no";
$session_array = explode(";",session_encode());
for ($x = 0; $x < count($session_array); $x++) {
$name = substr($session_array[$x], 0, strpos($session_array[$x],"|"));
if (session_is_registered($name)) {
session_unregister('$name');
$exists = "yes";
}
}
if ($exists != "no") {
session_destroy();
}
}
session_clear();
if(!session_is_registered(session_name())) {
echo"<center>注销成功</center>";
include("adminLogin.php");
}else{
echo"<h3>注销失败</h3>";
echo"请检查您的
系统.";
}
?>