Help for this page

Select Code to Download


  1. or download this
           $filename = $query->param('uploaded_file');
    
  2. or download this
        # Read a text file and print it out
        while (<$filename>) {
    ...
        while ($bytesread=read($filename,$buffer,1024)) {
           print OUTFILE $buffer;
        }
    
  3. or download this
         $fh = $query->upload('uploaded_file');
         while (<$fh>) {
           print;
         }
    
  4. or download this
           $filename = $query->param('uploaded_file');
           $type = $query->uploadInfo($filename)->{'Content-Type'};
           unless ($type eq 'text/html') {
          die "HTML FILES ONLY!";
           }