This commit is contained in:
teasiu
2023-12-24 22:17:16 +08:00
parent 005e9e30d4
commit 1f79c5b439
4 changed files with 87 additions and 55 deletions

View File

@@ -0,0 +1,12 @@
<?php
// 用于获取当前访问次数并返回给前端
$file = 'ad_count.txt'; // 存储访问次数的文件
if (file_exists($file)) {
$visitCount = (int)file_get_contents($file); // 从文件中获取访问次数
echo $visitCount;
} else {
echo '0';
}
?>