计数器的问题 $comment=$comment[0];是取的左边的第一位还中右边的第一位啊?! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?php$fname="count.dat";$date=date('Ymd');if (file_exists($fname)){ $comment = file($fname); $fp=fopen($fname,w); if($date==substr($comment[0],0,8)) { $comment_ok=$date.substr(++$comment[0],-4); } else { $comment_ok=$date.'0001'; } fwrite($fp,$comment_ok);} else { $fp=fopen($fname,w); fwrite($fp,$date.'0001'); $comment_ok=$date.'0001';}fclose($fp); echo $comment_ok;?> 这下碉堡了...公司做了这么大广告。我怕网站承受不了,大伙给出出招! 关于JPgraph的问题,可以自定义Y轴坐标刻度的最大值吗?如果可以,是怎样做? 搜狗推送严重影响搜索引擎收录,大家不要再上当了 请教如何使用.htaccess重定向二级域名到我的站点指定目录 php工作的前辈们我想找份php的工作不知道面试的时候应该做些什么 帮我写个递归 虚拟主机写webgame,如何定时执行php程序? 截取复杂table和img的正则 php调用外部脚本 报价咨询,关于PHP+MYSQL的电子商务网站 一个查看OICQ是不是在线 的程序 php与oicq
$fname="count.dat";
$date=date('Ymd');
if (file_exists($fname)){
$comment = file($fname);
$fp=fopen($fname,w);
if($date==substr($comment[0],0,8))
{
$comment_ok=$date.substr(++$comment[0],-4);
} else {
$comment_ok=$date.'0001';
}
fwrite($fp,$comment_ok);
} else {
$fp=fopen($fname,w);
fwrite($fp,$date.'0001');
$comment_ok=$date.'0001';
}
fclose($fp);
echo $comment_ok;
?>