SEO大神带你入门学习群:327371919 【1】每天都有最新免费SEO基础课程学习! 【2】SEO高手群内指导解答问题、分析网站! 【3】群内分享SEO教程、全套wordpress建站教程和织梦dedecms教程!
int fopen(string 文件名,string 模式);返回:文件指针模式: r,r+ w,w+ a,a+int fclose(int 文件指针,int length);返回:length-1字符串,若到文件尾,返回EOF.例:$str1=fgets($fp,10); string fputs(int文件指针,string写入串,[int length]);
还不错这个
$hour=date(h);$min=date(i);$secl=date(s);$time=$hour.':'.$min.'$secl';echo "现在时间:"$time; $date=date("y年n月d日h时i分s秒");print $date
<meta charset="utf8"><?php$count_f = fopen("jishu.txt","r");$strl = fgets($count_f,10);$strl++;fclose($count_f);$count_f = fopen('jishu.txt', 'w');fwrite($count_f,$strl);//把$strl写入文件$count_ffclose($count_f);/*自动变成9位。*/$len1 = strlen($strl);$bit9 = '000000000';$len2 = strlen($bit9);$len1_2 = $len2 - $len1;$add_zero = substr($bit9,0,$len1_2);$snum = $add_zero.$strl;echo "你是第".$snum."个访客。";?>