高手们,帮一下忙!
open(re_count,"$countrecord");
$count=<re_count>;
close(re_count);
if(&iplock){
goto dsp;}
###### IP LOCK #####
$count++;
open(wr_count,">$countrecord");
print wr_count "$count";
close(wr_count);
上面是一个完整cgi的一部分,是用来读取一个文件中的一个值。
为了读写更多值,我修改如下,但却不能工作,为什么????
高手,请教!
open(re_count,"$countrecord");
$line=<re_count>;
close(re_count);
if(&iplock){
goto dsp;}
###### IP LOCK #####
($count,$yearold,$monold,$dayold)=splet(/,/,$line);
open(wr_count,">$countrecord");
print wr_count "$count,$year,$mon,$mday\n";
close(wr_count);