|
From: Gehrigal - W. <we...@ge...> - 2002-12-02 18:57:03
|
Hi all,
at the moment i am working on a new module for webmin.
In this module the user should be able to upload files.
But there is a bug in my perlscripte, and so the uploaded file will be
allways 0 byte.
.....
my $q = new CGI;
my $file = $q->param("file") || &error( "No File received!");
my $file_name = $q->param("file_name") || & error ( "There was no
Filename!");
my $fh = $q->upload("file");
my $buffer = "";
my $full_filename="$skin_dir"."/"."$file_name";
open(OUTPUT, ">$full_filename");
while (read( $fh, $buffer, 512000) ){ print OUTPUT $buffer;}
close (OUTPUT);
......
Any ideas?
thx
Alex
|