关于前端:PHP实现简单的网站访客统计

31次阅读

共计 6107 个字符,预计需要花费 16 分钟才能阅读完成。

https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/2845172885…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/6283912303…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/4911554270…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/1639056396…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…
https://xueqiu.com/8732908300…

一、在网站根目录新建一个名为 tongji.php 的文件,而后写入以下代码

`<?php
$n=file_get_contents('tongji.txt');
$n++;
file_put_contents('tongji.txt',$n);
echo "document.write($n);";
?>` 

*   1
*   2
*   3
*   4
*   5
*   6

二、在须要显示的中央增加以下调用代码

` 你是第 <script type=text/javascript src=tongji.php></script> 位访问者 ` 

*   1

三、阐明 退出调用代码后关上网页,会在后盾生成一个名为 tongji.txt 的记录文件,编辑此文件能够实现批改访问量,如需统计次目录下的单页访问量,能够在次目录下新建 tongji.php 文件,而后增加调用代码即可

效果图如下

正文完
 0