¾È³çÇϼ¼¿ä. ÇØÇÇCGI À¥¸¶½ºÅÍ À±¿µ¿õÀÔ´Ï´Ù. ¾Æ·¡ ºÎºÐÀº
sub read_parse { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs){ ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9]) /park("C", hex($1)) /eg; $FORM{$name} = $value; } }
¾Æ·¡ ó·³ ¹Ù²Ù¾î º¸¼¼¿ä. µÇ¾î¾ß µÉÅÙµ¥.... ^^
sub read_parse {
unless ($ENV{'CONTENT_LENGTH'} eq "") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); }
@pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($kname, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; }
$work = $ENV{"QUERY_STRING"}; @pairs_end = split(/&/, $work); foreach $pair (@pairs_end) { ($kname, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $END{$kname} = $value; } }
|