Áö³¹ø¿¡´Â ±â°¡¸·È÷°Ô Çؼ Á˼ÛÇØ¿ä. ³Ê¸ð³ª ¸ô¶ó¼¿ä. ¾î¶»°Ô ÇÁ·Î±×·¥À» ®´Âµ¥ ÇÁ·Î±×·¥ ¸¶Áö¸·¿¡ Àßµµ´ÂÁö º¼·Á±¸ »ðÀÔÇÑ ¹®±¸¸¦ »©¸é 500 Internal Server Error°¡ ³³´Ï´Ù. ¾Æ·¡¿¡ ÇÁ·Î±×·¥À» ºÁÁּſä. ºÎŹÇÕ´Ï´Ù. ¸¶Áö¸·ÀÇ print¹®À» »©¸é 500 ¿¡·¯°¡ ³ª¿ä. ºÁÁּſä. #!/usr/local/bin/perl $regireal = "/home2/mis/syrhee/public_html/enro.html"; $date_comm = "/usr/bin/date"; $date = `$date_comm`; chop($date); read (STDIN, $buf, $ENV{ CONTENT_LENGTH }); @pairs = split(/&/, $buf); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/ / /; $value =~ s/%(..)/pack("C",hex($1))/eg; $value =~ s///g; $FORM{$name} = $value; } open(FILE,"$regireal") &pip;&pip; die "Cannot open $regireal $! "; @LINES=; close(FILE); $SIZE=@LINES; open(ENRO,">$regireal") &pip;&pip; die "Cannot open $regireal $! "; for ($i=0 ; $i<=$SIZE ; $i ) { $_=$LINES[$i]; if (//) { print ENRO " "; print ENRO "[$date]"; if ($FORM{ dept }) { print ENRO ",$FORM{ dept }"; } if ($FORM{ realname }) { print ENRO ",$FORM{ realname }"; } if ($FORM{ phone }) { print ENRO ",$FORM{ phone }"; } if ($FORM{ cour1 }) { $temp = $FORM{ cour1 }; if ($temp eq on ){ print ENRO ",Internet"; } } if ($FORM{ cour2 }) { $temp = $FORM{ cour2 }; if ($temp eq on ){ print ENRO ",PP"; } } if ($FORM{ cour3 }) { $temp = $FORM{ cour3 }; if ($temp eq on ){ print ENRO ",Excel"; } } print ENRO "
"; } else { print ENRO $_; } } close(ENRO); #print "content-type:text/html
"; #print " "; ³¡. vi¿¡¼ Â¥°í º¹»çÇؼ indentationÀÌ ¾û¸ÁÀÌ¿¡¿ä. Á˼ÛÇØ¿ä.
|