C
code_wrong
hi,
I using the following script (from CGI and Perl in easy steps book) as a hit
counter:
it works ... but when I view the files on the host with WSFTP there is no
sign of counter.txt...
the script is in cgi-bin .. which is surely where counter.txt should appear
... but there is no sign of it anywhere .. any ideas?
#!/usr/bin/perl
open(COUNT,"counter.txt");
$num = <COUNT>;
close(COUNT);
$num++;
open(COUNT, ">counter.txt");
print COUNT $num;
close(COUNT);
$num=sprintf("%05d", $num);
print "content-type:text/html\n\n <html>";
print "You are visitor number $num </html>";
I using the following script (from CGI and Perl in easy steps book) as a hit
counter:
it works ... but when I view the files on the host with WSFTP there is no
sign of counter.txt...
the script is in cgi-bin .. which is surely where counter.txt should appear
... but there is no sign of it anywhere .. any ideas?
#!/usr/bin/perl
open(COUNT,"counter.txt");
$num = <COUNT>;
close(COUNT);
$num++;
open(COUNT, ">counter.txt");
print COUNT $num;
close(COUNT);
$num=sprintf("%05d", $num);
print "content-type:text/html\n\n <html>";
print "You are visitor number $num </html>";