$cookie retention Time
$falg User Unique identifier
$name User Name
Set Cookie Information
function _setcookie ($name, $flag, $time)
{
switch($time){ case 0: setcookie('username',$name); setcookie('userflag',$flag); _alert_location('登录成功', 'index.php'); break; case 1: setcookie('username',$name,time()+86400); setcookie('userflag',$flag,time()+86400); _alert_location('登录成功', 'index.php'); break; case 2: setcookie('username',$name,time()+604800); setcookie('userflag',$flag,time()+604800); _alert_location('登录成功', 'index.php'); break;}
}
?>
IE and Firefox can not delete what is the reason ah?
Setcookie ("username", "", Time ()-1);
Setcookie ("Userflag", "", Time ()-1);
That's not true.
I've solved the problem of path.
Setcookie ("username", "", Time ()-1, '/my_dome%201.0/');
This looks good ~ but it's strange that when the local debugging why add '/my_dome%201.0/' can not be '/'? How to modify the website after the official launch?
More depressed is under the Firefox and IE under the path is not the same ~
Setcookie ("username", "", Time ()-1, '/my_dome%201.0/'); How to delete under Firefox
Setcookie ("Userflag", "", Time ()-1, '/my_dome%201.0/');
Setcookie ("username", "", Time ()-1, '/my_dome%201.0 '); How to delete under IE
Setcookie ("Userflag", "", Time ()-1, '/my_dome%201.0 ');
There is no good way to solve this problem ~
Reply content:
$cookie retention Time
$falg User Unique identifier
$name User Name
Set Cookie Information
function _setcookie ($name, $flag, $time)
{
switch($time){ case 0: setcookie('username',$name); setcookie('userflag',$flag); _alert_location('登录成功', 'index.php'); break; case 1: setcookie('username',$name,time()+86400); setcookie('userflag',$flag,time()+86400); _alert_location('登录成功', 'index.php'); break; case 2: setcookie('username',$name,time()+604800); setcookie('userflag',$flag,time()+604800); _alert_location('登录成功', 'index.php'); break;}
}
?>
IE and Firefox can not delete what is the reason ah?
Setcookie ("username", "", Time ()-1);
Setcookie ("Userflag", "", Time ()-1);
That's not true.
I've solved the problem of path.
Setcookie ("username", "", Time ()-1, '/my_dome%201.0/');
This looks good ~ but it's strange that when the local debugging why add '/my_dome%201.0/' can not be '/'? How to modify the website after the official launch?
More depressed is under the Firefox and IE under the path is not the same ~
Setcookie ("username", "", Time ()-1, '/my_dome%201.0/'); How to delete under Firefox
Setcookie ("Userflag", "", Time ()-1, '/my_dome%201.0/');
Setcookie ("username", "", Time ()-1, '/my_dome%201.0 '); How to delete under IE
Setcookie ("Userflag", "", Time ()-1, '/my_dome%201.0 ');
There is no good way to solve this problem ~
See if path and domain are written incorrectly.