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

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

WBOY
WBOYOriginal
2016-06-21 09:13:36888browse

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

?>




Statement:
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