I've tried everything, and even though I know that there are FAQ's but I still can't get this to work. Here is the code:
#UPLOAD THE FILE/PICTURE
my $outfile ="/the/path/on/my/webserver/pics/$tempID.jpg";
my $data = "";
open(IN, "<$file"
|| die "Could not read $file, $!";
open(OUT,">$outfile"
|| die "Could not read $outfile, $!";
binmode IN;
binmode OUT;
while (read(IN, $data, 16384)) {
print OUT $data;
}
close OUT;
close IN;
And the error log says:
Could not read C:\Documents and Settings\cheryl\My Documents\My Pictures\goofypic.jpg, No such file or directory at /the/path/on/mywebserver/cgi-bin/subdir/script.cgi line 337.
Database handle destroyed without explicit disconnect.
The script and location for the files to be upload to are on my unix server. I am running the script by connecting via a browser from my Windows PC. How do I get it to open the file from my local machine/or whoever's machine running it from the browser without the script wanting to upload that file from itself?
Please help!!!!
Thanks,
Cheryl
#UPLOAD THE FILE/PICTURE
my $outfile ="/the/path/on/my/webserver/pics/$tempID.jpg";
my $data = "";
open(IN, "<$file"

open(OUT,">$outfile"

binmode IN;
binmode OUT;
while (read(IN, $data, 16384)) {
print OUT $data;
}
close OUT;
close IN;
And the error log says:
Could not read C:\Documents and Settings\cheryl\My Documents\My Pictures\goofypic.jpg, No such file or directory at /the/path/on/mywebserver/cgi-bin/subdir/script.cgi line 337.
Database handle destroyed without explicit disconnect.
The script and location for the files to be upload to are on my unix server. I am running the script by connecting via a browser from my Windows PC. How do I get it to open the file from my local machine/or whoever's machine running it from the browser without the script wanting to upload that file from itself?
Please help!!!!
Thanks,
Cheryl