<?php 
	session_start();
	unset($_SESSION['user']);
	$sflag = session_destroy();
	if ($sflag) {
		echo "<script>window.location.href='login.php'</script>";
	}else
	{
		echo "<script>alert('退出失败')</script>";
	}
 ?>