ZiaTioN has asked for the wisdom of the Perl Monks concerning the following question:
Here is the code:
Here is how I call it in my web page:#!/usr/bin/perl $file = "/home/master/webroot/perlskripts/ip.log"; if (-e $file) { open(lg, ">>$file") || die "Can't open $file!\n"; print lg "User from ".$ENV{'REMOTE_ADDR'}." logged on\n"; close(lg); }else{ $create = `touch $file`; $chmod = `chmod u+rw $file`; open(lg, ">>$file") || die "Can't open $file!\n"; print lg "User from ".$ENV{'REMOTE_ADDR'}." logged on\n"; close(lg); }
Any ideas as to why this would not be executed. I am pretty sure the image embedding method is valid. Alos when I run the script via command line it does what it is suppose to do.<tr bgcolor="#220E50"> <td> <img src="/var/www/cgi-bin/remote_address.pl" height="0" width="0" +alt="[script]"> </td> </tr>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple script not being executed when html page loads.
by duct_tape (Hermit) on Dec 24, 2003 at 16:12 UTC | |
|
Re: Simple script not being executed when html page loads.
by jeffa (Bishop) on Dec 24, 2003 at 17:07 UTC | |
|
Re: Simple script not being executed when html page loads.
by cees (Curate) on Dec 24, 2003 at 18:15 UTC | |
|
Re: Simple script not being executed when html page loads.
by b10m (Vicar) on Dec 24, 2003 at 16:14 UTC | |
|
Re: Simple script not being executed when html page loads.
by inman (Curate) on Dec 24, 2003 at 16:13 UTC |