Home > Backend Development > PHP Tutorial > PHP records the last and current visit time code example_PHP tutorial

PHP records the last and current visit time code example_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 17:40:15
Original
1119 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
    Latest Issues
    php data acquisition?
    From 1970-01-01 08:00:00
    0
    0
    0
    PHP extension intl
    From 1970-01-01 08:00:00
    0
    0
    0
    How to learn php well
    From 1970-01-01 08:00:00
    0
    0
    0
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template