CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
file uploading probelm

 



wickedxter
User

Apr 5, 2001, 7:07 PM

Post #1 of 3 (389 views)
file uploading probelm Can't Post

For some reason when trying to upload files, the files are 0 bytes, and cant figure how to get to work

code:

$file = $q->param('ufile');
$des = $q->param('des')

$filename = $file;
$filename =~ s/^.*(\\|\/)//;
open(NEWFILE,">$UploadDir/filename");
while(read($file,$other,1024)){

print NEWFILE $other;
}
close(NEWFILE);



sleuth
Enthusiast

Apr 7, 2001, 3:03 AM

Post #2 of 3 (380 views)
Re: file uploading probelm [In reply to] Can't Post

 Did you forget the ENCTYPE in your form??

<form method="POST" ENCTYPE="multipart/form-data" action="upload.cgi">

That would make the most sense,

I also attached a file,

Tony



wickedxter
User

Apr 9, 2001, 10:01 PM

Post #3 of 3 (367 views)
Re: file uploading probelm [In reply to] Can't Post

it works, thx !


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives