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
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-13 17:40:151120browse

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...
  • 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