in reply to Re: CGI.pm: "Malformed UTF-8 character" in apache's error.log
in thread CGI.pm: "Malformed UTF-8 character" in apache's error.log
does not work (same error) so switching the filehandle/STDIN (I tried both) just before storing the file does not seem to be possible after giving perl the -CS switch.#!/usr/bin/perl -CS use CGI; use CGI::Carp qw(fatalsToBrowser); my $cgi = new CGI; my $filename = $cgi->param('file'); my $fh = $cgi->upload('file'); binmode $fh; open(OUTPUT, ">/var/www/mypath/$filename") or die $!; while(<$fh>) { print OUTPUT $_; } print $cgi->header(); print "$file has been successfully uploaded... thank you.\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: CGI.pm: "Malformed UTF-8 character" in apache's error.log
by ikegami (Patriarch) on Feb 26, 2008 at 19:17 UTC |