Home > php教程 > php手册 > 在PHP3中实现SESSION的功能(附、COOKIE函数库的使用:test_cookie.php3

在PHP3中实现SESSION的功能(附、COOKIE函数库的使用:test_cookie.php3

WBOY
Release: 2016-06-13 09:59:48
Original
1093 people have browsed it





    Untitled


在网页的任何地方设置cookie
if (!$show){
    $username="liubing";
    jssetcookie("username","liubing",1);
    echo "

cookie username 被设置成    $username
";
    echo "有效期1分钟
" ;
    echo " 试一下cookiee 有没有起作用" ;
}
else{
    echo "

读到的cookie username 值为: $username
";
    echo "有效期1分钟,1分钟后再刷新本页面就会看不到了
" ;
" ;
}
?>



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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template