COOKIE function library: cookie.inc.php3
if (!isset($__cookie_inc__)){
$__cookie_inc__=1;
function JsSetCookie($CName,$CValue,$CExpr=FALSE){
// This function allows you to set cookies after the HTML header tag,
// can be used as a supplement to the SetCookie function, or even replace it.
// $CName....: The name of the cookie
// $CValue....: The value of the cookie
// $CEXpr....: The validity period of the cookie, in minutes, can also be modified Add hours, days
if($CExpr > 0){
$CookieString="astr= '$CName' + '=' + '$CValue' + ';expires=' + expr + ';path=/'; ";
$Cookie.="nn";
}else{
$Cookie.="nn";
}
echo $Cookie;
}
}
?>
Original author: unknown
The above introduces the function of session.timeout to implement SESSION in PHP3 (2), including the content of session.timeout. I hope it will be helpful to friends who are interested in PHP tutorials.