PHP records the last and current visit time code example_PHP tutorial

WBOY
Release: 2016-07-13 17:40:15
Original
1082 people have browsed it

header(Content-Type: text/html; charset=utf-8);

if(!isset($_COOKIE["php_cookie"])){
        setcookie("php_cookie",date("Y-m-d H:i:s")); {
setcookie("php_cookie",date("Y-m-d H:i:s"),time() 60);
echo "The last time you visited the website was: ".$_COOKIE["php_cookie" ];
echo
;
}


echo "The time you visited the website this time is: ".date("Y-m-d H:i:s");

?>


Source: Programming Home

  • http://www.bkjia.com/PHPjc/486224.html

    www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/486224.htmlTechArticle?php header(Content-Type: text/html; charset=utf-8); if(!isset( $_COOKIE["php_cookie"])){ setcookie("php_cookie",date("Y-m-d H:i:s")); echo "Welcome to your first visit to the website"; echo br...
  • 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
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!