注册送现金一元秒提现

  • <tr id='1z2sm'><strong id='1z2sm'></strong><small id='1z2sm'></small><button id='1z2sm'></button><li id='1z2sm'><noscript id='1z2sm'><big id='1z2sm'></big><dt id='1z2sm'></dt></noscript></li></tr><ol id='1z2sm'><option id='1z2sm'><table id='1z2sm'><blockquote id='1z2sm'><tbody id='1z2sm'></tbody></blockquote></table></option></ol><u id='1z2sm'></u><kbd id='1z2sm'><kbd id='1z2sm'></kbd></kbd>

    <code id='1z2sm'><strong id='1z2sm'></strong></code>

    <fieldset id='1z2sm'></fieldset>
          <span id='1z2sm'></span>

              <ins id='1z2sm'></ins>
              <acronym id='1z2sm'><em id='1z2sm'></em><td id='1z2sm'><div id='1z2sm'></div></td></acronym><address id='1z2sm'><big id='1z2sm'><big id='1z2sm'></big><legend id='1z2sm'></legend></big></address>

              <i id='1z2sm'><div id='1z2sm'><ins id='1z2sm'></ins></div></i>
              <i id='1z2sm'></i>
            1. <dl id='1z2sm'></dl>
              1. <tr id='f77cj'><strong id='f77cj'></strong><small id='f77cj'></small><button id='f77cj'></button><li id='f77cj'><noscript id='f77cj'><big id='f77cj'></big><dt id='f77cj'></dt></noscript></li></tr><ol id='f77cj'><option id='f77cj'><table id='f77cj'><blockquote id='f77cj'><tbody id='f77cj'></tbody></blockquote></table></option></ol><u id='f77cj'></u><kbd id='f77cj'><kbd id='f77cj'></kbd></kbd>

                <code id='f77cj'><strong id='f77cj'></strong></code>

                <fieldset id='f77cj'></fieldset>
                      <span id='f77cj'></span>

                          <ins id='f77cj'></ins>
                          <acronym id='f77cj'><em id='f77cj'></em><td id='f77cj'><div id='f77cj'></div></td></acronym><address id='f77cj'><big id='f77cj'><big id='f77cj'></big><legend id='f77cj'></legend></big></address>

                          <i id='f77cj'><div id='f77cj'><ins id='f77cj'></ins></div></i>
                          <i id='f77cj'></i>
                        1. <dl id='f77cj'></dl>
                          1. 当前位置:首页 > PHP源码 > 列表

                            PHP简单实现记录网站访问量功能示例

                            发布:smiling 来源: PHP粉丝网  添加日期:2017-11-07 12:31:38 浏览: 评论:0 

                            BENWENSHILIJIANGSHULEPHPJIANDANSHIXIANJILUWANGZHANFANGWENLIANGGONGNENG。FENXIANGJIDAJIAGONGDAJIACANKAO,JUTIRUXIA:

                            注册送现金一元秒提现tongji/index.phpWENJIAN:

                            1. $file = dirname(__FILE__).'/tongji.db'
                            2. //$data = unserialize(file_get_contents($file)); 
                            3. $fp=fopen($file,'r+'); 
                            4. $content=''
                            5. if (flock($fp,LOCK_EX)){ 
                            6. while (($buffer=fgets($fp,1024))!=false){ 
                            7. $content=$content.$buffer
                            8. $data=unserialize($content); 
                            9. //设置记录键值 
                            10. $total = 'total'
                            11. $month = date('Ym'); 
                            12. $today = date('Ymd'); 
                            13. $yesterday = date('Ymd',strtotime("-1 day")); 
                            14. $tongji = array(); 
                            15. // 总访问增加 
                            16. $tongji[$total] = $data[$total] + 1; 
                            17. // 本月访问量增加 
                            18. $tongji[$month] = $data[$month] + 1; 
                            19. // 今日访问增加 
                            20. $tongji[$today] = $data[$today] + 1; 
                            21. //保持昨天访问 
                            22. $tongji[$yesterday] = $data[$yesterday]; 
                            23. //保存统计数据 
                            24. ftruncate($fp,0); // 将文件截断到给定的长度 
                            25. rewind($fp); // 倒回文件指针的位置 
                            26. fwrite($fp, serialize($tongji)); 
                            27. flock($fp,LOCK_UN); 
                            28. fclose($fp); //mailanhe.com 
                            29. //输出数据 
                            30. $total = $tongji[$total]; 
                            31. $month = $tongji[$month]; 
                            32. $today = $tongji[$today]; 
                            33. $yesterday = $tongji[$yesterday]?$tongji[$yesterday]:0; 
                            34. echo "document.write('访总问 {$total}, 本月 {$month}, 昨日 {$yesterday}, 今日 {$today}');"

                            注册送现金一元秒提现SHIYONGFANGFA(TONGGUOjsYINRUtongji/index.phpWENJIAN):

                            1. <script language="JavaScript" src="./tongji/"></script> 

                            Tags: PHP计数器 PHP访问量

                            分享到:

                            注册送现金一元秒提现相关的文章

                            靠谱的棋牌---首页_Welcome 蓝洞棋牌官网送3金币---首页_Welcome 百灵拼三张-Welcome 聚友棋牌官网下载安装-首页 百胜棋牌---首页_欢迎您