#!/usr/bin/perl -w use CGI; use strict; my $q = new CGI; print $q->header; print $q->start_html("File Uploaded"); my $file = $q->param('file'); my $up = $q->upload("$file"); while (<$up>) { print; } my $buffer; my $bytesread; # Copy a binary file to somewhere safe open (OUTFILE,">>/var/www/html/fotos/misc/try1.txt"); while ($bytesread=read($file,$buffer,1024)) { print OUTFILE $buffer; } close(OUTFILE); #Always make sure to close the file or it won't work. exit;
what may it be???
CaliloIn reply to Re: Uploading files to server
by Calilo
in thread Uploading files to server
by Calilo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |