Hello,
i still have the same problem I use a perl-script to upload pictures but just the name of the picture for example "picture.gif" is written in the path -->> files without any Bytes ????
it looks like this
#!/usr/bin/perl
use strict;
use CGI;
my $directory = "../files/";
my $q = new CGI;
print $q->header, $q->start_html('Upload');
my ($filename) = $q->param('file') || "";
my $serverFile = $directory . (split(/[\\\/]/, $q->param('file')))[-1];
if (-e $serverFile){
print ("Datei existiert bereits\n");
}
else {
print ("Datei geschrieben: $serverFile<BR>\n");
my $buffer;
open (FILE,">$serverFile");
while (my $bytesread=read($filename,$buffer,1024)) {
print FILE $buffer;
}
close (FILE);
}
print $q->end_html;
if someone have an idea it will be greatfull
thanx
Beni
i still have the same problem I use a perl-script to upload pictures but just the name of the picture for example "picture.gif" is written in the path -->> files without any Bytes ????
it looks like this
#!/usr/bin/perl
use strict;
use CGI;
my $directory = "../files/";
my $q = new CGI;
print $q->header, $q->start_html('Upload');
my ($filename) = $q->param('file') || "";
my $serverFile = $directory . (split(/[\\\/]/, $q->param('file')))[-1];
if (-e $serverFile){
print ("Datei existiert bereits\n");
}
else {
print ("Datei geschrieben: $serverFile<BR>\n");
my $buffer;
open (FILE,">$serverFile");
while (my $bytesread=read($filename,$buffer,1024)) {
print FILE $buffer;
}
close (FILE);
}
print $q->end_html;
if someone have an idea it will be greatfull
thanx
Beni