in reply to Re: Uploading files to server
in thread Uploading files to server
while (<$file>) { print;
Just the second part:
# Copy a binary file to somewhere safe open (OUTFILE,">>/usr/local/web/users/feedback"); while ($bytesread=read($file,$buffer,1024)) { print OUTFILE $buffer; } close(OUTFILE); #Always make sure to close the file or it won't work.
Also make sure that the directory you write to has write permissions by the webserver and finally make sure the HTML form you have to do the uploading has type="multipart/form-data" in the form tag.
Hope that helps. UPDATE: That should be enctype="multipart/form-data"
|
|---|