计数器的问题 $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;?> 如何获取指定数组元素的下标? 图片问题 php如何关闭记录集 准备用PHP做一个企业简易的短信中心。。。 php运行奇怪问题,求救,急~~~~~~~~ mysql中一个表的最大项目数和最大记录数 输入的数据怎么进入数据库啊?(高分求解) 请问:怎样在Mysql数据库的表中实现“刷新”数据呢?? what software can PHP use to develop ? PHP调用静态方法 一个查看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;
?>