首页 > 代码库 > 这样就算会了PHP么?-9

这样就算会了PHP么?-9

PHP关于COOKIE的应用

 

<?php    if (!isset($_COOKIE["visittime"])) {        setcookie("visittime", date("y-m-d H:i:s"));        echo "welcome to visit this website first time.";        echo "<br>";    } else {        setcookie("visittime", date("y-m-d H:i:s"), time() + 60);        echo "you visit our site‘s last time is : " .$_COOKIE["visittime"];        echo "<br>";    }    echo " you visite site this time is : ".date("y-m-d H:i:s");    ?>

这样就算会了PHP么?-9