首页 > 开发 > PHP > 正文

PHP计数器

2024-05-04 22:53:47
字体:
来源:转载
供稿:网友
 <?php
  
  
  $counterfile = "balong.txt";//存储数值的文件名几路径
  
  function displaycounter($counterfile) {
   $fp = fopen($counterfile,"rw");
   $num = fgets($fp,5);
   $num += 1;
   print "您是第 "."$num"." 个看巴泷计数器的家伙";
   exec( "rm -rf $counterfile");
   exec( "echo $num > $counterfile");
  }
  
  if (!file_exists($counterfile)) {
   exec( "echo 0 > $counterfile");
  }
  
  displaycounter($counterfile);
  
  ?>
上一篇:php注入2

下一篇:一个用PHP实现的UBB类!

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表