$counterFile"); } displayCounter($coun">
当前位置:Gxlcms > PHP教程 > PHP教程.应用实例3_PHP教程

PHP教程.应用实例3_PHP教程

时间:2021-07-01 10:21:17 帮助过:22人阅读

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);
?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/532316.htmlTechArticlePHP计数器 $counterFile = balong.txt;//存储数值的文件名几路径 function displayCounter($counterFile) { $fp = fopen($counterFile,rw); $num = fgets($fp,5); $num += 1; pri...

人气教程排行