in reply to Reading a File Uploaded to a cgi script
First the HTML file (upload.html):
and now the upload.cgi script:<html> <body> <form method=post action="upload.cgi" ENCTYPE="multipart/form-data"> <input type="file" name=foo> <input type="submit"> </form> </body> </html>
#!/bin/perl use CGI; my $self=new CGI; print $self->header; for $a ($self->param()) { print "$a ... ",$self->param($a),"<br>"; } $fh=$self->param('foo'); print while $_=<$fh>;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Reading a File Uploaded to a cgi script
by rhowerton (Novice) on Mar 13, 2001 at 23:50 UTC |