Home > Backend Development > PHP Tutorial > Implementing the SESSION function in PHP3 (2)_PHP Tutorial

Implementing the SESSION function in PHP3 (2)_PHP Tutorial

WBOY
Release: 2016-07-21 16:01:55
Original
805 people have browsed it

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.
// It can be used as a supplement to the SetCookie function or even as a replacement.
// $CName....: The name of the cookie
// $CValue....: The value of the cookie
// $CEXpr....: The validity period of the cookie, in minutes as the unit, you can also modify and add hours, days

if($CExpr > 0){
$CookieString="astr= '$CName' + '=' + '$CValue' + '; expires=' + expr + ';path=/';";
$Cookie.="nn";
}else{
$Cookie.="nn";
}
echo $Cookie;
}
}
?>

Original author: Unknown

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/316702.htmlTechArticleCOOKIE function library: cookie.inc.php3 ?php if (!isset($__cookie_inc__)){ $__cookie_inc__= 1; function JsSetCookie($CName,$CValue,$CExpr=FALSE){ // This function allows you to add text after the HTML header tag...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template