|
计数器设计问题请教!!!
1、计数器CGI文件如下:
#!/usr/bin/perl
use CGI;
$co= new CGI;
$counterfile="/home/httpd/cgi-bin/counter/count.dat";
open(COUNT,"<$counterfile") or die "Count not open counter data file.";
$count=<COUNT>;
close COUNT;
$count++;
open(COUNT,">$counterfile");
print COUNT $count;
close COUNT;
#print $co->header;
print "Content-Type:text/html\n\n";
print $count;
#print $co->end_html;
exit 0;
2、在主页面调用:
<script src="../cgi-bin/counter/counter2.cgi"></script>
3、存放记数器的文件的数字在增加,但主页面无法显示,SSI调用也不行,请大家帮帮忙!谢谢了!!急!! |
|