This will give you the form. $script is the name of the cgi script that will
actually do the uploading.
use CGI;
$query = new CGI;
print $query->start_multipart_form(POST,"$script",);
print '<P>Enter the file to be uploaded: ',"\n";
print $query->filefield( -name=>"FILE");
print ' ',"\n";
print $query->submit( -name=>'SUBMIT',
-value=>'Submit');
print $query->endform;
##############################
This is the part of the $script that will do the actual uploading.
open (OUTFILE,">$filename");
while ($bytesread=read($file,$buffer,1024)) {
print OUTFILE $buffer;
}
> -----Original Message-----
> From: Eric Wang [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 31, 2001 12:20 PM
> To: [EMAIL PROTECTED]
> Subject: uploading files via web
>
>
> Hi guys,
> I have a quick question, how do I enable my webpage to be
> able to browse
> the users computer and allow him/her to upload files into the server?
> is there a particular CGI module? or what's the deal?
>
> Thanks!!
> Eric
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]