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

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

WBOY
Release: 2016-06-21 09:13:36
Original
895 people have browsed it

cookie|session|函数






    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分钟后再刷新本页面就会看不到了
" ;
" ;
}

?>




Related labels:
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