Thread: counter program
Results 1 to 2 of 2
Related
-
Help with a small counter Forum: Javascript Forum
Replies: 2 -
looking for a counter Forum: Website Scripts Forum
Replies: 3 -
looking for a counter Forum: Introduce Yourself
Replies: 1 -
Counter!!!!! Forum: Website Scripts Forum
Replies: 3 -
hit counter Forum: HTML Forum
Replies: 5
-
12-09-2007, 12:42 PM #1
counter program
hi i am trying to create a perl script which tells us the number of times the pagre was acesses.
but it doesnt work properly
here is the perl script . please tell me what's wrong with it .................
Code:#!/usr/bin/perl -w print "content-type: text/html\n\n"; print "<html><body>"; my $cnt_file = "count.txt"; my $num_access; open (FILE, "< $cnt_file"); $num_access = <FILE>; close(FILE); open (FILE, "> $cnt_file"); $num_access++; print FILE $num_access; close (FILE); print "<H1>Page Visited $num_access times</H1>"; print "</body></html>";
i even enable the write permission for the txt file.
but still it looks like the script never ends up updating the value of num_access in the file.
-
12-14-2007, 01:16 PM #2
Re: counter program
you need to make sure that count.text is already created and premissions are set to 755.
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum