emilford has asked for the wisdom of the Perl Monks concerning the following question:
edited by boo_radley - title change (was : YAUQ)#!/usr/bin/perl -w use strict; use CGI; my $dir = '../billimages/'; &performUpload($dir); sub performUpload { my ($dir) = @_; my $cgi = new CGI; my $file = $cgi->param("file"); my $i; open (LOCAL, ">$dir$file") or dieNicely("Unable to upload: $!"); while (read($file, $i, 1024)) { print OUT $i; } close (LOCAL); dieNicely("Upload Complete"); } sub dieNicely { print "Content-type: text/html\n\n"; print "$_[0]"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: YAUQ
by pfaut (Priest) on Jan 15, 2003 at 02:02 UTC | |
|
Re: YAUQ
by Zaxo (Archbishop) on Jan 15, 2003 at 02:03 UTC | |
|
Re: YAUQ
by emilford (Friar) on Jan 15, 2003 at 02:31 UTC | |
by pfaut (Priest) on Jan 15, 2003 at 02:42 UTC | |
by Aristotle (Chancellor) on Jan 15, 2003 at 07:50 UTC | |
by emilford (Friar) on Jan 15, 2003 at 12:55 UTC |