Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Any kind of help would be greatly appreciated...$file_name = param('file_name'); &save_file; &Print_Error if($file_name eq ""); &Return_html; sub save_file { open (MYFILE, ">/user/s4/kendo/public_html/write/$file_name" ) + || die $!; while(<$file_name>){ print MYFILE $_; } close(MYFILE); } sub Return_html { print header(); print start_html('Upload Complete'); print "<h1>Your upload is complete!</h1>"; print "$file_name"; print end_html; } sub Print_Error { print header(), start_html('Upload Error!'); print "<p>Field \'File Name\' must be filled in for this script to work properly.</p>\n"; print end_html; exit 0; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File Upload through a form
by Trimbach (Curate) on Oct 28, 2000 at 23:16 UTC | |
|
Re: File Upload through a form
by tune (Curate) on Oct 29, 2000 at 19:59 UTC | |
|
Re: File Upload through a form
by Fastolfe (Vicar) on Oct 30, 2000 at 20:02 UTC |