½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > Ä¿¹Â´ÏƼ > Áú¹®°ú´äº¯ »ó¼¼º¸±â
Ä¿¹Â´ÏƼ ±¸Àα¸Á÷
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
javascript
php
ASP
css
mysql
html
jquery
image
Mobile
API
slide
°Ô½ÃÆÇ
¸Þ´º
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
°Ô½ÃÆÇŸÀÌƲ Áú¹®°ú´äº¯ / »ó¼¼º¸±â
Æ®À§ÅÍ·Î º¸³»±â
Ãßõ¼ö 28 | Á¶È¸¼ö 653 | µî·ÏÀÏ 2001-01-08 10:50:57

´Ð³×ÀÓ

vopos

À̸ÞÀÏ

vopos@happycgi.com

Á¦¸ñ

[´äº¯] ÀÌ ÄÚµå Çؼ®ÀÌ ¾ÈµÇ¿ä... ¤Ð.¤Ð
³»¿ë
¾È³çÇϼ¼¿ä, HappyCGI ÆÀÀÇ voposÀÔ´Ï´Ù. >¾È³çÇϼ¼¿ä. >¾Æ·¡ Äڵ尡 ¹«½¼¶æÀÎÁö ¿µ ÀÌÇØ°¡ ¾È°¡´Â ºÎºÐÀÌ ¿©·¯°³ À־¿ä.. . >±¸ÂúÀ¸½Ã´õ¶óµµ °¡¸£ÃÄ ÁÖ¼ÌÀ¸¸é °¨»çÇÏ°Ú½À´Ï´Ù. > >[1] s///¿¡¼­ °¡¿îµ¥ ºÎºÐ "cM"°ú " >+"°¡ ¹» ÀǹÌÇϴ°ÇÁö ¸ð¸£°Ú¾î¿ä. > >$FORM{ comments } =~ s/cM//g; >$FORM{ comments } =~ s/ +/
/g; cMÀº µµ½º/À©µµ¿ìÁî¿¡¼­ »ý¼ºµÇ´Â °³Ç๮ÀÚ(newline character) ÄÚµåÀä, ±×³ð À» Á¦°ÅÇÏ´Â °ÍÀÔ´Ï´Ù. "+" °°Àº Ư¼ö¹®ÀÚ¸¦ "meta-character"¶ó°í ¾ê±â¸¦ ÇÏ´Â °Í °°Àºµ¥ Àǹ̴ "+"¾Õ¿¡ ³ª¿À´Â ¹®ÀÚ¸¦ Æ÷ÇÔÇؼ­ Çϳª¶Ç´Â ÇϳªÀÌ»óÀÇ ¹®ÀÚ¸¦ ÀǹÌÇÕ´Ï´Ù. " " " " " " µîÀÌ ¸ÅÄ¡µÇ°Ú½À´Ï´Ù. >[2] °¡Àå¾Æ·§ºÎºÐ "$value =~ s///g;"°¡ ¾Æ¸¶µµ Á¦°¡ º¸±â¿¡´Â htmlÄڵ带 Á¦°ÅÁÖ´Â ¿ªÇÒÀ» ÇÏ´Â°Í °°Àºµ¥ ÀÌ°ÍÀÌ Á¤È®È÷ ¾î¶»°Ô Çؼ­ Á¦°ÅÇØ Áִ°ÇÁö ¸ð¸£°Ú¾î¿ä. > >$value =~ tr/+/ /; >$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; >$value =~ s///g; > >[3] s///¿¡¼­ °¡¿îµ¥ ºÎºÐÀÎ "^s+"°ú "s+$"ÀÌ ÀÌÇØ°¡ ¾È°¡¿ä >$list=~ s/^s+//; >$list=~ s/s+$//; Á¤È®È÷ ¾Ë°í ½ÍÀ¸½Ã¸é Á¤±ÔÇ¥Çö½Ä(regular expression)¿¡ ´ëÇØ °øºÎÇغ¸¼¼¿ä. http://www.happycgi.com/forum/forum_detail.cgi?thread=6141r02&category=À¥ÇÁ·Î±×·¥_°ü·Ã/PHP_°ü·Ã/PHP_Áú¹®°ú_´äº¯ >[4] ¸¶Áö¸· if¹®¿¡ ´ëÇؼ­ ÄÚ¸ÇÆ®¸¦ ºÎŹÇÕ´Ï´Ù. ÀÌ°ÍÀº À¯¸íÇÑ way-boardÀÇ µ¥ÀÌÅÍ ÆÛ½Ì ·çƾÀε¥ if¹® Á¶°ÇÀ¸·Î ¾²ÀÎ "defined($Field{$name})"ÀÌ ¹ºÁö ÀÌÇØ°¡ ¾È°©´Ï´Ù. define()ÇÔ¼ö°¡ ¾²Àεí Çѵ¥ ÀÌ·± ÇÔ¼öÀÇ ¾²ÀÓ»õ¸¦ ã¾Æº¼·Á¸é ¾îÂîÇØ¾ß Çϳª¿ä? defined function¿¡ ´ëÇÑ ¼³¸íÀ» Àо¼¼¿ä. http://www.perl.com/pub/doc/manual/html/pod/perlfunc/defined.html >sub input_data { > >if ($ENV{ REQUEST_METHOD } eq GET ) { >@pairs = split(/&/, $ENV{ QUERY_STRING }); >} >elsif ($ENV{ REQUEST_METHOD } eq POST ) { >read(STDIN, $buffer, $ENV{ CONTENT_LENGTH }); >@pairs = split(/&/, $buffer); >} >else { >exit; >} > >foreach $pair (@pairs) { > >local($name, $value) = split(/=/, $pair); > >$name =~ tr/+/ /; >$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; > > >$value =~ tr/+/ /; >$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; >$value =~ s///g; > >if (defined($Field{$name})) { >$Field{$name} = $value; >} >else { >if ($Field{$name} && $value) { >$Field{$name} = "$Field{$name}, $value"; >} >elsif ($value) { >$Field{$name} = $value; >} >} >} > >} > > >ÈÞ¿ì~~~ ÀÌ»óÀÔ´Ï´Ù. ¾Æ¸¶µµ ±²ÀåÈ÷ Ãʺ¸ÀûÀÎ Áú¹®Àε¥ ÀúÀÇ ¸¶À½Àº Áö±Ý ÄÚ³¢¸® ´Ù¸® ¸¸Áö´Â ±âºÐÀÔ´Ï´Ù.±ÍÂúÀ¸½Ã°ÚÁö¸¸ Á¶±Ý¸¸ µµ¿ÍÁֽŴٸé Àú¿¡°Ô´Â Á¤¸» ¸¹Àº µµ¿òÀÌ µÇ°Ú½À´Ï´Ù. >°¨»çÇÕ´Ï´Ù. ÇØÇÇ CGI¿Í ÇÔ²² ÇູÇÑ ½Ã°£ µÇ±æ ¹Ù¶ø´Ï´Ù. °¨»çÇÕ´Ï´Ù. - vopos
Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
ÀÌÀü°Ô½Ã±Û ¿Ü±¹°èÁ¤À» »ç¿ëÇÒ¶§.. 2001-01-08 09:57:58
´ÙÀ½°Ô½Ã±Û ÆÄÀÏ Ã·ºÎ ±â´É¿¡¼­.... 2001-01-08 21:52:19