yogi_bear_79
01-24-2007, 02:42 AM
I am trying to use this simple script
#!/usr/bin/perl
use warnings;
use strict;
use CGI qw/:standard/;
my $file = "c:/webs/www.hollywoodoil.com/data/counter.txt";
open( LOG, "$file" ) or die "Cannot open file $!";
my $cnt = <LOG>;
close(LOG);
++$cnt;
open( LOG, "> $file" ) or die "Cannot open file $!";
print LOG $cnt;
close(LOG);
#print "$cnt";
print "test";
HTML CODE:
<p><!--#include virtual="/includes/count.pl" --></p>
I have tried include file, and exec all have the same results. The code is printed on my web page. I use a perl form mail script on this site which works fine. The web server admin doesn't see a problem. When I call the script directly via the URL the counter.txt file increments.
I have even tried a simple Hello World script, all have the same results. I even used a counter script from another web server I use and it does the same thing.
#!/usr/bin/perl
use warnings;
use strict;
use CGI qw/:standard/;
my $file = "c:/webs/www.hollywoodoil.com/data/counter.txt";
open( LOG, "$file" ) or die "Cannot open file $!";
my $cnt = <LOG>;
close(LOG);
++$cnt;
open( LOG, "> $file" ) or die "Cannot open file $!";
print LOG $cnt;
close(LOG);
#print "$cnt";
print "test";
HTML CODE:
<p><!--#include virtual="/includes/count.pl" --></p>
I have tried include file, and exec all have the same results. The code is printed on my web page. I use a perl form mail script on this site which works fine. The web server admin doesn't see a problem. When I call the script directly via the URL the counter.txt file increments.
I have even tried a simple Hello World script, all have the same results. I even used a counter script from another web server I use and it does the same thing.