· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Linuxdoc Sgml/Apache MySQLPHP_Guide-KLDP

1.2 À¥ ¼­¹öÀÇ Á¾·ù

´ëÁßÀÇ Àα⸦ ²ø¾ú´ø À¥ ¼­¹öÀÇ Á¾·ù´Â Apache , IIS, Netscape, NCSA, WebSTAR , CERN, MacHTTP·Î ¿ä¾àÇÒ ¼ö ÀÖ½À´Ï´Ù.

  • Apache - À¯´Ð½º ±â¹ÝÀÇ À¥ ¼­¹ö·Î ¹ßÀü ÇßÀ¸¸ç ¸¶ÀÌÅ©·Î¼ÒÇÁÆ® À©µµ¿ì ȯ°æµµ Áö¿øÇÕ´Ï´Ù.   ÇöÁ¸ ÇÏ´Â ¼­¹ö Áß °¡Àå ¸¹Àº Á¡À¯À²À» °¡Áö°í ÀÖ½À´Ï´Ù.
  • IIS(Internet Information Server) - NT ±â¹ÝÀÇ À¥ ¼­¹öÀ̸ç ÁÖ·Î »ç¿ëµÇ´Â ½ºÅ©¸³Æ® ¾ð¾î´Â ASPÀÔ´Ï´Ù.   ÇÏÁö¸¸ ÃÖ±Ù¿¡´Â PHP¿ÍÀÇ Á¢¸ñµµ ÀÌ·ç¾îÁö°í ÀÖ½À´Ï´Ù.
  • NCSA - À¯´Ð½º ±â¹ÝÀÌ°í ¾ÆÆÄÄ¡ À¥ ¼­¹öÀÇ Ãʱ⠸ðµ¨À̸ç ÇöÀç´Â ¾ÆÆÄÄ¡ À¥ ¼­¹ö¿"Ô ÀÚ¸®¸¦ ¹°·ÁÁØ »óÅÂÀÔ´Ï´Ù.
  • Netscape, CERN - À¯´Ð½º ±â¹ÝÀ̸ç ÇöÀç Apache¿¡ ¹Ð·Á »ç¿ëÀÚ°¡ Çö°ÝÈ÷ °¨¼ÒÇÑ »óÅ ÀÔ´Ï´Ù.   ÇöÀç °¢ À¥ ¼­¹öÀÇ »ç¿ëÀÚ ÃþÀ» È®ÀÎÇÒ ¶§ Apache À¥¼­¹ö°¡ ³ª¸ÓÁö À¥ ¼­¹öÀÇ »ç¿ëÀÚ¸¦ ¸ðµÎ ÇÕÇÑ °ÍÀ» ³Ñ¾î¼± »óÅÂÀÔ´Ï´Ù.

1.3 À¥ ¼­ºñ½ºÀÇ Á¾·ù

À¥ ¼­ºñ½ºÀÇ Á¾·ù´Â ´Ù¾çÇÑ »ç¿ëÀÚÀÇ ¿å±¸¿Í À̸¦ ¸¸Á· ½ÃÅ°±â À§ÇÑ °³¹ßÀÌ Áö¼ÓÀûÀ¸·Î ÀÌ·ç¾îÁö´Â ÇÑ °è¼ÓÇؼ­ Áõ°¡ ÇÒ °Í ÀÔ´Ï´Ù.    ¹°·Ð °°Àº ¼­ºñ½º¶óµµ °æÀïÀ» À§ÇØ Â÷º°È­¸¦ Ãß±¸ÇÒ °ÍÀÔ´Ï´Ù.    À¥ ¼­ºñ½ºÀÇ ¿¹¸¦ º¸¸é ¿©·¯ °¡Áö ÄÜÅÙÃ÷¸¦ ÀÌ¿ëÇÑ ´ÙÁß ¼îÇÎ ¸ô(ÀüÀÚ Á¦Ç°, °¡Á¤ ¿ëÇ°, ÀÇ·ù, ÀâÈ­)¿¡¼­ ÇÑ°¡Áö »óÇ°À» ƯȭÇÑ(³ó»ê¹°, MP3, °ø¿¬ ¿¹¸Å, ½ºÆ÷Ã÷ ¿ëÇ°¡¦)»çÀÌÆ® °¢ °³ÀÎÀÇ Á¤º¸¿Í ¿©·¯ °¡Áö µð·ºÅ丮 ¼­ºñ½º, ÀϹÝÀûÀÎ ÀÚ·áÀÇ °øÀ¯¿Í Á¤º¸ ±³È¯ »çÀÌÆ® µî ¿©·¯ ¹æ½ÄÀÌ Á¸Àç ÇÕ´Ï´Ù.    ¹°·Ð ÀÌ°ÍÀº Â÷º°È­¸¦ À§ÇÑ ÇϳªÀÇ ¹æÆí ÀÔ´Ï´Ù.    Â÷º°È­¸¦ À§Çؼ­´Â µðÀÚÀεµ Áß¿äÇÏÁö¸¸ ³»¿ëÀÌ ¿ì¼±ÇØ¾ß µË´Ï´Ù.    ÁÁÀº ¿¹·Î ´º¿å ŸÀÓÁ º¸¸é ¾Ë ¼ö ÀÖ½À´Ï´Ù.    Áï, ÀÎÁöµµ¿¡ ÀÇÇÑ ÇØ´ç ¼îÇÎ ¸ôÀÇ Àα⵵°¡ Áß¿äÇÑ ¿ªÇÒÀ» ÇÕ´Ï´Ù.    À̸¦ ±Øº¹ÇÏ´Â °ÍÀº ¿ÀÁ÷ Â÷º°È­ ÀÔ´Ï´Ù.

´ÙÁß ¼îÇθôÀÇ ¿¹

Ưȭ ¼îÇÎ ¸ôÀÇ ¿¹

1.4 ÀüÀÚ »ó°Å·¡

°¡Àå Æ÷°ýÀûÀ¸·Î »ý°¢ÇÏ´Â ÀüÀÚ »ó°Å·¡ÀÇ Àǹ̴ ÀÎÅͳÝÀ» ÀÌ¿ëÇÏ¿© µ·¿¡ ÇØ´çÇÏ´Â ¹°°ÇÀ» ÁÖ°í ¹Þ´Â °ÍÀÔ´Ï´Ù.    µ·ÀÇ °¡Ä¡¸¦ Áö´Ñ ÀüÀÚÈ­Æó¸¦ ÁÖ°í ¿øÇÏ´Â ¹°°ÇÀ» »ì ¼öµµ ÀÖ½À´Ï´Ù.    ´Ù½Ã ¸»ÇØ ³×Æ®¿öÅ©¸¦ ÅëÇÑ »óÇ°ÀÇ °Å·¡ÀÌ¸ç ±¤°í, ±âŸ ¸ðµç ¼­ºñ½ºÀÇ ±¸¸Å È°µ¿ µîÀ» ¸»ÇÕ´Ï´Ù.    ÀÌ°ÍÀº ½Ç¹° °æÁ¦¿Í´Â ´Ù¸¥ ¶Ç ´Ù¸¥ °æÁ¦ ÇüÅ°¡ µÉ °ÍÀÔ´Ï´Ù.    ÇÏÁö¸¸ ¾ÆÁ÷ ÀÌ·¯ÇÑ ÀüÀÚ È­ÆóÀÇ ÁöºÒ°ú ¹°°Ç ±¸ÀÔÀº ÀÌ·ç¾îÁöÁö ¾Ê½À´Ï´Ù.    ´Ù¸¸ »çÀ̹ö ¸Ó´Ï °³³äÀÇ ¼Ò¾×ÀüÀÚÈ­Æó µîÀ» ÀÌ¿ëÇÑ À̺¥Æ®Çü½ÄÀÇ ¹°°Ç °Å·"¡ ÀÌ·ç¾îÁö°í ÀÖ½À´Ï´Ù.

1.5 ÀüÀÚ »ó°Å·¡ÀÇ ¹®Á¦Á¡

½Å¿ëÄ«µå¸¦ ÀÌ¿ëÇϰųª ÀºÇà Áö·Î ¹øÈ£¸¦ ÅëÇÑ µ·ÀÇ °Å·¡´Â È°¹ßÈ÷ ÀÌ·ç¾î Áö°í ÀÖÁö¸¸ Á¤ÀÛ ÀüÀÚ È­ÆóÀÇ ÀÌ¿ëÀº ¾ÆÁ÷ º¸¾È°ú ¿©·¯ ´Ù¸¥ ¿©·¯°¡Áö ÀÌÀ¯·Î ÀÎÇØ °³¹ßÀÌ ´Ê¾î Áö°í ÀÖ½À´Ï´Ù.    ¸¸¾à ÀÌ·¯ÇÑ ¿©Å¸ÀÇ ¹®Á¦µéÀÌ ÇØ°á µÈ´Ù¸é ÀÎÅÍ³Ý ¼îÇθôÀº ÇÑÃþ ÀαⰡ »ó½ÂÇÒ °Í ÀÔ´Ï´Ù.    ÀüÀÚ È­ÆóÀÇ ±Ùº»ÀûÀÎ ¹®Á¦´Â ¹°·Ð µ·ÀÇ ¹ßÇà, ÀÌÁß¼º , ÅëÈ­ , º¹Á¦ µî ¿©·¯°¡Áö°¡ ÀÖÀ» ¼ö ÀÖ½À´Ï´Ù.    ÀÌ·¯ÇÑ ¹®Á¦Á¡ÀÌ ÇØ°áµÇ°í ¾ÈÁ¤ÀûÀÎ ÀüÀÚ °áÀç°¡ ÀÌ·ç¾î Áø´Ù¸é ÀºÇàÀÇ ¿ªÇÒ ¿ª½Ã °¨¼ÒÇÒ °ÍÀÔ´Ï´Ù.    ÀÌ°ÍÀº °¢ ÀºÇàÀÇ ¼ö¼ö·á ¼öÀÔÀÇ °¨¼Ò¿Í ÀÚ±Ý Á¶´Þ ¹æ¹ý ¶ÇÇÑ »õ·Î¿ö Áö°Ô Çϱ⠶§¹® ÀÔ´Ï´Ù.    ¼¼°èÀûÀ¸·Î ÀÌ·¯ÇÑ ÀüÀÚ »ó°Å·¡ÀÇ Ç¥ÁØÈ­ ÀÛ¾÷Àº °¢±¹ÀÇ µ¶Æ¯ÇÑ ¹æ½ÄÀ¸·Î ÁøÇà ÁßÀ̸ç, ½ÃÀåÀ» ¼±Á¡Çϱâ À§ÇØ Ä¡¿­ÇÑ ³ë·ÂÀ» ÇÏ°í ÀÖ½À´Ï´Ù.

ÀüÀÚ »ó°Å·¡ °ü·Ã »çÀÌÆ®

ÀüÀÚ»ó°Å·¡ À§¿øȸ - http://www.ecc.or.kr/

<TIP>----------------------------------------------------------------------------

ÀüÀÚ»ó°Å·¡ ÀÚ°ÝÁõ

ÀüÀÚ»ó°Å·¡ À§¿øȸ¿¡¼­´Â ÀüÀÚ»ó°Å·¡ °ü¸®»ç ÀÚ°ÝÁõÀ» ½Å¼³ÇßÀ¸¸ç ÀÌ·Î º¸´Ù Àü¹®ÀûÀ¸·Î »çÀÌÆ®¸¦ ±¸¼ºÇÏ°í ÁÖµµÇÏ´Â ÀηÂÀ» ¹èÃâÇÒ °ÍÀÔ´Ï´Ù.    º¸´Ù ÀÚ¼¼ÇÑ ³»¿ëÀº ÇØ´ç »çÀÌÆ®¸¦ ¹æ¹®Çϸé Á¤º¸¸¦ ¾òÀ» ¼ö ÀÖ½À´Ï´Ù. http://www.ecc.or.kr/

°ü·Ã °ú¸ñ

----------------------------------------------------------------------------------------------------

1.6 ÀüÀÚ »ó°Å·¡ µ¿Çâ°ú °³¼±ÇÒ ºÎºÐ

Çѱ¹ Àü»ê¿øÀÇ Åë°è¿¡ µû¸£¸é 1999³â ±âÁØÀ¸·Î ±¹³» ¼îÇÎ ¸ô »çÀÌÆ®ÀÇ ¼ö´Â 400°³¿¡ À°¹ÚÇϸç ÇöÀç °èȹ ÁßÀ̰ųª È°µ¿ÁßÀÎ »çÀÌ °è¼Ó Áõ°¡ÇÏ´Â Ãß¼¼ ÀÔ´Ï´Ù.    °¢ ¼îÇÎ ¸ôÀÇ °æ¿ì ÀÎÁöµµ¿¡ µû¶ó ¼­ºñ½º ÄÜÅÙÃ÷¿¡ µû¶ó È°µ¿ÀÌ È°¹ßÇÑ »çÀÌÆ®´Â ÀϺΠÀÔ´Ï´Ù.    ´ëÇ¥ÀûÀ¸·Î À¯´ÏÇöóÀÚ , »ï¼ºÀÎÅÍ³Ý ¼îÇθô , ·Ôµ¥ ¹éÈ­Á¡À» µé ¼ö ÀÖ½À´Ï´Ù.    ±¹³»ÀÇ ÀüÀÚ »ó°Å·¡ ±Ô¸ð´Â 600¾ï Á¤µµÀÇ ±Ô¸ð·Î ¿¹»ó ÇÏ¸ç º»°ÝÀûÀÎ ÀüÀÚ »ó°Å·"¡ ÀÌ·ç¾î Áö¸é ±âÁ¸ÀÇ ½ÃÀåÀ» À§ÇùÇÒ ¼öÁØ¿¡ µµ´ÞÇÒ °ÍÀ¸·Î º¸ÀÔ´Ï´Ù.    ÀÌ·¯ÇÑ ¼öÁØ¿¡ µµ´Þ Çϱâ À§Çؼ­´Â Ç¥ÁØÈ­°¡ ÀÌ·ç¾î Á®¾ß µÇ°í º¸¾È , À¯Åëä³ÎÀÇ ´Ùº¯È­ µî ¿©·¯ °¡Áö °³¼±ÇÒ ºÎºÐµéÀÌ Á¸ÀçÇÕ´Ï´Ù.    ¹«¾ùº¸´Ù ¼öÀͼº ÀÖ´Â ÄÜÅÙÃ÷ °³¹ß ¶ÇÇÑ Áß¿äÇÑ ºÎºÐ ÀÔ´Ï´Ù.

1.7 ¸¶¹«¸®

ÀÌ Àå¿¡¼­´Â PHP¸¦ Á¢Çϱâ Àü¿¡ À¥¼­¹ö Á¾·ù¿¡ ´ëÇؼ­ °£·«È÷ »ìÆì º¸¾Ò½À´Ï´Ù.    ÇöÀç °¡Àå °¢±¤ ¹Þ´Â ¼îÇÎ ¸ô°ú À̸¦ À§ÇÑ ÀüÀÚ »ó°Å·¡¿¡ °üÇÑ °ÍÀ» º¸¾Ò½À´Ï´Ù.    ´ÙÀ½ Àå¿¡¼­´Â À¥¼­¹ö ±¸Ãà¿¡ ÇÊ¿äÇÑ Apache , Php , Mysql¸¦ ¾Ë¾Æº¸°Ú½À´Ï´Ù.

2. À¥¼­¹ö ±¸Ãà¿¡ ÇÊ¿äÇÑ °Íµé (PHP , APACHE , MYSQL)

2.1 Apache , Php , Mysql ¼Ò°³

À¥ °³¹ß¿¡´Â ¸¹Àº µµ±¸°¡ ÇÊ¿äÇÕ´Ï´Ù.    Çϵå¿þ¾î¸¦ ºñ·ÔÇÏ¿© ¼ÒÇÁÆ®¿þ¾î¿¡¼­µµ ±× Á¾·ù´Â ¸¹½À´Ï´Ù.    Å©°Ô À¥¼­¹öÇÁ·Î±×·¥, µ¥ÀÌÅͺ£À̽º ±×¸®°í, °³¹ß ¾ð¾îÀÔ´Ï´Ù.    ¸ðµç ¿î¿µÃ¼Á¦¿¡¼­ À¥¼­¹ö¸¦ ±¸ÃàÇÒ ¼ö ÀÖ°í ¶ÇÇÑ °ø°³ ÇÁ·Î±×·¥À̸鼭µµ ±â´ÉÀÌ ¶Ù¾î³­ ¾ÆÆÄÄ¡ À¥¼­¹ö¿Í Mysql µ¥ÀÌÅͺ£À̽º, PHP ¾ð¾î¿¡ °üÇÏ¿© ¼Ò°³¸¦ ÇÏ°Ú½À´Ï´Ù.

Apache À¥ ¼­¹ö

¾ÆÆÄÄ¡ À¥ ¼­¹ö´Â ´ëÁßÀÇ ÈûÀ» ¹ÙÅÁÀ¸·Î °¡Àå Å« ÀÎÁöµµ¸¦ ¾òÀ» ¸¸Å­ »ç¿ëÀÚ°¡ À̲ø¾î °¡´Â ¼­¹ö ÀÔ´Ï´Ù.    ¿©Å¸ÀÇ »ó¿ë ¼­¹ö¸¦ ¹ÐÄ"íí ¿ì¶Ò ¼³ ¼ö ÀÖ¾ú´ø ÀÌÀ¯´Â ¿ÀÇ ¼Ò½º °³¹ß¿¡ µû¸¥ º¸´Ù ºü¸¥ »ç¿ëÀÚ Áß½ÉÀÇ °³¹ß·Î ÀÎÇÑ ¼ö¸¹Àº °³¹ßÀÚÀÇ ÇÕ·ù ÀÔ´Ï´Ù.    ¹«¾ù º¸´Ù »ó¿ë ¼­¹ö¿¡ µÚÁöÁö ¾Ê´Â ½Å¼ÓÇÑ ¹ö±× PATCH¿Í ²÷ÀÓ¾ø´Â ¼ö¸¹Àº °³¹ßÀÚÀÇ Áö¿ø°ú ¾ÈÁ¤¼º ÀÔ´Ï´Ù.    ÀÌ·¯ÇÑ Á¡À¸·Î À¥ ¼­¹ö ½ÃÀå¿¡¼­ ´Ù¸¥ ¼­¹ö¿Í ºñ±³ÇØ À¥ ¼­¹ö ½ÃÀå¿¡¼­ °ú¹Ý¼ö ÀÌ»óÀÇ Á¡À¯À²À» º¸ÀÌ°í ÀÖ½À´Ï´Ù.

°ø½Ä ¾ÆÆÄÄ¡ »çÀÌÆ® ¿Ü¿¡ °¢ ±¹°¡º° ±×·ìº°·Î »çÀÌÆ®°¡ Á¸Àç Çϴµ¥ Çѱ¹ ¾ÆÆÄÄ¡ ±×·ì¿¡ °¡¸é ÇѱÛÈ­ µÈ ¾ÆÆÄÄ¡ ¼­¹öÀÇ ÃֽŠÁ¤º¸¿Í ±â¼úÀûÀÎ ¹®Á¦¸¦ º¼ ¼ö ÀÖ½À´Ï´Ù.

Apache À¥ ¼­¹öÀÇ ¿ª»ç

¾ÆÆÄÄ¡ ÇÁ·ÎÁ§Æ®ÀÇ ½ÃÀÛÀº óÀ½ 1995³â°æ ´ëÁßÀÇ »ç¶ûÀ» ¹Þ´ø NCSAÀÇ °³¹ßÀÚÁß ÀϺΰ¡ ¸ð¿© ½ÃÀÛ Çß½À´Ï´Ù.    ÀÌ°ÍÀ» ½Ã¹ß·Î NCSA HTTPD °³¹ßÀÚ¿Í ¾ÆÆÄÄ¡ °³¹ßÀÚµéÀÌ ÇÕ·ùµÇ°í ÀÌÀü¿¡ ¸¸µé¾îÁ³´ø ¾ÆÆÄÄ¡ 0.6.2¸¦ ¿ÏÀüÈ÷ °³¼±ÇÑ 0.8.8À», ±×¸®°í ¾ÆÆÄÄ¡ 1.0À» 1995³â10¿ù¿¡ ¸¸µé¾î ³Â½À´Ï´Ù.    ¾ÆÆÄÄ¡ ¼­¹ö´Â ´Ü±â°£¿¡ ±âÁ¸ÀÇ NCSA ÀÚ¸®¸¦ ¹ÐÄ"í ¼±µÎ¿¡ ¿Ã¶ú½À´Ï´Ù.    ÀÌ »ó½Â¼¼´Â Áö±Ýµµ °è¼Ó ÁßÀÌ¸ç ´Ù¸¥ ¿©Å¸ÀÇ ¼­¹ö°¡ ³Ñº¸Áö ¸øÇÏ´Â ÀÚ¸®¿¡ ÀÖ°Ô µÇ¾ú½À´Ï´Ù.    ÀÌ°ÍÀº ¹°·Ð Á÷Á¢ °ü¿©ÇÏ´Â °³¹ßÀÚ ÀÌ¿Ü¿¡ Àü¼¼°è ¾ÆÆÄÄ¡ ±×·ì ¹× »ç¿ëÀÚµéÀÌ Ç×»ó Å×½ºÆ® ÇÏ°í ÆÐÄ¡ÇÏ´Â ÀÛ¾÷ÀÇ °á°úÀÔ´Ï´Ù.    ´Ù¸¥ ¼­¹ö°¡ ³Ñº¸Áö ¸øÇÏ´Â ºÎºÐÀÌ ÀÌ·± ¿ÀÇ ¼Ò½º °³¹ßÀÏ °ÍÀÔ´Ï´Ù.    ¾ÆÆÄÄ¡´Â ¸ØÃßÁö ¾Ê´Â °ÍÀÔ´Ï´Ù. ´©±º°¡ ¸ØÃß·Á Çصµ Àý´ë ¸ØÃßÁö ¾Ê´Â Áö¼ÓÀûÀÎ °³¹ßÀÌ ÀÌ·ç¾î Áö´Â °ÍÀÔ´Ï´Ù.

Apache GUI Tool

¾ÆÆÄÄ¡¸¦ »ç¿ëÀÚ Áß½ÉÀÇ À¥ ¼­¹ö·Î ¸¸µå´Â ³ë·Âµµ ÁøÇà ÁßÀÔ´Ï´Ù.    GUI ÇÁ·ÎÁ§Æ® Áï, ÄÚ¸¸Ä¡ ÇÁ·ÎÁ§Æ®¶ó ºÒ¸®´Â ÀÌ ÀÛ¾÷Àº ¾ÆÆÄÄ¡ÀÇ ¿î¿ëÀ» ±×·¡ÇÈÀûÀ¸·Î ÇÒ ¼ö ÀÖ°Ô ÇÏ´Â °ÍÀÔ´Ï´Ù.    ¸¹Àº ºÎºÐÀÌ ¿Ï¼º µÇ¾ú°í ¸®´ª½º ¹èÆ÷ÆÇ¿¡µµ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù.    ¾ÆÆÄÄ¡ ¼­¹ö´Â ¸ðµç ¼³Á¤ÀÌ ÅؽºÆ® ÆÄÀÏÀÎ httpd.conf¸¦ ¼öÁ¤ÇÏ´Â ¹æ¹ýÀ̱⠶§¹®¿¡ ´Ù¼Ò ±×·¡ÇÈ È¯°æ¿¡ Àͼ÷ÇÑ »ç¶÷¿"Ô´Â ºÒÆíÇÒ ¼öµµ ÀÖ°í Á¢±ÙÇϱ⠱î´Ù·Î¿î ºÎºÐÀÌ Àֱ⠶§¹®¿¡ ÀÌ ÇÁ·ÎÁ§Æ®´Â ¾ÕÀ¸·Î ¾ÆÆÄÄ¡¼­¹öÀÇ ¹ßÀü¿¡ Áß¿äÇÑ ºÎºÐÀ» Â÷ÁöÇÏ°Ô µÉ °ÍÀÔ´Ï´Ù.

ÄÚ¸¸Ä¡ »çÀÌÆ®¿¡¼­ ÄÚ¸¸Ä¡¿¡ °üÇÑ Á¤º¸¿Í °¢ ȯ°æ¿¡ µû¸¥ ÄÚ¸¸Ä¡ ¼³Ä¡ ÆÄÀÏÀ» ´Ù¿î ¹ÞÀ» ¼ö ÀÖ½À´Ï´Ù.

°¢ ȯ°æ¿¡ µû¸¥ Áö¿ø ÆÄÀÏ

  • w Linux binary
  • w Windows 9x/NT/2000 binary
  • w HP-UX PARISC binary
  • w Solaris Sparc binary
  • w Irix MIPS binary

ÄÚ¸¸Ä¡ ¸ÞÀÎÈ­¸éÀ» º¸¸é ±âÁ¸ÀÇ httpd.conf¿¡¼­ÀÇ ¼³Á¤À» Á¤¸» °£´ÜÈ÷ ±ò²ûÇÏ°Ô ¼öÁ¤ ÇÒ ¼ö ÀÖ°Ô °³¹ß µÈ °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.    ÀÌ°ÍÀº ±âÁ¸ÀÇ ÅؽºÆ® ȯ°æ¿¡¼­ ÀÛ¾÷ ÇÏ´ø »ç¶÷ ¶ÇÇÑ ½±°Ô Á¢±ÙÇÏ°Ô µÇ¾î ÀÖ½À´Ï´Ù.

ÄÚ¸¸Ä¡ÀÇ Properties configuration È­¸é

À§ ±×¸²µéÀ» º¸¸é ±âÁ¸ÀÇ ¼³Á¤ÇÏ´Â ºÎºÐÀ» ¾ÆÁÖ ½±°Ô »ý¼ºÇÏ°í ¼öÁ¤ÇÒ ¼ö ÀÖ°Ô µÇ¾î ÀÖÀ½À» ¾Ë ¼ö ÀÖ½À´Ï´Ù.    ÄÚ¸¸Ä¡´Â ¶ÇÇÑ ¿©·¯ ¿î¿µÃ¼Á¦º°·Î ½ÇÇà ÆÄÀÏÀ» Á¦°øÇÏ°í ÀÖÀ¸¸ç °è¼Ó °³¹ß ÁßÀÔ´Ï´Ù.    ¹°·Ð ¾ÆÁ÷ °³¼±ÇÒ Á¡À» ãÀ¸¸ç °è¼Ó °³¹ß ÁßÀÎ À©µµ¿ì¿ë ¾ÆÆÄÄ¡¸¦ Áö¿øÇÏ´Â ÄÚ¸¸Ä¡ ¶ÇÇÑ Á¸ÀçÇÕ´Ï´Ù.

Apache »ç¿ëÀÚ ÇöȲ

Àü¼¼°è À¥ ¼­¹ö ½ÃÀåÀ» º¼ ¶§ ¾ÆÆÄÄ¡ ¼­¹öÀÇ »ç¿ëÀº ¿ùµîÇÕ´Ï´Ù.    ÀÌ°ÍÀº ¹«¾ùº¸´Ù °øÂ¥ÀÓ¿¡µµ ºÒ±¸ÇÏ°í °­·ÂÇÑ ±â´É°ú ºü¸¥ ÆÐÄ¡ µû¸¥ ÀÌÀ¯ÀÔ´Ï´Ù.    (¾ÆÆÄÄ¡ ¼­¹öÀÇ »ç¿ëÀÚ ÇöȲÀº www.netcraft.comÀÇ ÀڷḦ Àοë Çß½À´Ï´Ù.)

netcraft À¥ ¼­¹ö°ü·Ã Åë°è

À§ ±×¸²¿¡¼­ ¾ÆÆÄÄ"¡ ´Ù¸¥ À¥ ¼­¹ö »ç¿ëÀÚ ¼ö¸¦ ¸ðµÎ ÇÕÇÑ °Í º¸´Ù ³ôÀº °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.

À§ ±×¸²µé¿¡¼­ º¼ ¼ö ÀÖµíÀÌ ¾ÆÆÄÄ¡ ¼­¹ö´Â ¹ßÀü¸é¿¡¼­ ±×¸®°í ÃÖ°í »ç¿ë ¼­¹ö¿¡¼­ ¸ðµÎ ¿ùµîÈ÷ ³ôÀ½À» ¾Ë ¼ö ÀÖ½À´Ï´Ù.

À§ ±×¸²Àº ÃÖ±Ù ¸î ³â°£ °¢ ¼­¹öÀÇ º¯È­ ¸ð½ÀÀÔ´Ï´Ù.    2000³â ÇöÀç ¾ÆÆÄÄ¡ ¼­¹ö¸¦ °¡µ¿ ÁßÀÎ µµ¸ÞÀÎÀº 400¸¸°³ ÀÌ»óÀÌ µÇ´Â °É º¼ ¼ö ÀÖ½À´Ï´Ù.

¾ÆÆÄÄ¡¿¡ °üÇÑ ¹®¼­¸¦ Àá½Ã º¸¸é À¥ ÇÁ·ÎÅäÄÝÀÇ µ¶Á¡À» ¸·¾Æ¾ß µÈ´Ù°í ¸»ÇÏ°í ÀÖ½À´Ï´Ù.    ÀÎÅͳݿ¡¼­ ƯÁ¤ ±â¾÷¿¡ ÀÇÇÑ µ¶Á¡ÀÌ ÀÌ·ç¾î Áø´Ù¸é ±×°ÍÀº ÀÎÅͳÝÀÇ ÀÚÀ¯·Î¿ò°ú ÀÚÀ¯ °æÀïÀ» À§¹èÇÏ´Â °ÍÀÔ´Ï´Ù.    ÀÌ·¯ÇÑ ÀÌÀ¯·Î ¾ÆÆÄÄ¡´Â¿ÀÇ ¼Ò½º ÇÁ·ÎÁ§Æ®¸¦ ÁöÇâÇÏ°í, ¹«·á·Î ¹èÆ÷ÇÏ´Â ÀÌÀ¯ Áß¿¡ ÇϳªÀÔ´Ï´Ù.    ÀÌ ½Ã°£¿¡µµ Àü¼¼°è ¼ö¸¹Àº °³¹ßÀÚ¿Í »ç¿ëÀÚµéÀÌ ¾ÆÆÄÄ¡¸¦ º¸¸é¼­ ¹®Á¦Á¡ÀÌ ÀÖ´ÂÁö Á"Ë ÇÏ°í ÀÖÀ» °ÍÀÔ´Ï´Ù.    ÀÚ½ÅÀÌ ¾ÆÆÄÄ¡ ¼­¹ö¿¡ ¸¸Á·ÇÏ°í ±â´É °³¼±À» ¹Ù¶õ´Ù¸é ´º½º ±×·ì¿¡ ¾î¶°ÇÑ ±ÛÀ» ¿Ã·Áµµ µµ¿òÀÌ µÉ °ÍÀÔ´Ï´Ù.    ÀÌ·± ÀÀ´ä ±Û ÇϳªÇϳª°¡ ¾ÆÆÄÄ¡ ¼­¹ö »ç¿ëÀÚ¿Í °³¹ßÀÚµé¿"Ô Áß¿äÇÑ µµ¿òÀÌ µÉ °ÍÀ̸ç ÀÌ·¸°Ô ¹ßÀüÇÑ ÀÌÀ¯ÀÔ´Ï´Ù.

2.2 PHP

PHP ¼Ò°³

PHP´Â óÀ½ À¥ ½ºÅ©¸³Æ® ¾ð¾î¸¦ Á¢ÇÏ´Â ÀÌ¿"Ô º¸´Ù ½¬¿ì¸é¼­ º¸´Ù ºü¸¥ ½Ã°£¿¡ À¥À» ´ÙÀ̳ª¹Í ÇÏ°Ô ¸¸µé¾î ÁÝ´Ï´Ù.    ÀÌ°ÍÀº »¡¸® º¯È­µÇ´Â ÀÎÅÍ³Ý ½ÃÀå¿¡¼­ Áß¿äÇÑ ¿ªÇÒÀ» ÇÏ´Â °ÍÀÔ´Ï´Ù.    ÀÌ·¯ÇÑ PHP(Professional HyperText Preprocessor)´Â ¼­¹ö¿¡¼­ Çؼ®µÇ´Â HTML¿¡ ³»ÀåµÇ¾î µ¿ÀÛÇÏ´Â ½ºÅ©¸³Æ® ¾ð¾îÀÔ´Ï´Ù.    C, Java, Perl µî¿¡¼­ ¸¹Àº ¹®Àå Çü½ÄÀ» ºô·Á¿ÔÀ¸¸ç À¥ ºê¶ó¿ìÀú µîÀ¸·Î ½ÇÁ¦ Äڵ带 º¼ ¼ö ¾ø´Ù´Â °Í¿¡ º¸¾È»ó À¯¸®ÇÑ Á¡µµ ÀÖ½À´Ï´Ù.    ¹«¾ùº¸´Ù ÀÌ ¾ð¾î´Â À¥À» °³¹ßÇÏ´Â ÀÌ¿"Ô º¸´Ù Æí¸®ÇÑ È¯°æÀ» Á¦°øÇØÁÝ´Ï´Ù.    ¶ÇÇÑ CGI ÇÁ·Î±×·¡¹Ö ¾ð¾î(C, Perl)¿Í ASPµéÀÌ ¸¸µé¾î ³Â´ø BBS, À¥¸ÞÀÏ, ¼îÇÎ ¸ô¿¡ À̸£±â±îÁö ´ëºÎºÐÀ» ½±°Ô ¸¸µé ¼ö ÀÖÀ¸¸ç »ó¾÷, ºñ»ó¾÷ÀûÀ¸·Î ¾ó¸¶µçÁö »ç¿ë °¡´ÉÇÑ ¾ð¾îÀÔ´Ï´Ù.    ¼³Ä¡ ȯ°æÀº Linux, Unix, À©µµ¿ì µî ´ëºÎºÐÀÇ ¿î¿µÃ¼Á¦¸¦ Áö¿øÇÕ´Ï´Ù.

PHP°¡ Áö¿øÇÏ´Â µ¥ÀÌÅͺ£À̽º

ÇöÁ¸ÇÏ´Â µ¥ÀÌÅͺ£À̽º¸¦ °ÅÀÇ Áö¿øÇÕ´Ï´Ù.    °£´ÜÇÑ °Ô½ÃÆÇÀ̳ª ¹æ¸í·ÏÀ» ¸¸µé °æ¿ì¶óµµ ¿äÁòÀº µ¥ÀÌÅͺ£À̽º¸¦ »ç¿ëÇÕ´Ï´Ù.    ¹«¾ùº¸´Ù ºü¸£°Ô °Ë»ö °¡´ÉÇϸ鼭 ü°èÀûÀÎ ÀúÀåÀÌ µÇ¹Ç·Î µ¥ÀÌÅÍ °ü¸®°¡ Æí¸®ÇÏ´Ù´Â ÀÌÀ¯ÀÔ´Ï´Ù.    ÇÑ µÎ°³ÀÇ °Ô½Ã¹°ÀÏ °æ¿ì¿Í ¼ö¹é ¼öõ°³ÀÇ °Ô½Ã¹°ÀÌ ÀÖÀ» ¶§, ÈÄÀÚÀÇ °æ¿ì¶ó¸é º¸´Ù Æí¸®ÇÑ »ç¿ë ¹æ¹ýÀº µ¥ÀÌÅͺ£À̽º ±¸ÃàÀÔ´Ï´Ù.    Áö¿øÇÏ´Â DataBASE´Â (Adabas D, Dbase, Oracle, Empress, PostgreSQL, FilePRO, Solid, Informix, Sybase, InterBASE, Velocis, Msql, Unix dbm)µîÀÌ ÀÖÀ¸¸ç, PHP4 ZEND ÀÇ °æ¿ì´Â ´õ È®½ÇÇÑ Áö¿øÀ» º¸Àå ÇÒ °ÍÀ¸·Î º¸ÀÔ´Ï´Ù.    ¾ÕÀ¸·Îµµ µ¥ÀÌÅͺ£À̽º¿ÍÀÇ ½¬¿î ¿¬°á°ú À̽ļº µîÀ¸·Î ¾Ö¿ëÀÚ°¡ ³¯·Î Áõ°¡Çϸ®¶ó º¾´Ï´Ù.

PHPÀÇ ¿ª»ç

PHP´Â 1994³â °¡À» Rasmus Lerdorf¿¡ ÀÇÇØ ¸¸µé¾îÁ³À¸¸ç, ±×ÀÇ È¨ÆäÀÌÁö¿¡¼­ °ø°³µÇ¾î »ç¿ë µÇ±â´Â 1995³â ÃÊ Persnol Home Page Tool¶ó°í ºÒ·ÁÁö¸é¼­ ÀÔ´Ï´Ù.    ÀÌ°ÍÀº ¸î °³ÀÇ ¸ÅÅ©·Î¸¦ °¡Áø Æļ­(¸í·É Çؼ®) ¿£Áø°ú ȨÆäÀÌÁö µÚ¿¡¼­ ¿òÁ÷ÀÌ´Â ¸î °³ÀÇ À¯Æ¿¸®Æ¼·Î ÀÌ·ç¾îÁø °ÍÀ̾ú½À´Ï´Ù.    ¶Ç ´Ù½Ã 95³â Áß¹Ý ÀÌ Æļ­°¡ ÀçÀÛ¼º µÇ¾î PHP/FI Version 2¶ó ºÒ¸®¾î Á³½À´Ï´Ù.    ¶Ç, FI´Â Rasmus°¡ ÀÛ¼ºÇÑ HTML Çü½ÄÀÇ µ¥ÀÌÅ͸¦ Çؼ®ÇÒ ¼ö ÀÖ´Â º°µµÀÇ ÆÐÅ°Áö ¿´´Âµ¥, ±×´Â ÀÌ µÑÀ» ÇÕÃÄ MsqlÀ» Áö¿øÇϵµ·Ï ÇÏ¿© PHP/FI¸¦ ¸¸µé¾î ³Â½À´Ï´Ù.    PHP/FI´Â ¸¹Àº »ç¶÷µéÀÇ °øÇå¿¡ ÈûÀÔ¾î ¹ßÀüÀ» °ÅµìÇßÀ¸¸ç 1996³â ÈÄ¹Ý Àü¼¼°èÀûÀ¸·Î 15,000°³ ÀÌ»óÀÇ À¥»çÀÌÆ®¿¡¼­ »ç¿ëµÇ¾îÁ³°í 1997³â Á߹ݿ£ 50,000Á¤µµ ÀÌ»óÀ¸·Î ´Ã¾î³µ½À´Ï´Ù.    ±×¸®°í ÀÌÇØ PHP/FI´Â Rasmus °³ÀÎÀÌ ¾Æ´Ñ ÆÀ¿¡ ÀÇÇØ °³¹ßµÇ¾îÁ³½À´Ï´Ù.    Zeev Suraski¿Í Andi Gutmans¿¡ ÀÇÇØ ÀçÀÛ¼ºµÇ¾î PHP 3 °¡ ¸¸µé¾îÁ³°í, ÀÌ°ÍÀº ÀÌÀü ¹öÀü¿¡¼­ ¸¹Àº ±â´ÉµéÀ» ¿Å°Ü¿ÔÀ¸¸ç »õ·Î¿î ±â´ÉµéÀ» Ãß°¡ Çß½À´Ï´Ù.    Á¤È®ÇÑ Åë°èÀÚ·á´Â ¾Æ´ÏÁö¸¸ NETCRAFTÀÇ Åë°è ÀڷḦ º¸¸é, ÇöÀç Àü¼¼°è 300,000´ë ÀÌ»óÀÇ À¥ ¼­¹ö¿¡¼­ »ç¿ëÁßÀÔ´Ï´Ù.    ¸¸¾à µµ¸ÞÀο¡¼­ »ç¿ëÁßÀÎ PHP¸¦ º¸¸é µÎ¹è ÀÌ»óÀÌ µÉ °ÍÀÔ´Ï´Ù.    ¾ÕÀ¸·Îµµ ¾ÆÆÄÄ¡ À¥¼­¹öÀÇ Áõ°¡¿Í PHP4 ZENDÀÇ ´Ù¾çÇÑ Æ÷¸Ë Áö¿øÀ¸·Î ´õ Áõ°¡Çϸ®¶ó »ý°¢ÇÕ´Ï´Ù.    (PHP3ÀÇ FAQ¿Í Andi GutmansÀÇ ±ÛÀ» ÂüÁ¶ Çß½À´Ï´Ù)

PHP3¿Í PHP4 ZEND

PHP3¿Í PHP4¸¦ µû·Î ¹è¿ï ÇÊ¿ä´Â ¾ø½À´Ï´Ù.    ´Ù½Ã¸»ÇØ ÀÌ µÑÀº ÇÁ·Î±×·¥ÀÇ »óÀ§ ¹öÀüÀ̶ó°í »ý°¢ÇÏ¸é µÉ °ÍÀÔ´Ï´Ù.    (PHP4 ¾ÕÀ¸·Î ZEND¶óÇÔ) ZEND´Â PHP3°¡ º¸´Ù ´õ ¸¹Àº ±â´ÉÀ» ³Ö±âÀ§ÇØ º¹ÀâÇØÁø ½ºÅ©¸³Æ®·Î ÀÎÇØ ¼º´ÉÀÌ ¶³¾îÁö´Â °ÍÀ» º» Andi Gutmans¿Í Zeev Suraski¿¡ ÀÇÇØ º¸´Ù ¿øÈ°ÇÏ°Ô µ¿ÀÛÇÏ°Ô ¸¸µç »õ·Î¿î ¿£Áø ÀÔ´Ï´Ù.    ¶ÇÇÑ ZEND ¿£ÁøÀº PHP ÀÌ¿ÜÀÇ ´Ù¸¥ ÇÁ·Î±×·¥¿¡¼­µµ Àç»ç¿ëµÉ ¼ö ÀÖ°í ¾ÕÀ¸·Î ´Ù¸¥ ¾ð¾î¿¡¼­µµ »ç¿ë °¡´ÉÇϸ®¶ó º¾´Ï´Ù.    ZEND ¿£ÁøÀ» »ç¿ëÇϸé PHP3º¸´Ù 300¹è Á¤µµ ¼º´É Çâ»óÀ» °¡Á®¿À¸ç, »ç¿ëÀÚ°¡ Áõ°¡ÇßÀ» ¶§ È®¿¬È÷ º¸ÀÔ´Ï´Ù.    ¿©±â¿¡ PLUG-INÀ» º°µµ·Î ±¸¸ÅÇÏ¸é ´õ Çâ»óÀ» °¡Á®¿Ã °ÍÀÔ´Ï´Ù.    ±×¸®°í ZEND´Â foreach, class::method() call°ú °°Àº »õ·Î¿î ¹®¹ý°ú PHP3¿¡¼­ÀÇ »ç¿ëÇϱ⿡ ºÒÆíÇß´ø Á¡À» »ó´çÈ÷ °³¼± Çß½À´Ï´Ù.    °­È­µÈ °ÍÀ» º¸¸é, ¿ì¼± ÀÌÀü ¹öÀüº¸´Ù ´õ ¸¹ÀÌ ¸ðµâÈ­ µÇ¾ú½À´Ï´Ù.    PHP3¿¡¼­¿Í´Â ´Þ¸® µ¿ÀûÀÎ ¸ðµâÈ­°¡ ½±°Ô µÇµµ·Ï ¼³°è µÇ¾îÁø °ÍÀÔ´Ï´Ù.    ±×¸®°í Ç¥ÁØ CGI, Apache, Fhttpd, ISAPI(MSÀÇ IIS¸¦ À§ÇÑ), NSAPI(Netscape serverÀ» À§ÇÑ)¸¦ Áö¿øÇÏ°Ô µÇ¾ú½À´Ï´Ù.    »Ó¸¸ ¾Æ´Ï¶ó ±âÁ¸ÀÇ ASP¸¦ ÅëÇؼ­ ÀÌ¿ëÇÑ COM/DCOM±îÁö ZEND´Â ¿µ¿ªÀ» ³ÐÇû½À´Ï´Ù.    ÇöÀç PHP4 ZEND´Â candidate 1±îÁö ³ª¿ÔÀ¸¸ç ¾ÕÀ¸·Î °è¼ÓÇؼ­ ¾÷±×·¹ÀÌµå µÉ ¿¹Á¤ÀÔ´Ï´Ù.    ZEND OptimizerÀÇ °æ¿ì ÇöÀç beta 2±îÁö ³ª¿Í ÀÖÀ¸¸ç Free DownÀÌ °¡´É ÇÕ´Ï´Ù.    ¼³Ä¡ ȯ°æÀº PHP4 beta4 pl1°ú ÀÌÈÄ ¹öÀü(PHP4 RC1)¿¡¼­ ¼³Ä¡ °¡´ÉÇÏ¸ç °¢°¢ÀÇ ½Ã½ºÅÛ È¯°æÀ» º¸¸é ¾Æ·¡¿Í °°½À´Ï´Ù.

  • x86 Linux glibc2.1-based systems (tested on Red Hat 6.1, Mandrake 7.0, Slackware 7.0 and SuSE 6.2).
  • x86 Linux glibc2.0-based systems (tested on Red Hat 5.2 and SuSE 6.1)
  • x86 Linux libc5-based systems (tested on Slackware 4.0 and Debian 1.3.1r8)
  • Sparc Solaris 7
  • FreeBSD 3.4 and 4.0
  • Windows NT 4.0 (not tested on other versions of Windows)

www.zend.comÀ¸·Î °¡¸é °£´ÜÇÑ °¡ÀÔ ÀýÂ÷¿Í ÇÔ²² ¸ÞÀÏ·Î Æнº¿öµå¸¦ ¹Þ°í ·Î±×ÀÎ ÈÄ ZEND Optimizer¸¦ ´Ù¿î·Îµå ÇÒ ¼ö ÀÖ½À´Ï´Ù.

À§ ±×¸²¿¡¼­ zend , À¥ ¼­¹ö , µ¥ÀÌÅͺ£À̽º , ºê¶ó¿ìÀúÀÇ ¿ªÇÒ¿¡ ´ëÇÑ °£·«ÇÑ ±¸Á¶¸¦ È®ÀÎ ÇÒ ¼ö ÀÖÀ¸¸ç zend ¿£ÁøÀÌ ÀÌ·¯ÇÑ ±¸Á¶¿¡¼­ ´ã´çÇÏ´Â ºÎºÐÀ» È®ÀÎ ÇÒ ¼ö ÀÖ½À´Ï´Ù.

PHP¿Í ASP

PHP¿Í ASP´Â ±Ùº»ÀûÀ¸·Î ¼­¹ö¿ë °´Ã¼ ÁöÇâÀûÀÎ ½ºÅ©¸³Æ® ¾ð¾î¶ó´Â Á¡¿¡¼­ °°Áö¸¸, ASPÀÇ °æ¿ì IIS, PWS¿Í °°Àº À©µµ¿ì ȯ°æ¿¡¼­ ¿òÁ÷ÀÌ´Â ¼­¹ö¸¦ Áö¿øÇϴµ¥ ¹ÝÇØ PHP´Â Apache, IIS, PWS, ¼­¹ö µî°ú À¯´Ð½º À©µµ¿ì ȯ°æ¿¡¼­ ¿òÁ÷ÀÌ´Â ¸ðµç ¼­¹ö¸¦ Áö¿øÇÕ´Ï´Ù.    ¶ÇÇÑ PHP´Â À§¿¡¼­ ¾ð±ÞÇÑ µ¥ÀÌÅͺ£À̽º °°Àº °æ¿ì ODBC¿¡ ÀÇÇÑ ¿¬°á°ú À¯´Ð½º¿¡¼­ »ç¿ëµÇ´Â °ÅÀÇ ¸ðµç DB¸¦ ¿¬°áÇØ ÁÝ´Ï´Ù.    ¹«¾ùº¸´Ù ¸Å·ÂÀûÀÎ °ÍÀº PHP ÄÚµå ³»¿¡¼­ »ç¿ëÀÚ ÀÚ½ÅÀÇ °´Ã¼¸¦ Á¤ÀÇÇؼ­ »ç¿ëÇÒ ¼ö ÀÖ´Ù´Â Á¡ÀÔ´Ï´Ù.    ÀÌ°Í ¸»°íµµ ¿©·¯ °¡Áö ÀåÁ¡µéÀÌ ¸¹ÀÌ ÀÖ½À´Ï´Ù.

2.3 Mysql

Mysql¿¡ °üÇؼ­

Mysql µ¥ÀÌÅͺ£À̽º´Â ´Ù¸¥ »ó¿ë µ¥ÀÌÅͺ£À̽º¿Í ºñ±³ÇØ ¾ÈÁ¤¼º°ú ±âŸ ¿©·¯ ¹®Á¦¿¡ Å©°Ô ¶³¾îÁöÁö ¾ÊÀ¸¸é¼­ °ø°³µÇ¾îÁø µ¥ÀÌÅͺ£À̽ºÀÔ´Ï´Ù.    ´Ù¾çÇÑ ÇÔ¼ö¿Í ¿©·¯ ±â´É¸é¿¡¼­ »ó¿ë µ¥ÀÌÅͺ£À̽º°¡ °¡ÁöÁö ¸øÇÑ Á¡À» °¡Áø °Íµµ ¸¹ÀÌ ÀÖ½À´Ï´Ù.    ±×¸®°í °ø°³µÈ ´Ù¸¥ µ¥ÀÌÅͺ£À̽º¿Í ºñ±³ ÇÒ ¶§ »ç¿ëÀÚ ¶ÇÇÑ ³Ð½À´Ï´Ù.    MysqlÀº C , C++, Java, python, tck/tk, ODBCµµ Á¦°øÇÏ¸ç ´Ù¾çÇÑ À¥¼­¹ö¿ÍÀÇ ¿¬°áµµ ¿ëÀÌÇÕ´Ï´Ù.    ODBC´Â Ms À©µµ¿ì(win95 , win98 , NT) µîÀ» Á¦°øÇÕ´Ï´Ù.    ÇöÁ¸ÇÏ´Â À©µµ¿ìÀÇ ´ëºÎºÐÀ» Áö¿ø ÇÏ¸ç ¼³Ä¡ ¶ÇÇÑ ´ëºÎºÐÀÇ OS¸¦ Áö¿ø ÇÕ´Ï´Ù.    MysqlÀ» °³ÀÎÀûÀÎ ¿ëµµ·Î »ç¿ëÇÒ °æ¿ì ¹«·áÀÌ¸ç »ó¾÷ÀûÀÎ ¸ñÀûÀ¸·Î »ç¿ëÇÒ °æ¿ì mysql °³¹ßÆÀ¿¡ Á¶±ÝÀÇ ÈÄ¿øÀ» ÇÏ¸é °¡´ÉÇÕ´Ï´Ù.

MysqlÀÌ Áö¿øÇÏ´Â OS¿Í ÆÐÅ°Áö

  • AIX 4.x with native threads
  • BSDI 2.x with the included MIT-pthreads package
  • BSDI 3.0, 3.1 and 4.x with native threads
  • DEC UNIX 4.x with native threads
  • FreeBSD 2.x with the included MIT-pthreads package
  • FreeBSD 3.x with native threads
  • HP-UX 10.20 with the included MIT-pthreads package
  • HP-UX 11.x with the native threads.
  • Linux 2.0+ with LinuxThreads 0.7.1 or glibc 2.0.7
  • MacOS X Server
  • NetBSD 1.3/1.4 Intel and NetBSD 1.3 Alpha (Requires GNU make)
  • OpenBSD > 2.5 with native therads. OpenBSD < 2.5 with the included MIT-pthreads package
  • OS/2 Warp 3, FixPack 29 and OS/2 Warp 4, FixPack 4
  • SGI Irix 6.x with native threads
  • Solaris 2.5, 2.6 and 2.7 with native threads on SPARC and x86
  • SunOS 4.x with the included MIT-pthreads package
  • SCO OpenServer with a recent port of the FSU Pthreads package
  • SCO UnixWare 7.0.1
  • Tru64 Unix
  • Win95, Win98 and NT

MysqlÀÇ ÁÖ¿ä ±â´É

MysqlÀº C , C++ ·Î ÀÛ¼º µÇ¾îÁ³À¸¸ç ¸¹Àº Å×½ºÆ®¸¦ ÅëÇؼ­ ¾ÈÁ¤¼ºÀ» ÀÔÁõÇß½À´Ï´Ù.    ¶ÇÇÑ SQL¹®ÀÇ ´ëºÎºÐÀ» ¿Ïº®ÇÏ°Ô Áö¿øÇÏ¸ç °¢ Å×ÀÌºí¿¡ 16°³ÀÇ À妽º¸¦ »ý¼º ÇÒ ¼ö ÀÖ½À´Ï´Ù.    Å« ±Ô¸ðÀÇ Å×À̺íÀ» »ý¼ºÇÒ ¼ö ÀÖÀ¸¸ç ¿ø°ÝÀ¸·Îµµ Á¢¼Ó °¡´É ÇÕ´Ï´Ù.    ´Ù¾çÇÑ Ä÷³ ŸÀÔÀ» Á¦°øÇÏ¸ç »ç¿ëÀÚ °ü¸®¸¦ ½±°Ô ÇÒ ¼ö ÀÖ½À´Ï´Ù.    ÀÌ¿Ü ´Ù¾çÇÑ ±â´ÉµéÀÌ ÀÖÀ¸¸ç ¸ðµç ½ºÅ©¸³Æ®µéÀÌ ¸¶Âù°¡Áö ÀÌÁö¸¸ µ¥ÀÌÅͺ£À̽º¿ÍÀÇ À¯¿¬ÇÑ ¿¬µ¿Àº Çʼö°¡ µÇ¾ú½À´Ï´Ù.    Mysql ¿ª½Ã ÀÌÁ¡ÀÌ Å¹¿ùÇÏ¸ç ¸ðµç Ç÷§Æû¿¡¼­ Áö¿øµÇ¹Ç·Î »ç¿ë ¹üÀ§ ¶ÇÇÑ ³ÐÀº °ÍÀÔ´Ï´Ù.    Ã³À½ mysqlÀÌ Tcx ³»ºÎ¿¡ »ç¿ëµÉ ¸ñÀûÀ¸·Î ¸¸µé¾î Á³½À´Ï´Ù.    ÀÌ°ÍÀº ±× ´ç½ÃÀÇ ¿©Å¸ SQL¼­¹ö º¸´Ù ¼º´ÉÀÌ ÁÁ¾Æ¾ß Çß½À´Ï´Ù.    ÀÌó·³ ¶Ù¾î³­ µ¥ÀÌÅͺ£À̽º¸¦ ÇöÀç ¿ì¸®°¡ ¹«·á·Î »ç¿ëÇÏ°í ÀÖ´Â °ÍÀÔ´Ï´Ù.

Mysql GUI Tool

Mysql ¿ª½Ã ÀÏ¹Ý ÅؽºÆ® ±â¹ÝÀÌ ¾Æ´Ñ ±×·¡ÇÈÀûÀ¸·Î ½±°Ô ÀÛ¾÷ÇÒ ¼ö ÀÖ´Â GUI ToolÀÌ ÀÖ½À´Ï´Ù.    ÀÌ ToolÀÇ ±â´ÉµéÀº ¹°·Ð ½ºÅ©¸³Æ®·Î ¸¸µé ¼öµµ ÀÖ½À´Ï´Ù.    ÀÌ·¸°Ô ´ëºÎºÐÀÇ ÇÁ·Î±×·¥µéÀº óÀ½ ÅؽºÆ® ±â¹ÝÇÏÁö ¾Ê°í »ç¿ëÀÚ Áß½ÉÀÇ GUI ±â¹ÝÀÇ ToolÀ» »ý¼ºÇÔÀ¸·Î½á º¸´Ù ³ÐÀº »ç¿ëÀÚ ÃþÀ» È®º¸ÇÏ°í ÀÖ½À´Ï´Ù.

GUI ToolÀº À¯´Ð½º ±â¹Ý¿¡¼­ óÀ½ ¸¸µé¾î Á³½À´Ï´Ù.    Áö±ÝÀº À©µµ¿ì ±â¹ÝÀÇ Åø ¶ÇÇÑ ´Ù¾çÇÑ ±â´ÉÀ» Á¦°øÇÏ°í ÀÖ°í µ¥ÀÌÅͺ£À̽ºÀÇ ¿ø°Ý°ü¸®¿¡¼­ ´Ù¾çÇÑ »ç¿ëÀÚ ÆíÀǸ¦ Á¦°øÇÕ´Ï´Ù.    ÀϹÝÀûÀÎ Telnet Á¢¼ÓÀ» Çؼ­ µ¥ÀÌÅͺ£À̽º¸¦ °ü¸®ÇÏ´Â ¹æ¹ý¿¡ ½Ä»óÇÑ »ç¶÷µé°ú óÀ½ µ¥ÀÌÅͺ£À̽º¸¦ Á¢ÇÏ´Â »ç¶÷µé¿¡°Ô ÁÁÀº ¹æ¹ýÀ» Á¦½ÃÇÕ´Ï´Ù.

MS À©µµ¿ì ¿ë GUI Tool

´ÙÀ½ Àå¿¡¼­´Â ¸®´ª½º ȯ°æ¿¡¼­ Apache , Php , Mysql ¼³Ä¡¸¦ ÀÚ¼¼È÷ ¾Ë¾Æ º¸°Ú½À´Ï´Ù.

3. ¸®´ª½º¿¡¼­ APM ¼³Ä¡Çϱâ

APACHE , PHP , MYSQLÀ» Linux¿¡¼­ ¼³Ä¡ ÇÏ´Â ¹æ¹ýÀ» ¾Ë¾Æ º¸°Ú½À´Ï´Ù.    À§ ÇÁ·Î±×·¥µéÀº ÃÖ±Ù ¾÷±×·¹ÀÌµå µÈ °É·Î ¿©·¯ºÐµéÀº ¼³Ä¡Çϼ¼¿ä.    ÃÖ±Ù ¹öÀüÀϼö·Ï ¼³Ä¡ÇÏ´Â °úÁ¤Àº Á¶±Ý ´Ù¸¦ ¼ö ÀÖ½À´Ï´Ù.    RPM ÆÐÅ°Áö·Î ÀνºÅç ÇÏ´Â ¹æ¹ýµµ ÀÖÁö¸¸ ¼³Ä¡ÇÒ ¶§ »ç¿ë ¿É¼ÇÀÇ Ãß°¡¿Í À§Ä¡ µî ¿©·¯ °¡Áö ÀåÁ¡ÀÌ ÀÖ´Â TAR ÆÐÅ°Áö¸¦ ÀÌ¿ëÇÏ¿© ¼³Ä¡Çϵµ·Ï ÇÏ°Ú½À´Ï´Ù.

A.P.M(Apache, Php, Mysql)ÀÇ ¼³Ä¡´Â ´ÙÀ½ ¼ø¼­·Î ÁøÇàÇÕ´Ï´Ù.

3.1 A.P.MÀ» ¼³Ä¡Çϱâ Àü¿¡ ÇÒ ÀÏ

¼³Ä¡´Â APACHE¿¡ ¸ðµâÀ» Ãß°¡Çؼ­ ÄÄÆÄÀÏÇÏ°Ú½À´Ï´Ù.    ÃÖ±ÙÀÇ ¾÷±×·¹À̵åµÈ ÇÁ·Î±×·¥Àº ¾Æ·¡ÀÇ »çÀÌÆ®¿¡¼­ ±¸ÇÒ ¼ö ÀÖ½À´Ï´Ù.

1)Apache, PHP, Mysql ÆÐÅ°Áö ¿Å±â±â

¸ÕÀú CD¿¡ ÀÖ´Â APACHE, PHP, MYSQLÀ» Àӽà µð·ºÅ丮¿¡ ¿Å°Ü ³õ½À´Ï´Ù.    ¿©±â¼­´Â /TMP µð·ºÅ丮¿¡ ¿Å°Ü¼­ ¼³Ä¡¸¦ ÇÏ°Ú½À´Ï´Ù.    ¿©·¯ºÐÀÇ ÀÓÀÇ µð·ºÅ丮·Î ¿Å°Ü¼­ »ç¿ëÇÏ¸é µË´Ï´Ù.

<TIP>----------------------------------------------------------------------------

CD ¸¶¿îÆ®Çϱâ

CD ¸¶¿îÆ®¿¡ Àͼ÷Ä¡ ¸øÇÑ ºÐÀ» À§ÇØ ¸¶¿îÆ® ÇÏ´Â ¹æ¹ýÀ» °£´ÜÈ÷ ¼³¸íÇÏ°Ú½À´Ï´Ù.
/etc/fstab ÆÄÀÏÀÇ ³»¿ëÁß cdrom Ç׸ñÀÌ ´ëºÎºÐ ÀνºÅç ½Ã¿¡ Àֱ⠶§¹®¿¡ ´ÙÀ½°ú °°ÀÌ ÇÕ´Ï´Ù.

  -.fstab ÀÇ cdrom Ç׸ñÀÌ auto ÀÏ °æ¿ì
        auto·Î ¼³Á¤µÇ¾î ÀÖ´Ù¸é ºÎÆà Àü cd°¡ ÀÖÀ» °æ¿ì /mnt/cdrom µð·ºÅ丮¿¡ °¡¸é cd ³»¿ëÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.

  -.fstabÀÇ cdrom Ç׸ñÀÌ auto°¡ ¾Æ´Ò °æ¿ì
        cd¸¦ ³ÖÀº ´ÙÀ½
        #mount /mnt/cdrom Çϸé cd ³»¿ëÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.

  -.¶Ç ´Ù¸¥ ¹æ¹ý
        ·¹µåÇÖ 6.0 ¹öÀü À̶ó¸é Xwindow¿¡¼­ cdromÀ» ¸¶¿îÆ®¿Í ¾ð¸¶¿îÆ® ÇÒ ¼ö ÀÖ½À´Ï´Ù.
        ¸¸¾à ±× ÀÌÀü ¹öÀüÀ̰ųª ´Ù¸¥ ¹®Á¦°¡ ÀÖÀ» °æ¿ì ¾Æ·¡¿Í °°ÀÌ ÇÕ´Ï´Ù.
        #mount -t  iso9660 /dev/cdrom  /mnt/cdrom
--------------------------------------------------------------------------------

2)½ÇÇàÁßÀÎ ¾ÆÆÄÄ¡ ÇÁ·Î¼¼½º ã±â

/tmp µð·ºÅ丮·Î APACHE , PHP , MYSQLÀ» ´Ù ¿Å°å´Ù¸é ¸ÕÀú ±âÁ¸ÀÇ ÀνºÅç ¶§ »ý±ä APACHE¸¦ Áö¿ö¾ß ÇÕ´Ï´Ù.    ¸¸¾à ÀÖ´Â »óÅ¿¡¼­ ¶Ç ÀνºÅç ÇÑ´Ù¸é µÎ°³°¡ °ãÃÄ ¿¡·¯°¡ ¹ß»ýÇÒ ¼ÒÁö°¡ »ý±é´Ï´Ù.    ¸®´ª½º ÀνºÅç ¶§ APACHE¸¦ Á¦¿ÜÇß´Ù¸é ÀÌ ºÎºÐÀº ³Ñ¾î°¡µµ µË´Ï´Ù.

#ps -ef | grep http - ÀÌ ¸í·ÉÀ» ½ÇÇàÇϸé ÇöÀçÀÇ ¾ÆÆÄÄ¡ ¼­¹ö ÇÁ·Î¼¼¼­¸¦ È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.

3)½ÇÇà ÁßÀÎ ¾ÆÆÄÄ¡ ÇÁ·Î¼¼¼­ Á¦°Å

Root ÇÁ·Î¼¼¼­ 541¹øÀ» Á¦°ÅÇÕ´Ï´Ù.    ±×·¯¸é ÀÚ½Ä ÇÁ·Î¼¼¼­µµ ´Ù °°ÀÌ Á¦°ÅµË´Ï´Ù.    ÀÌ ÇÁ·Î¼¼¼­ ¹øÈ£´Â ´Ù¸¦ ¼ö ÀÖ½À´Ï´Ù.

   #kill 541 - ÇÁ·Î¼¼¼­ Á¦°Å ÇÕ´Ï´Ù.

½ÇÇàÇÒ ¶§ ¸¶´Ù ÇÁ·Î¼¼¼­´Â ´Ù¸£±â ¶§¹®¿¡ Ȥ½Ã ÇÁ·Î¼¼¼­ ¹øÈ£°¡ ÀÚ½ÅÀÇ °Í°ú ´Ù¸£´Ù°í ÀÌ»óÈ÷ ¿©±âÁö ¸¶¼¼¿ä.    ÇÁ·Î¼¼¼­¸¦ Á¦°Å Çß´Ù¸é 2)¹ø °úÁ¤À» Çѹø ´õ Çؼ­ ¿ÏÀüÈ÷ Á¦°Å µÈ °ÍÀ» È®ÀÎ ÇÕ´Ï´Ù.

4)±âÁ¸¿¡ ¼³Ä¡µÈ ¾ÆÆÄÄ¡ ã±â

rpm¹öÀüÀÇ ÀνºÅçÀÌ ´ëºÎºÐÀÌ°ÚÁö¸¸ rpmÀÌ ¾Æ´Ñ °æ¿ì ¾ÆÆÄÄ¡ °ü·Ã µð·ºÅ丮¸¦ ã¾Æ Á¦°ÅÇØ¾ß µË´Ï´Ù.    rpm¹öÀüÀÎ °æ¿ì ÀÏÀÏÀÌ °ü·Ã µð·ºÅ丮¸¦ ã¾Æ Á¦°ÅÇصµ µÇÁö¸¸ rpm ¸í·ÉÀ¸·Î °£´ÜÈ÷ Á¦°Å ÇÒ ¼ö ÀÖ½À´Ï´Ù.

#rpm -ql apache - rpmÀ¸·Î ¼³Ä¡µÈ ¾ÆÆÄÄ¡ µð·ºÅ丮¸¦ ã¾Æ ÁÝ´Ï´Ù.

rpm ÆÐÅ°Áö·Î ¼³Ä¡µÈ ¾ÆÆÄÄ¡ µð·ºÅ丮¸¦ ã´Â ¹æ¹ýÀº ¸¸¾à rpm »èÁ¦ ¸í·ÉÀ¸·Î ¾ÆÆÄÄ"¡ Á¦´ë·Î Á¦°Å µÇÁö ¾ÊÀ» °æ¿ì ¼³Ä¡µÈ µð·ºÅ丮ÀÇ ³»¿ëÀ» ã¾Æ Á¦°ÅÇØ¾ß µÇ±â ¶§¹®¿¡ ¾Ë¾ÆµÎ±â ¹Ù¶ø´Ï´Ù.    rpm ÆÐÅ°Áö·Î ¼³Ä¡ÇÒ °æ¿ì ¾ÆÆÄÄ¡ ¼­¹öÀÇ ¸ðµâ Ãß°¡¿Í ±âŸ ´Ù¸¥ ¼³Á¤¿¡¼­ ¿©·¯ ¹®Á¦Á¡µéÀÌ ³ªÅ¸³¯ ¼ö ÀÖ½À´Ï´Ù.    ºñ·Ï óÀ½ Á¢ÇÏ°í ´Ù¼Ò ¾î·Æ°Ô ´À²¸Áö´õ¶óµµ ¹ÙÀ̳ʸ® ÀνºÅçÀ» ±ÇÀå ÇÕ´Ï´Ù.

<TIP>----------------------------------------------------------------------------

rpmÀ¸·Î ¼³Ä¡µÈ ÇÁ·Î±×·¥ÀÇ Á¤º¸ º¸±â #rpm -qi ÆÐÅ°Áö¸í - ÇØ´ç ÆÐÅ°ÁöÀÇ Á¸Àç ¿©ºÎ¸¦ È®ÀÎ ÇÕ´Ï´Ù.    À§ ¸í·ÉÀº rpmÀ¸·Î ¼³Ä¡µÈ PHP³ª MysqlÀ» ãÀ» °æ¿ìµµ ¸¶Âù°¡Áö ÀÔ´Ï´Ù.    ¸¸¾à ÀÇÁ¸¼º ¹®Á¦·Î ÀÎÇØ rpm ÆÐÅ°Áö »èÁ¦¸í·É( 5)¹ø Âü°í)ÀÌ ½ÇÇà µÇÁö ¾ÊÀ» °æ¿ì À§ ¸í·ÉÀ¸·Î °ü·Ã µð·ºÅ丮¿Í ÆÄÀÏÀ» ã°í »èÁ¦ ÇÏ¸é µË´Ï´Ù.    ¿©±â¼­ ¼³¸íÇÒ TAR ÆÐÅ°Áö ¼³Ä¡ÀÇ °æ¿ì ¾ÆÆÄÄ¡ ¼³Ä¡ µð·ºÅ丮´Â ¾Æ·¡¿Í °°½À´Ï´Ù.

    /usr/local/apache 
    /apache/bin
    /apache/htdocs
    /apache/cgi
    /apache/conf
    /apache/icons
    /apache/logs
        ¡¦
--------------------------------------------------------------------------------

5)rpmÀ¸·Î ¼³Ä¡µÈ ¾ÆÆÄÄ¡ Á¦°Å Çϱâ

#rpm -e apache - rpm ¼³Ä¡ ¾ÆÆÄÄ¡¸¦ Á¦°ÅÇØ ÁÝ´Ï´Ù.

5)¹ø ¸í·ÉÀ» Çѹø ´õ ½ÇÇàÇؼ­ ÆÐÅ°Áö°¡ Á¦°Å µÇ¾ú´ÂÁö È®ÀÎÇÕ´Ï´Ù.    ¸¸¾à ¾ÆÆÄÄ"¡ ¼³Ä¡µÇÁö ¾Ê¾Ò´Ù¸é error ¸Þ½ÃÁö°¡ ³ª¿Ã °ÍÀÔ´Ï´Ù.

3.2 A.P.M ¼³Ä¡Çϱâ

1) apache ÆÄÀÏ Ç®±â

tmp ¶Ç´Â ¿©·¯ºÐµéÀÌ Á¤ÇÑ ÀÓÀÇ µð·ºÅ丮·Î ¾ÆÆÄÄ¡¸¦ copy ÇÕ´Ï´Ù. ´ÙÀ½ ¾Æ·¡ÀÇ ¸í·ÉÀ» ½ÇÇà ÇÕ´Ï´Ù.

#zcat apache_1.3.12.tar.Z | tar xvf - - ÇØ´ç ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ç®¾î ÁÝ´Ï´Ù.

<TIP>----------------------------------------------------------------------------

tar.gz °ú tar.Z ÆÐÅ°Áö Ç®±â

À§ ÆÐÅ°Áö¸¦ Ǫ´Â ¹æ¹ýÀº ¸î °¡Áö°¡ ÀÖ½À´Ï´Ù.
    #tar -xvzf ÆÐÅ°Áö¸í   -   ÀÌ ¸í·ÉÀ¸·Î µÎ Á¾·ùÀÇ ÆÐÅ°Áö¸¦ ´Ù Ç® ¼ö ÀÖ½À´Ï´Ù.
    #gunzip ÆÐÅ°Áö¸í  -  gz ¿Í Z·Î ¾ÐÃàµÈ ÆÐÅ°Áö¸¦ DZ´Ï´Ù.
    #gzip -d ÆÐÅ°Áö¸í -  gz ¿Í Z·Î ¾ÐÃàµÈ ÆÐÅ°Áö¸¦ DZ´Ï´Ù.
--------------------------------------------------------------------------------

À§¸¦ º¸¸é apache_1.3.12/ µð·ºÅ丮°¡ »ý¼ºµÈ°É º¼ ¼ö ÀÖ½À´Ï´Ù.    ¼³Ä¡ÇÏ´Â °úÁ¤¿¡¼­ mc(midnight command : ¿¾³¯ µµ½º ½ÃÀý m°ú À¯»çÇÑ À¯´Ð½º ÇÁ·Î±×·¥)¸¦ »ç¿ëÇؼ­ ¼³Ä¡ÇÏ´Â ºÐµµ ÀÖÀ» °ÍÀÔ´Ï´Ù.    µð·ºÅ丮 »ç¿ë¿¡ copy³ª ±âŸ ¸í·ÉµéÀÌ ´Ù¾çÇϹǷΠ¸®´ª½ºÀÇ ÅؽºÆ® ¸ðµå¿¡ Àͼ÷Ä¡ ¾ÊÀº »ç¶÷Àº ÀÌ ÇÁ·Î±×·¥À» »ç¿ëÇϱ⠹ٶø´Ï´Ù.

2) ¾ÆÆÄÄ¡ µð·ºÅ丮ÀÇ ./configure ¿Í ./Configure ½ÇÇà

apache_1.3.12 µð·ºÅ丮·Î °¡¼­ ./configure¸¦ Çѹø ½ÇÇàÇØ ÁÝ´Ï´Ù.    Apache¿¡ µð·ºÅ丮 (./configure ¿Í ./Configure µÎ °¡Áö°¡ ÀÖÀ¸´Ï ÁÖÀÇÇϱ⠹ٶø´Ï´Ù.) ´ÙÀ½ /apache_1.3.12/src µð·ºÅ丮·Î ¿Å°Ü ./Configure¸¦ ½ÇÇàÇÕ´Ï´Ù.

3)Mysql Ç®±â

./configure , ./Configure¸¦ Çß´Ù¸é ÀÌÁ¦ apache´Â Àá½Ã µÎ°í mysqlÀ» Ç®µµ·Ï ÇÏ°Ú½À´Ï´Ù.    /tmp³ª ¿©·¯ºÐÀÌ Á¤ÇÑ ÀÓÀÇ µð·ºÅ丮·Î ÆÐÅ°Áö¸¦ copy ÇÕ´Ï´Ù.    ±×¸®°í ´ÙÀ½ ¸í·ÉÀ» ½ÇÇà ÇÕ´Ï´Ù.

#zcat mysql-3.23.12c-alpha-pc-linux-gnu-i686.tar.gz | tar xvf - - ÇØ´ç mysql ÆÐÅ°Áö¸¦ Ç®¾î ÁÝ´Ï´Ù.

¿©±â ÀνºÅç ÇÒ mysqlÀº 3.23.12c ¹öÀü ÀÔ´Ï´Ù.    ¿©·¯ºÐÀº ÃÖ±Ù ¹öÀüÀ» ´Ù¿î ¹Þ¾Æ ¼³Ä¡Çϼ¼¿ä.    ÀÌ·¸°Ô ¹ÙÀ̳ʸ® ¹èÆ÷º»À» ÀνºÅç ÇÏ´Â ÀÌÀ¯´Â ´Ù¸¥ °Íº¸´Ù ¾î´À Á¤µµ ¼º´É Çâ»óÀÌ Àֱ⠶§¹®ÀÔ´Ï´Ù.    ¹ÙÀ̳ʸ®¸¦ ÄÄÆÄÀÏ ÇÒ °æ¿ì´Â Á¤ÀûÀ¸·Î ¸µÅ©°¡ ÀÌ·ç¾îÁö°Ô µÇ±â ¶§¹®ÀÔ´Ï´Ù.    Á÷Á¢ ÄÄÆÄÀÏÇÒ °æ¿ì¶óµµ Á¤ÀûÀ¸·Î ¸µÅ©½Ãų ¼ö ÀÖÁö¸¸ ±¸Áö ±×·² ÇÊ¿ä´Â ¾ø°í ¹ÙÀ̳ʸ® ¹èÆ÷º»À» »ç¿ëÇϱ⠹ٶø´Ï´Ù.

4) Ç®¸° Mysql ÆÐÅ°Áö ¿Å±â±â

¾ÐÃàÀ» ´Ù Ç®¾úÀ¸¸é mc³ª cp ¸í·ÉÀ¸·Î mysql µð·ºÅ丮¸¦ /usr/local/mysql·Î ¿Å±é´Ï´Ù.    ¹°·Ð mysql µð·ºÅ丮´Â »õ·Î ¸¸µå´Â °ÍÀÔ´Ï´Ù.    ÇÊÀÚÀÇ °æ¿ì´Â mc·Î °£´ÜÇÏ°Ô ¿Å°å½À´Ï´Ù.

À§ ±×¸²À» º¸¸é /usr/local/mysql µð·ºÅ丮·Î ¿Å°Ü ³õÀº °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.

5) ./scripts/mysql_install_db ½ÇÇà

ÀÌÁ¦ /usr/local/mysql µð·ºÅ丮 ¾È¿¡¼­ ./scripts/mysql_install_db¸¦ ½ÇÇàÇØ ÁÝ´Ï´Ù.

(*ÁÖÀÇ : /usr/local/mysql/scripts µð·ºÅ丮¿¡¼­ ½ÇÇàÇÏ´Â °ÍÀÌ ¾Æ´ÔÀ» ¸í½ÉÇϱ⠹ٶø´Ï´Ù.)

6)Mysql Test ¹× ¼³Á¤

./scripts/mysql_install_db ¸í·ÉÀ» ½ÇÇàÇÑ ÈÄ Á¦´ë·Î ¼³Ä¡µÇ¾ú´Ù¸é ÀÌÁ¦ mysqlÀ» °£´ÜÈ÷ Å×½ºÆ® Çغ¾´Ï´Ù.    ¸ÕÀú, mysqlÀÇ »ç¿ëÀÚ Æнº¿öµå¸¦ ¹Ù²Ù¾î ÁÝ´Ï´Ù.    µðÆúÆ®´Â Æнº¿öµå ¾øÀÌ root ±ÇÇÑÀ̱⠶§¹®¿¡ Â÷ÈÄ php ½ºÅ©¸³Æ®¸¦ ¸¸µé´õ¶óµµ ÀÌ ºÎºÐÀº ²À Áý°í ³Ñ¾î°¡¾ß µË´Ï´Ù.    /usr/local/mysql/bin µð·ºÅ丮¿¡¼­ ´ÙÀ½ ¸í·ÉÀ» ½ÇÇàÇؼ­ Æнº¿öµå¸¦ ¹Ù²ß´Ï´Ù.

<TIP>----------------------------------------------------------------------------

Mysql ¸®´ª½º¿Í ÇÔ²² ½ÇÇà Çϱâ

¸¸¾à ¿©·¯ºÐµéÀÌ ¸®´ª½º ¼­¹öÀÇ ½ÇÇà°ú µ¿½Ã¿¡ MysqlÀ» °¡µ¿ Çϱ⸦ ¿øÇÑ´Ù¸é ¾Æ·¡¿Í °°ÀÌ etc/rc.d/rc.localÆÄÀÏ¿¡ Ãß°¡ ÇØ¾ß ÇÕ´Ï´Ù.
 
    rc.local Ãß°¡ ºÎºÐ
      if [ -f /usr/local/mysql/bin/safe_mysqld ]; then
        /usr/local/mysql/bin/safe_mysqld &
      fi
--------------------------------------------------------------------------------
¨ç Æнº¿öµå ¹Ù²Ù±â
  
    #./mysqladmin -u root password  ¡® »õ·Î¿î password ¡¯
        
    Æнº¿öµå¸¦ ¹Ù²Ù±â Àü È®ÀÎÇغ¸½Ã¸é ¾Ë°ÚÁö¸¸ #./mysql -u root ÇÏ¸é ±×³É Á¢¼Ó µË´Ï´Ù. ¿ì¼± ¾ÏÈ£¸¦ ¸¸µå´Â °ÍÀÌ Áß¿äÇÕ´Ï´Ù.


¨è Mysql °¡µ¿°ú Á¤Áö Çϱâ
    
    mysql¿¡ °üÇÑ º¸´Ù »ó¼¼ÇÑ Á¤º¸´Â µÚ mysql ºÎºÐÀ» Âü°í Çϼ¼¿ä.
         
    #./safe_mysqld &  -  usr/local/mysql/bin µð·ºÅ丮 ¾È¿¡ safe_mysqld ÆÄÀÏÀÌ Á¸ÀçÇÏ°í mysqlÀ» ¹é±×¶ó¿îµå·Î ½ÇÇà ÇÕ´Ï´Ù.
    #./mysqladmin shutdown  -  Mysql ¼­¹ö¸¦ Á¤Áö ÇÕ´Ï´Ù.
    #./mysql.server start  -  /usr/local/mysql/sbin µð·ºÀÇ mysql.server ½ºÅ©¸³Æ®¸¦ ÀÌ¿ëÇØ mysqlÀ» ½ÇÇà ÇÕ´Ï´Ù.
    #./mysql.server stop  -  Mysql ¼­¹ö¸¦ Á¤Áö ÇÕ´Ï´Ù.


¨é ./mysql.serverÀÇ Á¢¼Ó È®ÀÎ

    ÇØ´ç ½ºÅ©¸³Æ®¸¦ »ç¿ëÇϱâ ÆíÇÑ °÷À¸·Î copyÇÑ ´ÙÀ½ ¸ðµå¸¦ chmod 700À¸·Î ¹Ù²Ù¾î »ç¿ë ÇÒ ¼öµµ ÀÖ½À´Ï´Ù.
    ( ÇÊÀÚÀÇ °æ¿ì /sbin µð·ºÅ丮¿¡ ¿Å°Ü¼­ ½ÇÇà Çß½À´Ï´Ù.)

±×·³ ÀÌÁ¦ mysql ¼­¹ö´Â µ¿ÀÛÇÏ´Â »óÅÂÀ̹ǷΠÁ÷Á¢ Á¢¼ÓÀ» Çغ¸°Ú½À´Ï´Ù.    ¸ÕÀú ¾Õ¿¡¼­ ¸»Çß´ø Æнº¿öµå ¼³Á¤ ºÎºÐÀ» ´Ù½Ã È®ÀÎ ÇÏ°Ú½À´Ï´Ù.

À§¿Í °°ÀÌ ¹Ù²Ù°í ³­ÈÄ Á¢¼Ó ÇÕ´Ï´Ù.(¿©·¯ºÐµéÀº ÀÚ½ÅÀÇ Æнº¿öµå¸¦ ÀÔ·Â ÇÕ´Ï´Ù.)

À§¿¡¼­ -p ¿É¼ÇÀ» ÁÜÀ¸·Î½á Æнº¿öµå ÀԷ¶õÀÌ ¶å´Ï´Ù.    ±×·¯¸é Á÷Á¢ ÀÔ·ÂÇÏ°í ¿£ÅÍÇϸé Á¢¼ÓÀÌ ÀÌ·ç¾î Áý´Ï´Ù.    ´ÙÀ½ mysql> ¹Ù²î°Ô µË´Ï´Ù.

¨ê Mysql Á¢¼Ó ÈÄ ±âº»ÀûÀÎ È®ÀÎ
          
    ¿©±â¿¡¼­ mysqlÀÇ database¿Í table¸¦ È®ÀÎÇØ º¸°Ú½À´Ï´Ù.
    Mysql¿¡ Á÷Á¢ Á¢¼ÓÇؼ­ ¼­¹ö¿Í ´ëÈ­ÇÏ´Â ¹æ¹ýÀº µÞ ºÎºÐÀÇ php¿¡¼­ Áö¿øÇÏ´Â mysql ÇÔ¼ö¿Í ¿¬°üµË´Ï´Ù. 
    µû¶ó¼­ mysql ´ëÈ­¹ýÀ» ¾È´Ù¸é php¿¡¼­ÀÇ mysql ÇÔ¼ö ¶ÇÇÑ °£´ÜÈ÷ ÇØ°á µË´Ï´Ù.
    MysqlÀº php¿ÍÀÇ Á¶È­°¡ apache¿Í ¸¸³¯ ¶§ ´õ °­·ÂÇØ ÁüÀº ¾Æ¹«µµ ºÎÁ¤ÇÏÁö ¾ÊÀ» °ÍÀÔ´Ï´Ù.
    ºñ·Ï php¿Í apache¸¸À» ÀÌ¿ëÇؼ­ µ¥ÀÌÅͺ£À̽º ¾øÀ̵µ »ç¿ë ÇÒ ¼ö ÀÖÁö¸¸ mysql µ¥ÀÌÅͺ£À̽º°¡ Á¢¸ñ µÈ´Ù¸é
    ´õ °­·ÂÇØÁö´Â °ÍÀÔ´Ï´Ù.   ¿äÁòÀÇ °æ¿ì ´ëºÎºÐÀÇ ¼­¹ö°¡ µ¥ÀÌÅͺ£À̽º¸¦ ÀÌ¿ëÇϹǷΠ¾ÆÁÖ °£´ÜÇÑ bbs¿¡¼­
    ´ëÇü bbs¿¡ À̸£±â ±îÁö À¯¿ëÇÏ°Ô »ç¿ëµË´Ï´Ù.
    °Ô´Ù°¡ mysqlÀº °øÂ¥ µ¥ÀÌÅͺ£À̽ºÀ̱⠶§¹®¿¡ ´õ¿í ÀαⰡ Ä¡¼Ú°í ÀÖ½À´Ï´Ù.
            
    mysql>show databases ;   -   ÇöÀç »ý¼º µÇ¾î ÀÖ´Â µ¥ÀÌÅͺ£À̽º¸¦ º¸¿© ÁÝ´Ï´Ù.
                   (¿©±â¼­ ±×³É show tables ; ¸í·ÉÀ» ½ÇÇàÇÒ °æ¿ì ¿¡·¯ ¸Þ½ÃÁö°¡ Ãâ·Â µË´Ï´Ù.
                    ƯÁ¤ µ¥ÀÌÅͺ£À̽º »ç¿ëÀ» ¸í½ÃÇÏÁö ¾Ê¾Ò±â ¶§¹®ÀÔ´Ï´Ù.)
                 
    mysql>use mysql ;  -  mysql µ¥ÀÌÅͺ£À̽º »ç¿ëÀ» ¸í½Ã ÇÕ´Ï´Ù.
                    ƯÁ¤ µ¥ÀÌÅͺ£À̽º »ç¿ëÀ» À§ÇØ use ¸í·ÉÀ» »ç¿ë ÇÕ´Ï´Ù.
                  
    mysql>show tables ;  -  µðÆúÆ®·Î ¸¸µé¾îÁø Å×À̺íÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.
                    ¿©±â¿¡´Â »ç¿ëÀÚ¿Í ÇÔ¼öµé È£½ºÆ®¸í µî mysql Àü¹Ý¿¡ °üÇÑ »çÇ×ÀÌ Á¸ÀçÇÕ´Ï´Ù

    mysql>/s  -  ¼¼ºÎÀûÀÎ mysql Á¤º¸¸¦ È®ÀÎ ÇÕ´Ï´Ù.
    ÇöÀç ¼³Ä¡µÈ mysqlÀÇ ¹öÀü°ú »ç¿ëÀÚ ÇÁ·ÎÅäÄÝ µîÀÇ Á¤º¸¸¦ È®ÀÎ ÇÒ ¼ö ÀÖ½À´Ï´Ù.

7) PHP Ç®±â

ÀÚ ±×·³ ÀÌÁ¦ php ¸ðµâÀ» apache¿¡ Á¢¸ñ½ÃÅ°µµ·Ï ÇÏ°Ú½À´Ï´Ù.    ¿©±â »ç¿ëµÇ¾îÁú php´Â PHP 4 zend beta 3 ¹öÀü ÀÔ´Ï´Ù.    ÇöÀçÀÇ °æ¿ì PHP 4 Á¤½Ä ¹öÀüÀÌ ³ª¿Ô°í ±×¸®°í zend ¿ÉƼ¸¶ÀÌÁ® µîÀÌ ³ª¿Â »óÅ ÀÔ´Ï´Ù.    ¿©·¯ºÐµéÀº ÀÌ°ÍÀ» ¼³Ä¡Çϱ⠹ٶø´Ï´Ù.    ¾ÆÁ÷ ºÒ¾ÈÁ¤ÇÑ »óŶó¸é Á¶±Ý ´õ ÁöÄѺÁµµ µÇÁö¸¸ ÆÐÄ¡¿Í ¿ÉƼ¸¶ÀÌÁ® µîÀÌ ÀÖÀ¸¹Ç·Î ´õ °­·ÂÇØÁø °ÍÀº »ç½Ç ÀÔ´Ï´Ù.    ¸ÕÀú phpÀ» copy ÇÑ /tmp(ÀÓÀÇ µð·ºÅ丮) µð·ºÅ丮¿¡¼­ ¾ÐÃàÀ» DZ´Ï´Ù.    ( PHP 4.0 °ú ¼³Ä¡ ¹æ¹ýÀº °°À¸¹Ç·Î ÁøÇà ¼ø¼­¸¦ ÁöÄÑ ÀνºÅç ÇÏ¸é µË´Ï´Ù.)

#zcat   |tar xvf - - ÇØ´ç " " ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǫ´Â ¸í·É¾î

8) PHP ./configure ½ÇÇà

"7)" °ú °°ÀÌ ¾ÐÃàÀ» Ç®°í ³­ ÈÄ /tmp/php-4.0b3 µð·ºÅ丮¿¡¼­ mysql°ú apache Ç׸ñÀ»enable ½ÃÅ°±â À§Çؼ­ ./configure¸¦ ¾Æ·¡¿°°ÀÌ ½ÇÇàÇØ¾ß µË´Ï´Ù.

#./configure --with-apache=/tmp/apache_1.3.12 --with-mysql=/usr/local/mysql

ÀÌ ¸í·ÉÀº ³ª¸ÓÁö ´Ù¸¥ Ç׸ñÀ» Ãß°¡ ÇÒ °æ¿ì¿Í °°ÀÌ À̾ ³ª¿­ÇÏ¸é µË´Ï´Ù.

ÀÌ °°Àº ¹æ¹ýÀº ./setup ¼³Á¤ ÆÄÀÏÀÌ php3 ¹öÀü¿¡¼­´Â ¾ÈÁ¤ ¹öÀüÀ̹ǷΠÁ¸ÀçÇßÁö¸¸, °³¹ß ¹öÀüÀ̳ª ¾ÆÁ÷ ÁøÇàÁßÀÎ ¹öÀüÀÏ °æ¿ì Á÷Á¢ configure ÇØ ÁÖ¾î¾ß ÇÕ´Ï´Ù.    ./setup ¼³Á¤ÀÇ °æ¿ì´Â ±×³É ½ÇÇà ÇÏ¸é ´ëÈ­½ÄÀ¸·Î ¼³Á¤À» ÇÏ´Â °ÍÀÔ´Ï´Ù.    php ÀνºÅç ½Ã Ãß°¡ÇÒ Ç׸ñµéÀ» yes , no·Î ´äÇÏ´Â °ÍÀÔ´Ï´Ù.    ¿©±â¼­ÀÇ ¼³Á¤Àº configure·Î Á÷Á¢ ¼³Á¤Çϵµ·Ï ÇÏ°Ú½À´Ï´Ù.    ¸¸¾à À§ configure°¡ ½ÇÆÐÇßÀ»°æ¿ì´Â (apache¿Í mysql Áö¿ø ¼³Á¤) php-4.0b µð·ºÅ丮 ¾È¿¡ Á¸ÀçÇÏ´Â config.chche ÆÄÀÏÀ» Á¦°ÅÇÏ°í ´Ù½Ã -with ¿É¼ÇÀ» »ç¿ëÇؼ­ configure ÇØ¾ß ÇÕ´Ï´Ù.    ÀÏ´Ü configure À» ½ÇÇà Çß´Ù¸é(apache¿Í mysql Áö¿ø¼³Á¤) ´ÙÀ½ÀÇ Ç׸ñÀ» È®ÀÎÇÏ´Â ¹æ¹ýÀ¸·Î ½ÇÆÐ ¿©ºÎ¸¦ üũ ÇÒ ¼ö ÀÖ½À´Ï´Ù.

<TIP>----------------------------------------------------------------------------

GD ¼³Ä¡ Çϱâ

Gd´Â php¿¡¼­ ±×·¡ÇÈ ÇÔ¼ö¸¦ »ç¿ëÇϱâ À§ÇØ ¼³Ä¡ ÇÏ´Â °ÍÀÔ´Ï´Ù. ÀÌ°ÍÀ» »ç¿ëÇϱâ À§Çؼ­´Â phpÀÇ ./configure
½ÇÇà ¶§ Ãß°¡ ÇؾßÇÕ´Ï´Ù.("8)" Ç׸ñ)

¨ç tmp µð·ºÅ丮¿¡ gd ÆÐÅ°Áö¸¦ copy ÇÏ°í ¾ÐÃàÀ» DZ´Ï´Ù.

  
¨è gd make Çϱâ
    ¾ÐÃàÀ» Ǭ ÀÓÀÇÀÇ gd µð·ºÅ丮¿¡¼­ ÄÄÆÄÀÏ ÇÕ´Ï´Ù.

  
¨é gd ¿Å±â±â
    ÄÄÆÄÀÏÇÑ gd¸¦ ÀÓÀÇÀÇ µð·ºÅ丮·Î ¿Å±é´Ï´Ù. (ÇÊÀÚ´Â /usr/lib·Î ¿Å°å½À´Ï´Ù.)

  
¨ê phpÀÇ ./configure ½ÇÇà
    php¸¦ ./configure ÇÒ ¶§  ¡"--with-gd=/usr/lib" Ç׸ñÀ» Ãß°¡ÇÕ´Ï´Ù.
    ¼³Ä¡ ¼º°ø ¿©ºÎ´Â üũ Ç׸ñÀ» ã¾Æ È®ÀÎÇÕ´Ï´Ù.

--------------------------------------------------------------------------------

À§ ±×¸²¿¡¼­ ¾ÆÆÄÄ¡ Áö¿ø ¿©ºÎ¸¦ È®ÀÎ ÇÒ ¼ö ÀÖ½À´Ï´Ù.

À§ ±×¸²¿¡¼­ mysql Áö¿ø ¿©ºÎ¸¦ È®ÀÎ ÇÒ ¼ö ÀÖ½À´Ï´Ù.    ´Ù¸¥ Ç׸ñÀ» Ãß°¡ ÇÏ·Á¸é -with ¿É¼ÇÀ¸·Î ´Ù¸¥ ºÎºÐÀ» ´õ Ãß°¡ ÇÒ ¼ö ÀÖ½À´Ï´Ù.    ¿©·¯ºÐµé Áß È¤ ³ªÁß¿¡¶óµµ ´Ù½Ã PHP¿¡ ¶Ç ´Ù¸¥ Áö¿øÀ» Ãß°¡ÇÒ °æ¿ì°¡ »ý±æ °æ¿ì ÇØ´ç ÆÐÅ°Áö¸¦ ÀνºÅç ÇÏ°í phpÀÇ ./configure ½ÇÇà½Ã¿¡ --with ¿É¼ÇÀ» ÀÌ¿ëÇؼ­ ±âÁ¸ÀÇ Ç׸ñ°ú »õ·Î Ãß°¡ÇÒ Ç׸ñÀ» ´Ù½Ã ³ª¿­Çؼ­ ÇØÁÖ¸é µÇ°í ¼³Ä¡ 8)¹ø Ç׸ñ ÀÌÈĸ¦ ¹Ýº¹ ÇÏ¸é µË´Ï´Ù.

9) PHP ÄÄÆÄÀÏ

phpÀÇ ./configure¸¦ ¸ðµÎ ¸¶ÃƽÀ´Ï´Ù. ±×·³ º»°ÝÀûÀ¸·Î PHP¸¦ ÄÄÆÄÀÏ ÇÏ´Â °ÍÀ» º¸°Ú½À´Ï´Ù.    Àӽà µð·ºÅ丮ÀÇ PHP¸¦ /usr/local/php µð·ºÅ丮·Î º¹»çÇؼ­ configureÇß´Ù¸é °Å±â¼­ make¸¦ ½ÇÇàÇÏ¸é µË´Ï´Ù.    (Ȥ, ÇÊÀÚó·³ /tmp/php-4.0b3 µð·ºÅ丮¿¡¼­ make¸¦ Çصµ ¹«¹æÇÕ´Ï´Ù. )

#make ½ÇÇà

10) PHP ÀνºÅç

 
¸ÕÀú PHP¸¦ ÀνºÅç Çϱâ Àü¿¡ apache µð·ºÅ丮ÀÇ ./configure¸¦ ½ÇÇàÇØ ÁÖ°í installÀ» ÇØ¾ß ÇÕ´Ï´Ù.
Áï, ÀÌ°ÍÀº php¸¦ ÀνºÅç ÇÒ ¶§ apache µð·ºÅ丮¿¡¼­ ÇÊ¿äÇÑ ÆÄÀÏÀ» ÂüÁ¶ ½ÃÅ°±â À§ÇÔÀÔ´Ï´Ù.
/php-4.0b3 µð·ºÅ丮¿¡¼­ ¾Æ·¡¿Í °°ÀÌ ¸í·ÉÇÕ´Ï´Ù.

    #make install   -  PHP¸¦ ÀνºÅç ÇÕ´Ï´Ù.
   
±×·¯¸é ¾ÆÆÄÄ¡ÀÇ src/modules µð·ºÅ丮·Î ¸ðµâÀÌ ¸¸µé¾îÁ® À̵¿ÇÕ´Ï´Ù.

11) ¸ðµâ È®Àΰú ¾ÆÆÄÄ¡ Configuration ÆÄÀÏÀ» ¼öÁ¤

    #ls -l   -   ¾ÆÆÄÄ¡ µð·ºÅ丮¹Ø¿¡ /src/modules/php4  µð·ºÅ丮ÀÇ ³»¿ëÀ» »ìÆì º¾´Ï´Ù.

À§ ±×¸²¿¡¼­ ¾ÆÆÄÄ¡ µð·ºÅ丮¿¡ php4 µð·ºÅ丮°¡ »ý¼ºµÇ°í libphp4.module ÆÄÀÏ°ú ³ª¸ÓÁö ÆÄÀϵéÀÌ »ý¼ºµÇ´Â °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.    (PHP 4.0 ÀÇ °æ¿ìµµ ¸¶Âù°¡Áö ÀÔ´Ï´Ù.)    ´ÙÀ½ tmp/apache_1.3.12/src µð·ºÅ丮·Î À̵¿ÇÕ´Ï´Ù.    ±×¸®°í Configuration ÆÄÀÏÀÇ ³»¿ë¿¡ AddModule modules/php4/libphp4.a¸¦ Ãß°¡ÇØ ÁÝ´Ï´Ù.

(*ÁÖÀÇ : configure ÆÄÀÏÀÌ ¾Æ´Ñ Configuration ÆÄÀÏÀ» ¼öÁ¤ÇØ¾ß µË´Ï´Ù. ¶ÇÇÑ libphp4.a´Â Á¸ÀçÇÏÁö ¾Ê´Â ÆÄÀÏÀ̹ǷΠÀÌ´ë·Î Àû¾î ÁÖ¼¼¿ä.)

12) ¾ÆÆÄÄ¡ Configure ½ÇÇà°ú make Çϱâ

Configuration ÆÄÀÏÀÇ ¼öÁ¤À» ³¡³»°í ¼öÁ¤ Ç׸ñÀÇ ÀνÄÀ» À§ÇØ /tmp/apache_1.3.12/src/ µð·ºÅ丮¿¡¼­ ./Configure¸¦ ´Ù½Ã ½ÇÇàÇÕ´Ï´Ù.

´ÙÀ½ /tmp/apache_1.3.12/src µð·ºÅ丮¿¡¼­ make¸¦ ½ÇÇàÇÕ´Ï´Ù.

À§¿¡¼­ Áß°£ ºÎºÐ¿¡ .. o php4_module uses ConfigStart/End ¸¦ È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.

À§ »çÇ×ÀÌ ¾øÀ» °æ¿ì ´Ù½Ã µÚÀÇ Ç׸ñµéÀ» È®ÀÎÇϱ⠹ٶø´Ï´Ù. ( Configuration Ãß°¡ ºÎºÐÀÇ ¹®Á¦ÀÏ °¡´É¼ºÀÌ Å®´Ï´Ù.)

´ëºÎºÐÀÇ °æ¿ì´Â ¸Â°Ô ÁøÇà µÇÁö¸¸ °£È¤ ½Ç¼ö¸¦ ÇÒ ¼öµµ Àֱ⠶§¹®¿¡ ÁÖÀÇÇϱ⠹ٸ³´Ï´Ù.    Apache , php , mysqlÀÇ ¼³Ä¡´Â ±×´ÙÁö ¾î·Á¿î ºÎºÐÀÌ ¾Æ´Ï¹Ç·Î ¸ðµç °ÍÀÌ µðÆúÆ®ÀÎ »óȲ¿¡¼­ ´ëºÎºÐ ¼º°øÀûÀ¸·Î ÀνºÅç µÉ °ÍÀÔ´Ï´Ù.

13) ¾ÆÆÄÄ¡ install

make °úÁ¤À» ¸¶ÃÆ´Ù¸é /tmp/apache_1.3.12 µð·ºÅ丮·Î À̵¿ ÇÕ´Ï´Ù.

±×¸®°í make installÀ» ½ÇÇàÇÕ´Ï´Ù.

#make install

"13)" À» ¸¶Áö¸·À¸·Î ¸ðµç ¼³Ä¡´Â ³¡³µÁö¸¸ ¾ÆÁ÷ php¸¦ »ç¿ëÇϱâ À§Çؼ­´Â ¸î °¡Áö ¼³Á¤ÇÒ ºÎºÐÀÌ ´õ ³²¾Æ ÀÖ½À´Ï´Ù.

Php make installÀÇ ¸¶Áö¸· ¹®±¸¸¦ º¸¸é /usr/local/apache/conf/httpd.confÀÇ ¼­¹ö ¼³Á¤À» º¯°æÇؼ­ PHP ½ºÅ©¸³Æ®¸¦ »ç¿ëÇØ¾ß ÇÔÀ» ¾Ë ¼ö ÀÖ½À´Ï´Ù.

14)¾ÆÆÄÄ¡ÀÇ httpd.conf ÆÄÀÏ ¼öÁ¤

¸ÕÀú /usr/local/apache/conf µð·ºÅ丮·Î À̵¿ ÇÕ´Ï´Ù.

±×¸®°í ÆíÁý±â¸¦ ÀÌ¿ëÇؼ­ httpd.conf ÆÄÀÏÀ» ¼öÁ¤ÇÕ´Ï´Ù.    ¼öÁ¤ ÇÏ´Â ºÎºÐÀº ¾ÆÆÄÄ¡¿¡¼­ php È®ÀåÀÚ¸¦ ÀνĽÃÅ°±â À§ÇÔÀÔ´Ï´Ù.    php ¸»°íµµ ¿©·¯ °¡Áö È®ÀåÀÚ¸¦ ¼³Á¤ÇÒ ¼öµµ ÀÖ½À´Ï´Ù.

AddType application/x-httpd-php .php .html .htm .inc

ÀÌ·¸°Ô ´Ù¸¥ È®ÀåÀÚ¸¦ Ãß°¡ÇÕ´Ï´Ù. Áï, php ¾ð¾î¸¦ htmlÀ̳ª ±âŸ ´Ù¸¥ È®ÀåÀÚ ÆÄÀϷεµ »ç¿ë °¡´ÉÇÏ°Ô ÇØÁÝ´Ï´Ù.

ÀÌ·¸°Ô ¸ðµç ¼³Á¤À» ¸¶ÃƽÀ´Ï´Ù. ÀÌÁ¦ È®ÀÎÇÒ ºÎºÐÀº apacheÀÇ Á¤»óÀûÀÎ ÀÛµ¿ À¯¹«¿Í ¸ðµâµéÀÇ Á¤»óÀûÀÎ µ¿ÀÛ À¯¹«ÀÔ´Ï´Ù.

Apache_1.3.12 °°Àº °æ¿ì httpd.confÀÇ ¼³Á¤ÀÌ Àü ¹öÀü º¸´Ù Á¶±Ý ´Ù¸¦ ¼öµµ ÀÖÁö¸¸ ±âº»ÀûÀÎ ¼³Á¤Àº °°½À´Ï´Ù.

(http.conf ¼³Á¤¿¡¼­ php4¼³Á¤ ºÎºÐÀÌ Ãß°¡µÇ¾î ÀÖ½À´Ï´Ù.)

15) ¾ÆÆÄÄ¡ ÀÛµ¿ À¯¹« È®ÀÎ

¾ÆÆÄÄ¡¸¦ ½ÇÇàÇÏ´Â ¹æ¹ý°ú ¸ØÃß´Â ¹æ¹ý µîÀÇ ¿©·¯ °¡Áö ¿É¼ÇÀ» È®ÀÎÇØ º¸°Ú½À´Ï´Ù.

apachectl »ç¿ëÇϱâ

apachectl ´Â /usr/local/apache/bin µð·ºÅ丮¿¡ ¼­¹ö¿Í °ü·ÃµÈ À¯Æ¿¸®Æ¼µéÀÌ Á¸ÀçÇÕ´Ï´Ù.

./apachectl (start|stop|restart|fullstatus|status|gracefull|configtest|help)

      -. start - httpd µ¥¸óÀ» ¶ç¿ó´Ï´Ù.
      -. stop - httpd µ¥¸óÀ» Á¾·á ÇÕ´Ï´Ù.
      -. restart - httpd µ¥¸óÀÌ Á¸Àç ÇÏ¸é ´Ù½Ã ½ÃÀÛÇÏ°í ¾øÀ» °æ¿ì »õ·Î ½ÃÀÛ ÇÕ´Ï´Ù.
      -. fullstatus - mod_status°¡ »ç¿ë °¡´ÉÇÒ °æ¿ì ¼­¹öÀÇ »óŸ¦ ÀÚ¼¼È÷ º¸¿© ÁÝ´Ï´Ù.
      -. status - mod_status°¡ »ç¿ë °¡´ÉÇÒ °æ¿ì ¼­¹öÀÇ »óŸ¦ °£·«È÷ º¸¿© ÁÝ´Ï´Ù.
      -. configtest - httpd.conf ÆÄÀÏÀ» º¯°æ ÇßÀ» °æ¿ì ÀÌ ³»¿ëÀ» Å×½ºÆ® ÇÕ´Ï´Ù.
      -. help - µµ¿ò¸»À» º¸¿© ÁÝ´Ï´Ù.

#./apachectl start - httpd µ¥¸óÀ» ½ÇÇà ÇÕ´Ï´Ù.

#./apachectl stop - httpd µ¥¸óÀ» Á¾·á ÇÕ´Ï´Ù.

<TIP>----------------------------------------------------------------------------

pache¸¦ ¸®´ª½º¿Í °°ÀÌ ½ÇÇàÇϱâ

Mysql°ú °°ÀÌ ½ÃÀÛ ¼³Á¤¿¡ Ãß°¡ÇØ ÁÖ¸é µË´Ï´Ù.
"/etc/rc.d/rc.local" ÆÄÀÏ¿¡ ¾Æ·¡ Ç׸ñÀ» Ãß°¡ ÇÕ´Ï´Ù.

    If [ -f /usr/local/apache/bin/httpd ]; then 
           /usr/local/apache/bin/apachectl start
        fi
----------------------------------------------------------------------------------------------------

ÀÌÁ¦ httpd µ¥¸óÀ» ¶ç¿ì°í Á¤»óÀûÀ¸·Î µ¿ÀÛÇÏ´ÂÁö È®ÀÎÇÕ´Ï´Ù.    È®ÀÎÇÏ´Â ¹æ¹ýÀº ºê¶ó¿ìÀú¸¦ ÅëÇؼ­ Çصµ µÇ°í, ÅؽºÆ® ¸ðµå¿¡¼­ #ps -aux | grep apache¸¦ ÀÔ·ÂÇؼ­ È®ÀÎÇÏ´Â ¹æ¹ýÀÌ ÀÖ½À´Ï´Ù.    ¸ÕÀú, ºê¶ó¿ìÀú °°Àº °æ¿ì, È®ÀÎ ÇÏ´Â °÷ÀÌ ¼­¹ö¸é http://localhost¸¦ ÀÔ·Â ÇÏ¸é µÇ°í DNS ¼³Á¤ÀÌ µÇ¾î ÀÖ°í µî·ÏµÈ »óŶó¸é ÇØ´ç DNS¸¦ ÀÔ·Â ÇÏ¸é µË´Ï´Ù.    ¸¸¾à È®ÀÎÇÏ·Á´Â °÷ÀÌ ¼­¹ö°¡ ¾Æ´Ï°í Ŭ¶óÀ̾ðÆ® PCÀÏ °æ¿ì ¾ÆÆÄÄ¡ ¼­¹öÀÇ IP³ª ÇØ´ç DNS¸¦ ÀÔ·ÂÇÕ´Ï´Ù.

À§ÀÇ °æ¿ì Ŭ¶óÀ̾ðÆ®¿¡¼­ ¾ÆÆÄÄ¡ ¼­¹ö·Î Á¢¼ÓÇÑ ¿¹ÀÔ´Ï´Ù.    ¾ÆÆÄÄ¡_1.3.12 ¹öÀüÀÇ °æ¿ì óÀ½ ºê¶ó¿ìÀú·Î Á¢¼ÓÇϸé À§¿Í °°ÀÌ ³ª¿À´Ï ´çȲÇÏÁö ¸¶¼¼¿ä.    À§ÀÇ È­¸éÀº /usr/local/apache/htdocs µð·ºÅ丮¿¡ Á¸ÀçÇÏ´Â index.htmlÀ» ÂüÁ¶ÇÏ´Â °ÍÀε¥ httpd.conf ÆÄÀÏÀÇ ¼³Á¤ Áß¿¡ ¼­¹öÀÇ Ã³À½ º¸¿©ÁÙ ÆÄÀϼ³Á¤À» »õ·Ó°Ô ÇØ ÁÖ¸é ±× È­¸é¸¸ Ãâ·ÂµÇ¾î Áý´Ï´Ù.    ¾ÆÆÄÄ¡_1.3.9ÀÇ °æ¿ì index.htmlÀÌ Çϳª¸¸ Á¸Àç ÇϹǷΠ±× ÆÄÀϸ¸ Ãâ·Â µÇ´Â °ÍÀÔ´Ï´Ù.(1.3.12ÀÇ °æ¿ì °¢ ¾ð¾îº° index ÆÄÀÏÀÌ Á¸Àç ÇÕ´Ï´Ù.)

À§ ±×¸²Àº ¿©·¯ °¡Áö index.htmlÁß¿¡ English¸¦ ¼±ÅÃÇÑ È­¸éÀÔ´Ï´Ù.

16) PHP4 µ¿ÀÛ È®Àΰú °¢ ¸ðµâ ÀÎ½Ä È®ÀÎ

ÀÌÁ¦ php4 ¿Í mysqlÀÇ ¸ðµâµéÀÌ Á¦´ë·Î µ¿ÀÛ ÇÏ´ÂÁö È®ÀÎÇØ º¸°Ú½À´Ï´Ù.    ¸ÕÀú, mysql ¼­¹ö¸¦ ½ÇÇàÇß´ÂÁö È®ÀÎÇÏ°í, test.php¸¦ ¸¸µé¾î À¥ »óÀ¸·Î ¸ðµâµéÀÇ ÀνÄÀ» È®ÀÎ ÇÏ°Ú½À´Ï´Ù.    ( phpinfo( ) ÇÔ¼ö¸¦ »ç¿ëÇÕ´Ï´Ù. ÀÌ ÇÔ¼ö´Â PHPÀÇ Á¤º¸¸¦ Ãâ·ÂÇÕ´Ï´Ù.)

test.php ÆÄÀÏÀÇ ³»¿ë

    <?php
        phpinfo();
    ?>

À§ÀÇ ÆÄÀÏÀ» ÆíÁý±â¸¦ ÀÌ¿ëÇØ ¸¸µé¾î ÁÝ´Ï´Ù.    ±×¸®°í /usr/local/apache/htdocs µð·ºÅ丮¿¡ copy ÇÕ´Ï´Ù.

(ÇÊÀÚÀÇ °æ¿ì´Â test µð·ºÅ丮¸¦ µû·Î ¸¸µé¾ú½À´Ï´Ù.)

±×¸®°í ºê¶ó¿ìÀú¸¦ ½ÇÇàÇØ º¾´Ï´Ù.   À§¿¡¼­ ¸»ÇßµíÀÌ ºê¶ó¿ìÀú¸¦ ½ÇÇà ÇßÀ» °æ¿ì ¼­¹ö´Â htdoc µð·ºÅ丮¸¦ ÂüÁ¶Çϱ⠶§¹®¿¡ ¸®´ª½º ¸Ó½Å¿¡¼­´Â http://localhost/test.php¸¦ ÀÔ·ÂÇÏ¸é µË´Ï´Ù.

(ÇÊÀÚÀÇ °æ¿ì http://192.168.0.1/test/test.php)

À§ È­¸éÀÌ º¸À̸é Á¦´ë·Î µ¿ÀÛÇÏ´Â °ÍÀÔ´Ï´Ù.    ±×·¯³ª ´Ù½Ã ½ºÅ©·Ñ¹Ù¸¦ ³»·Á php ¼³Á¤°ú mysql ¼³Á¤µéÀ» È®ÀÎÇϱ⠹ٶø´Ï´Ù.    Php ¼³Á¤ÀÇ °æ¿ì php.ini ÆÄÀÏÀ» ÀÌ¿ëÇϴµ¥ À§ È­¸é¿¡¼­ path:/usr/local/lib¿¡ Á¸ÀçÇÔÀ» ¾Ë ¼ö ÀÖ½À´Ï´Ù.

<TIP>----------------------------------------------------------------------------

HP.INI °¡ /usr/local/lib¿¡ ¾øÀ» °æ¿ì

    php¸¦ óÀ½ Ç®°í ÄÄÆÄÀÏ Çß´ø µð·ºÅ丮·Î À̵¿ÇØ php.ini-dist ÆÄÀÏÀ» /usr/local/lib µð·ºÅ丮·Î copy ÇÏ¸é µË´Ï´Ù.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;¹°·Ð, php.ini·Î À̸§À» ¹Ù²Ù¾î »ç¿ëÇØ¾ß ÇÕ´Ï´Ù.
----------------------------------------------------------------------------------------------------

ÀÌ·¸°Ô ¸ðµç ¼³Á¤°ú È®ÀÎÀ» ¸¶ÃƽÀ´Ï´Ù. ( "1)"   "16)" ¹ø Ç׸ñÀº ¸î¹ø µÇÇ®ÀÌ Çϸ鼭 ÀÍÈ÷¼¼¿ä.)

PHP.INI ¼³Á¤

PHP¸¦ À¥ ¼­¹ö¿¡¼­ ¿©·¯ ¹æ¹ýÀ¸·Î ½ÇÇàÇÒ ¼ö ÀÖ°Ô ¼³Á¤ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù.

(php4 ÀÇ °æ¿ì php.ini ÀÌ°í, php3ÀÇ °æ¿ì php3.ini ÀÔ´Ï´Ù.)

¼³Á¤µéÀ» ¼öÁ¤ ÇÒ ½Ã¿¡´Â on, off ³ª ÇØ´ç °ªÀ» Ãß°¡ ¶Ç´Â »èÁ¦ÇÏ°í À¥»ó¿¡¼­ test ÆÄÀÏÀ» ´Ù½Ã È®ÀÎÇϸé ÁÖ¾îÁø ¼³Á¤µéÀÌ ¹Ù²î¾ú´ÂÁö È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;´Ù¸¥ ¹æ¹ýµµ ÀÖ°ÚÁö¸¸ ÀÌ ¹æ¹ýÀÌ Á¦ÀÏ È®½ÇÇÕ´Ï´Ù.

<TIP>----------------------------------------------------------------------------

¸®´ª½º¿¡¼­ Zend ¼³Ä¡Çϱâ

Zend optimizerÀÇ ¼³Ä¡´Â º¸±â º¸´Ù °£´Ü ÇÕ´Ï´Ù. ¸®´ª½ºÀÇ ¸ðµç ÆÐÅ°Áö ÆÄÀÏÀº README¶ó´Â ÆÄÀÏÀÌ Á¸Àç Çϸé ÀÌ¿Í ¿¬°üµÈ ÆÄÀÏÀ» ÀÚ¼¼È÷ Àоú´ø »ç¶÷ À̶ó¸é ±Ý¹æ ¼³Ä¡ ¹æ¹ýÀ» ¾Ë¾Æ³ÂÀ» °ÍÀÔ´Ï´Ù.

Zend optimizer´Â PHP 4 beta 4 ÀÌÈÄ ¹öÀü¸¸ »ç¿ë °¡´ÉÇϸç Áö±Ý ¿©·¯ºÐµéÀº ÀÌ¹Ì PHP 4.0À» ¼³Ä¡ ÇßÀ» °ÍÀÔ´Ï´Ù.

Áö¿øÇÏ´Â ½Ã½ºÅÛ

PHP 4 beta 4 ¹öÀüÀÇ °æ¿ì

  • Linux (glibc 2.1 systems including Redhat 6.1, Slackware 7.0, Suse 2.2, Mandrake 7.0)
  • FreeBSD 3.4 (not tested on other versions of FreeBSD)
  • Windows NT 4.0 (not tested on other versions of Windows)

¼³Ä¡¿Í ÀνºÅç

ZendOptimizer-Beta1-Linux-glibc2.1.tar.gz ÆÄÀÏÀ» Ç®°í /usr/local/Zend/lib µð·ºÅ丮¸¦ »ý¼º ÇÑ´Ù. ±×¸®°í ZendOptimizer.so ÆÄÀÏÀ» ÀÌ µð·ºÅ丮·Î copy ÇÑ´Ù.

´ÙÀ½ PHP.INI ÆÄÀÏ¿¡ ¾Æ·¡ÀÇ ³»¿ëÀ» Ãß°¡ ÇÑ´Ù.

zend_optimizer.optimization_level=1

zend_extension="/usr/local/Zend/lib/ZendOptimizer.so"

À§ levelÀº 7¹ø ±îÁö Á¸Àç Çϸç ÆÐÅ°Áö README¸¦ ÀÐ¾î º¸±â ¹Ù¶ø´Ï´Ù.

µ¿ÀÛ È®ÀÎÀº phpinfo() ÇÔ¼ö¸¦ »ç¿ëÇØ PHP.INI ¼³Á¤À» È®ÀÎ Çؼ­ ¾Æ·¡ÀÇ ³»¿ëÀÌ ³ª¿À¸é µ¿ÀÛ ÇÏ´Â °ÍÀÔ´Ï´Ù.

     This program makes use of the Zend scripting language engine:
     Zend Engine v0.90, Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski
     with Optimizer v0.95, Copyright (c) 1998-2000, by Zend Technologies Ltd.
----------------------------------------------------------------------------------------------------

PHP.INI ³»¿ë°ú °¢ ¿É¼ÇÀÇ ±â´É(PHP4 ±âÁØ)

¼³Á¤ ÆÄÀÏÀº ÃÑ 9°³ÀÇ Ç׸ñÀ¸·Î ³ª´©¾îÁ® ÀÖÀ¸¸ç ¿©±â¼­´Â ÇÔ²² ¼³¸íÇÏ°Ú½À´Ï´Ù.

1. engine - PHP°¡ ¾ÆÆÄÄ¡ ¸ðµâ·Î ¼³Ä¡ µÇ¾úÀ» °æ¿ì ƯÁ¤ µð·ºÅ丮¿¡¼­¸¸ ½ºÅ©¸³Æ®°¡ µ¿ÀÛÇÏ°Ô ÇÕ´Ï´Ù. 
   ÀÌ°ÍÀº ¾ÆÆÄÄ¡ httpd.conf ÆÄÀÏ¿¡ ¾Æ·¡ Ç׸ñÀ» Ãß°¡ÇÕ´Ï´Ù.

      <Directory "ÇØ´ç µð·ºÅ丮">
      php_admin_flag engine on(PHP3ÀÇ °æ¿ì php3_engine on)
      </ Directory> 

2. short_open_tag - <? ~ ?> php tag »ç¿ë¿©ºÎ¸¦ Á¤ÇÕ´Ï´Ù. XML°ú °°ÀÌ »ç¿ëÇÒ °æ¿ì ÀÌ ºÎºÐÀº onÀ¸·Î
                    ÇØ¾ß ÇÕ´Ï´Ù.
                  
3. asp_tags - <% ~ %> ASP ű×ÀÇ »ç¿ë ¿©ºÎ¸¦ ¼³Á¤ÇÕ´Ï´Ù.
                   
4. y2k_compliance - y2k ¹®Á¦¿¡ ÇØ´çÇÏ´Â ºê¶ó¿ìÀú¸¦ À§ÇÑ ¼³Á¤ÀÔ´Ï´Ù.
                    
5. safe_mode - php¸¦ ¾ÈÀü ¸ðµå·Î µ¿ÀÛ ÇÏ°Ô²û ÇÏ´Â ¼³Á¤ÀÔ´Ï´Ù.

   safe_mode_exec_dir Áö½ÃÀÚÀÇ ÇØ´ç µð·ºÅ丮¿¡ Á¸ÀçÇÏ´Â ½ÇÇà ÆÄÀÏÀÌ ¾Æ´Ñ °æ¿ì  ½ÇÇà µÇÁö ¾Ê½À´Ï´Ù.
   (root¿¡ ÀÖ´Â ÆÄÀϸ¸ ÂüÁ¶ÇÏ°Ô ÇÕ´Ï´Ù.)
                          
6. safe_mode_exec_dir - ½ÇÇà ÇÁ·Î±×·¥ÀÌ ÀÖ´Â µð·ºÅ丮 ¸íÀ» Àû¾î ÁÝ´Ï´Ù. 

      "5¹ø"Âü°í
                           
7. max_execution_time  - ½ºÅ©¸³Æ® ½ÇÇà ½Ã°£À» ÃÊ´ÜÀ§·Î ¼³Á¤ÇÕ´Ï´Ù.
                            
8. memory_limit  - ½ºÅ©¸³Æ® ½ÇÇà ¶§ ¸Þ¸ð¸® »ç¿ëÀ» ¼³Á¤ÇÕ´Ï´Ù.
                                 
9. error_reporting - ¿¡·¯ Ãâ·ÂÀ» ¼³Á¤ÇÕ´Ï´Ù.

   ¿¡·¯ÀÇ Á¾·ù

      1 - ÀϹÝÀûÀÎ ¿¡·¯ Ãâ·Â(Normal function errors)
      2 - ÀϹÝÀûÀÎ ¿¡·¯ Ãâ·Â(Normal warnings)
      4 - ¹®¹ýÀûÀÎ ¿¡·¯ Ãâ·Â(Parser errors) 
      8 - ¹ö±×ÀÇ °¡´É¼ºÀÌ ÀÖÀ¸¸ç ¹«½ÃÇÒ ¼ö ÀÖ´Â ¿¡·¯ Ãâ·Â(Notices)

10. display_errors - ¿¡·¯ »óȲÀ» html ¾ç½ÄÀ¸·Î º¸¿©ÁÝ´Ï´Ù.
                                    
11. log_errors - ¿©·¯ °¡Áö ¿¡·¯¸¦ ·Î°í ÆÄÀÏ¿¡ ÀúÀåÇÕ´Ï´Ù.

12. track_errors - $php_errormsg¿¡ ¸¶Áö¸·ÀÇ ¿¡·¯³ª °æ°í ¸Þ½ÃÁö¸¦ ÀúÀåÇÕ´Ï´Ù.

13. warn_plus_overloading - ½ºÅ©¸³Æ®¿¡¼­ ¹®ÀÚ¿­ °áÇÕ»ç¿ë ¶§ " . " ¿¬»êÀÚ¸¦ »ç¿ëÇÏÁö¸¸ ¸¸¾à
                            " + "¸¦ »ç¿ëÇßÀ» °æ¿ì °æ°í ¸Þ½ÃÁö Ãâ·Â ¿©ºÎ¸¦ ¼³Á¤ÇÕ´Ï´Ù.

14. track_vars - GET, POST, COOKIE µîÀ¸·Î Àü´ÞµÈ º¯¼ö °ªÀ» °¢°¢ÀÇ  $HTTP_GET_VARS , $HTTP_POST_VARS ,
                 $HTTP_COOKIE_VARSÀÇ ¹è¿­ º¯¼ö·Î  ÀÚµ¿ ÀúÀå ¿©ºÎ¸¦ ¼³Á¤ÇÕ´Ï´Ù.
                                            
15. magic_quotes_gpc - GET , POST , COOKIE µîÀ¸·Î Àü´ÞµÈ µ¥ÀÌÅÍ¿¡ ¡® " / µîÀÇ ¹®ÀÚ°¡ Á¸ÀçÇÒ °æ¿ì
                       ÀÚµ¿À¸·Î (\)¿ª½½·¡½¬¸¦ ºÙÀÏÁö ¿©ºÎ¸¦ ¼³Á¤ÇÕ´Ï´Ù. ÀÌ°ÍÀº °¢ ¹®ÀÚ¸¦ ½ºÅ©¸³Æ®¿Í ±¸º°
                       Çؼ­ ÀνĽÃÅ°±â À§ÇØ ÇÊ¿äÇÑ ºÎºÐÀÔ´Ï´Ù.
                                                    
16. magic_quotes_runtime - ¿ÜºÎ ½ºÅ©¸³Æ®³ª ¿©Å¸ ¼Ò½º·ÎºÎÅÍ µ¹¾Æ¿À´Â µ¥ÀÌÅÍ¿¡ ´ëÇØ (\)¿ª½½·¡½¬¸¦ ºÙÀÏÁö
                           ¿©ºÎ¸¦ ¼³Á¤ÇÕ´Ï´Ù.
                                                         
17. auto_prepend_file - INCLUDE¿Í ºñ½ÁÇÑ ºÎºÐÀÌ°í, ½ºÅ©¸³Æ®ÀÇ Ã³À½ ºÎºÐ¿¡ Æ÷Ç﵃ ÆÄÀϸíÀ» Àû¾î ÁÝ´Ï´Ù.
                                                          
18. auto_append_file - "17¹ø"°ú °°À¸¸ç ¸¶Áö¸· ºÎºÐ¿¡ Æ÷Ç﵃ ÆÄÀϸíÀ» Àû¾î ÁÝ´Ï´Ù.
                                                           
19. include_path - INCLUDE, REQUIRE ¹®ÀÇ ÆÄÀÏ °æ·Î¸¦ ¼³Á¤ÇÕ´Ï´Ù.
                                                            
20. doc_root - ¼­¹öÀÇ ·çÆ® µð·ºÅ丮¸¦ ¼³Á¤ÇÕ´Ï´Ù. ¾ÈÀü ¸ðµå·Î µ¿ÀÛÇÒ °æ¿ì ÇØ´ç µð·ºÅ丮¸¦ ¹þ¾î³ª ´Ù¸¥
               ÂÊÀ¸·Î Á¢±ÙÀ» ÇÒ ¼ö ¾ø½À´Ï´Ù.
                                                                 
21. user_dir - ¼­¹öÀÇ °èÁ¤À» °¡Áø ÀÏ¹Ý À¯Àú¿¡ PHP ½ºÅ©¸³Æ®ÀÇ »ç¿ëÀ» Çã°¡ÇÒ ¼ö ÀÖ½À´Ï´Ù.
                                                                  
22. upload_tmp_dir - ÆÄÀÏÀÌ ¾÷·Îµå µÉ µð·ºÅ丮¸¦ ¼³Á¤ÇÕ´Ï´Ù. ±âº»ÀûÀ¸·Î /tmp µð·ºÅ丮·Î ¾÷·Îµå µË´Ï´Ù.
                                                                   
23. upload_max_filesize - ¾÷·Îµå ÇÒ ¼ö ÀÖ´Â ÃÖ´ë ÆÄÀÏ Å©±â¸¦ ¼³Á¤ÇÕ´Ï´Ù.
                                                                    
24. SMTP - mail( ) ÇÔ¼öÀÇ »ç¿ëÀ» À§ÇØ Çö ¼­¹öÀÇ DNS , IP¸¦ Àû¾îÁÝ´Ï´Ù. 
                                                                          
25. sendmail_from - º¸³»´Â ¸ÞÀÏ ÁÖ¼Ò¸¦ ¼³Á¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.
                                                                           
26. sendmail_path - sendmail ¼­¹ö°¡ ÀÖ´Â À§Ä¡¸¦ Àû¾î ÁÝ´Ï´Ù.

27. debugger.host - µð¹ö°Å·Î »ç¿ëÇϴ ȣ½ºÆ® ¸íÀ» Àû¾î ÁÝ´Ï´Ù.
                                                                                 
28. debugger.port - µð¹ö°Å·Î »ç¿ëÇÏ´Â Æ÷Æ® ¹øÈ£¸¦ Àû¾î ÁÝ´Ï´Ù.
                                                                                  
29. debugger.enabled - µð¹ö°ÅÀÇ »ç¿ë ¿©ºÎ¸¦ ¼³Á¤ ÇÕ´Ï´Ù.
                                                                                   
30. session.save_handler - ¼¼¼Ç°ú ÇØ´ç µ¥ÀÌÅ͸¦ ÀúÀåÇÏ´Â ¹æ½ÄÀ» ¼³Á¤ÇÏ´Â ºÎºÐÀÔ´Ï´Ù. ±âº»ÀûÀ¸·Î ÆÄÀÏ ¹æ½Ä
                           ÀÔ´Ï´Ù. ¼¼¼Ç Ç׸ñÀº ÀÌ Ã¥¿¡ »ç¿ëµÇ´Â ȸ¿øÁ¦ ºÎºÐ¿¡¼­ »ç¿ëµË´Ï´Ù.

31. session.save_path - ¼¼¼Ç Àü´Þ Àμö¸¦ Á¤ÀÇ ÇÏ´Â ºÎºÐÀÌ¸ç µðÆúÆ®ÀÎ ÆÄÀÏ ¹æ½ÄÀÏ °æ¿ì ÇØ´ç ÆÄÀÏÀÇ °æ·Î¸¦
                        Àû¾î ÁÝ´Ï´Ù.

32. session.name - ÄíÅ° À̸§À¸·Î »ç¿ëµÇ¾îÁú ¼¼¼Ç À̸§À» ¼³Á¤ÇÕ´Ï´Ù. µðÆúÆ®´Â PHPSESSIDÀÔ´Ï´Ù.

33. session.auto_start - ¼¼¼Ç ¿äû ½Ã¿¡ ÀÚµ¿ ¸ðµâ »ý¼º ¿©ºÎ¸¦ ¼³Á¤ÇÕ´Ï´Ù.

        0 - off , 1 - on

34. session.lifetime - ÇØ´ç ¼¼¼ÇÀÌ À¯Áö µÇ´Â ½Ã°£À» ¼³Á¤ ÇÕ´Ï´Ù.
                µðÆúÆ®ÀÇ °æ¿ì 0ÀÌ¸ç »ç¿ëÀÚÀÇ ºê¶ó¿ìÀú°¡ Á¾·á µÉ ¶§±îÁö À¯ÁöµË´Ï´Ù.
                                                                                           
35. session.gc_probability - ÇØ´ç ¼¼¼Ç °ªÀÌ Á¦°Å µÉ °æ¿ì ³¶ºñ µÇ´Â ½Ã½ºÅÛ ¸Þ¸ð¸® ÀÚ¿øÀ» ¹Ý³³ÇÏ´Â ½ÃÁ¡À»
                ¼³Á¤ÇÕ´Ï´Ù.

36. session.gc_maxlifetime - ÇØ´ç ¼¼¼ÇÀÇ ½Ã½ºÅÛ ¸Þ¸ð¸® ÀÚ¿ø ¹Ý³³À» °¡Áú ¼ö ÀÖ´Â  ½Ã°£À» ¼³Á¤ÇÕ´Ï´Ù.

´ÙÀ½ Àå¿¡¼­´Â ¸®´ª½º¿¡¼­ A.P.MÀÇ ¼³Ä¡ °úÁ¤À» º¸¾Ò½À´Ï´Ù.    ´ÙÀ½ Àå¿¡¼­´Â À©µµ¿ì ȯ°æ¿¡¼­ Apache, Php, MysqlÀÇ ¼³Ä¡¸¦ ¼³¸íÇÏ°Ú½À´Ï´Ù.

4. À©µµ¿ì 98°ú 2000(NT)¿¡¼­ A.P.M ¼³Ä¡

À©µµ¿ì 98°ú À©µµ¿ì 2000 ±×¸®°í NT¿¡¼­ APACHE , PHP, MYSQLÀ» ¼³Ä¡ÇÏ´Â ¹æ¹ýÀ» »ìÆì º¸µµ·Ï ÇÏ°Ú½À´Ï´Ù. Linux¿Í sloraris¿¡¼­ÀÇ

¼³Ä¡ º¸´Ù´Â ÇÑ°á °£ÆíÇÑ ºÎºÐµéÀÌ ¸¹°í ¼Õ½±°Ô Ŭ¸¯°ú ¸î °¡Áö ¼öÁ¤ ¸¸À¸·Îµµ °£´ÜÈ÷ ¼³Ä"¡ ÀÌ·ç¾î Áý´Ï´Ù.

ÇÏÁö¸¸ ¾ÆÁ÷ ÃֽŠ¹öÀüÀÇ apacheÀÇ °æ¿ì³ª mysql , php , zend Optimizer °æ¿ì´Â °ËÁõÀÌ µÇÁö ¾ÊÀº »óÅÂÀ̹ǷΠÀ©µµ¿ì ȯ°æ¿¡¼­ÀÇ ¼­¹ö ¿î¿µÀº ¾ÆÁ÷ ¹«¸®¶ó°í º¾´Ï´Ù. À©µµ¿ì ȯ°æ¿¡¼­ °£ÆíÈ÷ ÀÛ¾÷ÇÏ°í ±×¸®°í ½ºÅ©¸³Æ® Å×½ºÆ®ÇÏ´Â °Í¿¡´Â ¹«¸®°¡ ¾øÀ¸¹Ç·Î ±×·¸°Ô È°¿ëÇصµ µË´Ï´Ù.

4.1 À©µµ¿ì¿ë A.P.M ¼³Ä¡

1) mysql ¼³Ä¡(3.22.34win)

¿øÇÏ´Â °÷¿¡ mysqlÀ» Ç®°í ÀνºÅç ÇÕ´Ï´Ù.

´ëºÎºÐÀÇ ÀÏ¹Ý ÀνºÅç ¹æ¹ýó·³ 3°¡Áö ÀνºÅç ¼±Åà ¹æ¹ýÀÌ ÀÖÀ¸³ª ÀüÇüÀûÀÎ ¹æ¹ýÀ¸·Î ¼³Ä¡ÇÏ¸é µË´Ï´Ù.

c:\mysql µð·ºÅ丮·Î À̵¿ÇÑ ÈÄ Á¦´ë·Î ÀνºÅçÀÌ µÇ¾ú³ª È®ÀÎÇØ º¾´Ï´Ù.

2) ODBC ÀνºÅç

ODBCÀÇ °æ¿ì nt(2000)¿ë°ú 98¿ëÀÌ µû·Î Á¸ÀçÇϹǷΠÇØ´ç ODBC¸¦ ÀνºÅçÇÏ¸é µË´Ï´Ù.

3) PHP ÀνºÅç (PHP4 RC1)

PHPÀÇ °æ¿ì ÀνºÅç·¯°¡ ¾ø±â ¶§¹®¿¡ ƯÁ¤ µð·ºÅ丮¸¦ »ý¼ºÇÏ°í °Å±â¿¡ ¾ÐÃàÀ» Ç®¾î ³õ¾Æ¾ß µË´Ï´Ù. ¿©±â¼­´Â c:\php µð·ºÅ丮¿¡ ¾ÐÃàÀ» Ç®¾ú½À´Ï´Ù.

»ç¿ëÀÚ¿¡ µû¶ó ƯÁ¤ µð·ºÅ丮·Î ÇÏ¸é µË´Ï´Ù.

À§ ±×¸²¿¡¼­ c:\php µð·ºÅ丮¸¦ º¸¸é php.ini-dist ÆÄÀÏÀÌ Á¸Àç Çϴµ¥ ÀÌ ÆÄÀÏÀ» php.ini·Î °íÄ£ ÈÄ (À©µµ¿ì 98ÀÇ °æ¿ì´Â c:\windows¿¡ NT³ª 2000ÀÇ °æ¿ì´Â c:\winnt·Î copy ÇØ¾ß µË´Ï´Ù.) ´ÙÀ½ ȯ°æ ¼³Á¤ ÆÄÀÏ(php.ini)À» ¸Þ¸ðÀå µîÀ¸·Î ³»¿ëÀ» ¼öÁ¤ÇÕ´Ï´Ù.

extension_dir = "c:\php"·Î ¼öÁ¤ ÇÕ´Ï´Ù.

´ÙÀ½ ±×¸² 4-7¿¡¼­ extension Ç׸ñµµ ¼öÁ¤ÇÕ´Ï´Ù enable´Â ¾ÕÀÇ ;¸¦ Á¦°ÅÇÕ´Ï´Ù.

4) APACHE ÀνºÅç (1.3.12win)

¾ÆÆÄÄ¡ ¿ª½Ã ÀüÇüÀûÀÎ ÀνºÅçÀ» ÇÏ¸é µË´Ï´Ù. ÀνºÅçÀ» ´Ù Çϸé c:\program Files\apache Group\apache·Î µð·ºÅ丮°¡ »ý¼º µË´Ï´Ù.

Linux ¿¡¼­¿Í ¸¶Âù°¡Áö·Î conf µð·ºÅ丮ÀÇ httpd.conf ÆÄÀÏ¿¡ addtype Ç׸ñÀ» Ãß°¡ ÇÕ´Ï´Ù.

¿øÇÏ´Â È®ÀåÀÚ¸¦ ¾Æ·¡¿Í °°ÀÌ Ãß°¡ÇØÁÖ¸é µË´Ï´Ù.

    ScriptAlias /php/ "c:/php/"

    AddType application/x-httpd-php .inc
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .htm
    AddType application/x-httpd-php .html
    AddType application/x-httpd-php .phtml
    AddType application/x-httpd-php-source .phps

    Action application/x-httpd-php "/php/php.exe"

À§¿¡¼­ addtype Ç׸ñÀº ¿©·¯ºÐµéÀÌ ÇÊ¿äÇÑ ¸¸Å­ È®ÀåÀÚ¸¦ Ãß°¡ÇØ ÁÝ´Ï´Ù.

5) ZEND Optimizer ¼³Ä¡ (beta2)

°¡¼Ó±âÀÇ ¼³Ä¡´Â ¸ÕÀú ÇØ´ç ÆÄÀÏÀ» c:\Program File\Zend\lib µð·ºÅ丮¿¡ º¹»çÇÕ´Ï´Ù.

´ÙÀ½ ¾Æ·¡ Ç׸ñÀ» php.ini ÆÄÀÏ¿¡ Ãß°¡ÇÕ´Ï´Ù.

    zend_optimizer.optimization_level=7
    zend_extension_ts="C:\Program Files\Zend\lib\ZendOptimizer.dll"

ÀÌÁ¦ ¸ðµç ¼³Ä¡°¡ ¿Ï·á µÇ¾ú½À´Ï´Ù.

¿©±â¼­ ´Ù½Ã c:\php µð·ºÅ丮¸¦ Á¡°ËÇØ º¾´Ï´Ù.    ÃֽŠ¹öÀüÀϼö·Ï ¾Õ¿¡¼­ ¼³Á¤ÇÑ ºÎºÐ°ú ´Ù¸¦ ¼ö ÀÖ½À´Ï´Ù.    À§ÀÇ Àý´ë µð·ºÅ丮¿¡ php¿¡ ÇØ´çÇÏ´Â ¸ðµç ÆÄÀÏÀ» ÀúÀåÇØ¾ß µË´Ï´Ù.    ¹°·Ð ¾Õ¿¡¼­ÀÇ ¼³Á¤ÀÌ c:\phpÀ̱⠶§¹®ÀÔ´Ï´Ù.

ÀÌ ¸ðµç ¼³Ä¡ÀÇ Á¤»ó µ¿ÀÛ È®ÀÎÀº °£´ÜÇÑ phpinfo() ÇÔ¼ö¸¦ ÀÌ¿ëÇؼ­ ½ºÅ©¸³Æ®·Î È®ÀÎÇØ º¸´Â °Ì´Ï´Ù.    ¾Æ·¡ÀÇ ÆÄÀÏÀº ¸®´ª½º¿¡¼­ test.php¿Í °°½À´Ï´Ù.

 
    <?php
        phpinfo();
    ?>

Âü°í.   À©µµ¿ì¿ë mysqlÀ» ¼³Ä¡ ÇÑ ÈÄ µ¥¸óÀ» ¶ç¿ì´Â ¹æ¹ý¿¡¼­ ¸¹Àº ºÎºÐ ¾î·Á¿òÀ» ÅäÇÏ´Â »ç¶÷µéÀÌ ÀÖÀ» ÁÙ ¾Ð´Ï´Ù.    Àúµµ ±×·¨À¸´Ï±î¿ä¡¦ ÀÚ¼¼ÇÑ ¹æ¹ýÀº mysql »çÀÌÆ®ÀÇ µµÅ¥¸ÕÆ® ¶õ¿¡ °¡¸é ¿î¿µÃ¼Á¦ º°·Î º¸´Ù ÀÚ¼¼ÇÑ ¹æ¹ýÀÌ ÀÖÀ¸¸ç Âü°í·Î À©µµ¿ì 98ÀÇ °æ¿ì binµð·ºÅ丮 ¹Ø¿¡ Á¸ÀçÇÏ´Â mysqld-XXXX ÆÄÀÏÀÇ À̸§À» mysqld ¼öÁ¤ ÈÄ standalone ¿É¼ÊÀ¸·Î ½ÇÇà ÇÏ¸é µÉ°ÍÀÌ´Ù..    Àǹ®ÀÌ ÀÖÀ¸¸é Á÷Á¢ »çÀÌÆ®¸¦ ¹æ¹®Çؼ­ ´õ ÀÚ¼¼ÇÑ ³»¿ëÀ» ã¾Æ º¸±â ¹Ù¶ø´Ï´Ù. http://www.mysql.com/mysql/full/

´ÙÀ½ Àå¿¡¼­´Â Solaris¿¡¼­ÀÇ Apache , Php , MysqlÀÇ ¼³Ä¡¸¦ ¼³¸íÇÏ°Ú½À´Ï´Ù.

ÀÌÀåÀº °³ÀÎÀûÀ¸·Î Á¦¿Ü Çß½À´Ï´Ù¡¦. Àǹ®Á¡ÀÌ ÀÖÀ¸¸é ¸ÞÀÏ·Î Áú¹®Çϱ⠹ٶø´Ï´Ù.

5. ¼Ö¶ó¸®½º¿¡¼­ APM¼³Ä¡Çϱâ(Á¦¿Ü)

6. APACHE ¼³Á¤°ú °í±Þ ±â´É

ÀÌ Àå¿¡¼­´Â ¾ÆÆÄÄ¡ÀÇ ¿©·¯ °¡Áö ¼³Á¤°ú °í±Þ ±â´É¿¡ ´ëÇØ ¼³¸íÇÏ°Ú½À´Ï´Ù.    httpd.conf ÆÄÀÏÀÌ ¼³Á¤¿¡ °ü·ÃµÈ ¸ðµç Á¤º¸¸¦ °¡Áö°í ÀÖÀ¸¹Ç·Î ÀÌ ÆÄÀÏÀÇ ¿É¼ÇÀ» À§ÁÖ·Î ¼³¸íÇÏ°Ú½À´Ï´Ù.

6.1 ¾ÆÆÄÄ¡ÀÇ ±¸¼º

¾ÆÆÄÄ¡¸¦ ¼º°øÀûÀ¸·Î ¼³Ä¡Çß´Ù¸é /usr/local/apache/¿¡ ¿©·¯ °¡Áö µð·ºÅ丮°¡ »ý¼ºµË´Ï´Ù.    »ç¿ëÀÚ¿¡ µû¶ó ÀÌ µð·ºÅ丮´Â ´Ù¸¦ ¼ö ÀÖ½À´Ï´Ù.    ¿ì¼± ±âº»ÀûÀÎ µð·ºÅ丮¸¸ ³ª¿­Çß½À´Ï´Ù.

1) µð·ºÅ丮 ±¸¼º

    /bin µð·ºÅ丮 - apache »ç¿ë ½Ã¿¡ ÇÊ¿äÇÑ À¯Æ¿¸®Æ¼µéÀÌ µé¾î ÀÖ½À´Ï´Ù.
    /cgi - bin µð·ºÅ丮 - cgi ½ºÅ©¸³Æ®°¡ ÀÖ´Â °÷ÀÔ´Ï´Ù.
    /conf µð·ºÅ丮 - apache ¼­¹öÀÇ ¿©·¯ °¡Áö ¼³Á¤ ÆÄÀϵéÀÌ ÀÖ½À´Ï´Ù.(httpd.conf)
    /icons µð·ºÅ丮 - apache ¼­¹ö¿¡ »ç¿ëµÇ´Â ¾ÆÀÌÄܵéÀÌ µé¾î ÀÖ½À´Ï´Ù
    /logs µð·ºÅ丮 - apache ¼­¹ö »ç¿ë ½Ã ¹ß»ýÇÏ´Â ¿©·¯°¡Áö logµéÀÌ µé¾î ÀÖ½À´Ï´Ù.

/conf ¾È¿¡ httpd.conf ÆÄÀÏÀÇ °æ¿ì ¼Ò½º¿¡¼­ ´Ù½Ã copy Çؼ­ »ç¿ë °¡´ÉÇϹǷΠ³ªÁßÀÌ¶óµµ ¼³Á¤ À߸øÀ¸·Î apache¸¦
´Ù½Ã ÀνºÅç ÇÏ´Â ÀÏÀÌ ¾øµµ·Ï Çϼ¼¿ä.

2) httpd.conf ±¸¼º

±×·¯¸é httpd.conf ÆÄÀÏÀÇ ³»¿ëÀ» Çѹø »ìÆ캸¸é¼­ ¼³Á¤À» ¼³¸íÇÏ°Ú½À´Ï´Ù.    ¸ÕÀú ÀÌ ÆÄÀÏÀº apache Àü¹Ý¿¡ °üÇÑ ¼³Á¤ÀÌ µé¾î ÀÖ°í °£´ÜÈ÷ ¿É¼Ç¸¸ °íÃļ­ ¹Ù²Ü ¼ö ÀÖ½À´Ï´Ù.    °íÄ¡°í ³ª¸é ´ç¿¬È÷ restart ÇØ¾ß ÇÕ´Ï´Ù.    ¼­µÎ ºÎºÐÀº ÀÌ ÆÄÀÏÀÇ ³»¿ëÀ» ´ã°í ÀÖ½À´Ï´Ù.    ¸ÕÀú ÀÌ ÆÄÀÏÀº ÃÑ 3°¡Áö·Î ±¸ºÐÇÒ ¼ö ÀÖ½À´Ï´Ù.

    1. ¾ÆÆÄÄ¡¸¦ Àü¹ÝÀûÀ¸·Î Á¦¾îÇÏ´Â ºÎºÐ
    2. °¡»óÈ£½ºÆ®¿¡¼­ 󸮵ÇÁö ¾Ê´Â ¿äûÀ» ¸ðµÎ ó¸®ÇÏ´Â ÁÖ ¼­¹ö ¶Ç´Â ±âº» ¼­¹öÀÇ ÀÛµ¿À» Á¦¾îÇÏ´Â ºÎºÐ
    3. ´Ù¸¥ IP¿Í È£½ºÆ® À̸§À» ó¸®ÇÏ´Â °¡»óÈ£½ºÆ® ¼³Á¤ ºÎºÐ

apache 1.3.4 ÀÌÀü ¹öÀüÀÇ °æ¿ì 3°¡Áö ÆÄÀÏ(httpd.conf, srm.conf, access.conf)µîÀÇ ÆÄÀÏÀÌ Á¸ÀçÇßÁö¸¸ Áö±ÝÀº httpd.conf ÆÄÀÏ·Î ÅëÇյǾîÁø »óÅÂÀÔ´Ï´Ù.

6.2 httpd.confÀÇ °ü¸®

¾ÆÆÄÄ¡ ¼­¹öÀÇ Àü¹ÝÀûÀÎ Á¦¾î(Section 1)

#¼­¹ö ŸÀÔ - ¼­¹öÀÇ ½ÃÀÛÀ» ¾î¶»°Ô ÇÒ °ÍÀÎÁö ¼³Á¤ÇÏ´Â ºÎºÐÀÔ´Ï´Ù. µÎ °¡Áö°¡ ÀÖ´Â µ¥ ´ëºÎºÐ Standalone ¹æ½ÄÀ» »ç¿ëÇÕ´Ï´Ù. Inetd ¹æ½ÄÀº »õ·Î¿î ÇÁ·Î¼¼¼­¸¦ ¸¸µé ¶§¸¶´Ù ¼³Á¤ ÆÄÀÏÀ» Âü°í ÇÏ´Â ´ÜÁ¡ÀÌ ÀÖ°í À¥ ¼­¹ö¸¦ restart ¾È Çصµ µË´Ï´Ù.

Standalone ¹æ½ÄÀÇ °æ¿ì restart ÇØÁà¾ß ÇÏÁö¸¸ ºÎÇÏ¿¡ º¸´Ù ¾ÈÁ¤Àû ÀÔ´Ï´Ù.

#¼­¹ö ·çÆ® - ÀÌ ¼³Á¤Àº ¼­¹öÀÇ ¼³Á¤, ¿¡·¯, ·Î±× ÆÄÀÏÀÌ ±â·ÏµÇ´Â µð·ºÅ丮¸¦ ¸»ÇÕ´Ï´Ù. À§ ±×¸²ÀÇ /usr/local/apache °¡ µðÆúÆ® °æ·Î ÀÔ´Ï´Ù.

#Lockfile - ÀÌ ¼³Á¤Àº ¾ÆÆÄÄ¡ ÄÄÆÄÀÏÀ» USE_FCNTL_SERIALIZED_ACCEPT ³ª USE_FLOCK_SERIALZED_ACCEPT ÀÇ ¿É¼ÇÀ¸·Î ÇßÀ» °æ¿ì Àá±Ý ÆÄÀÏÀÇ °æ·Î¸¦ ¼³Á¤ÇÒ ¶§ »ç¿ëÇÕ´Ï´Ù.   µðÆúÆ®´Â »ç¿ë ¾ÈÇÔÀ¸·Î ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.   ·Î±× µð·ºÅ丮°¡ NFS ¸¶¿îÆ® µÈ °æ·Î·Î µÇ¾î¾ß ÀÌ °ªÀ» ¹Ù²Ù¾î ÁÝ´Ï´Ù.

#PidFile - À¥ ¼­¹ö°¡ ½ÃÀÛÇÒ ¶§ Process id num¸¦ ±â·ÏÇÏ´Â ÆÄÀÏÀÔ´Ï´Ù.

#ScoreBoardFile - ³»ºÎ ¼­¹ö ÇÁ·Î¼¼¼­ÀÇ Á¤º¸¸¦ ÀúÀåÇÏ´Â ÆÄÀÏ ÀÔ´Ï´Ù.   ±× °æ·Î ¸í°ú °°ÀÌ ÀûÇôÁ® ÀÖ½À´Ï´Ù.   Æ¯Á¤ ¾ÆÅ°ÅØó¿¡¼­ ÇÊ¿äÇÒ °æ¿ì ¼­·Î ´Ù¸¥ ¾ÆÆÄÄ¡ À¥ ¼­¹ö µ¥¸óÀÌ °°Àº ÆÄÀÏÀ» °øÀ¯ÇÏÁö ¾Ê¾Æ¾ß ÇÕ´Ï´Ù.

#ResourceCofig / AccessConfig - apache 1.3.4 ÀÌÀüÀÇ ¹öÀü¿¡¼­´Â srm , access conf

ÆÄÀÏÀ» httpd.conf°ú ÇÔ²² ÀоúÁö¸¸ ÀÌÈÄ¿£ httpd.conf ÆÄÀÏ¿¡ Çѵ¥ ¹¶ÃÄÁ® °ü¸®Çϱâ ÆíÇØ Á³½À´Ï´Ù.

¼­¹ö°¡ ÀÌ ÆÄÀÏÀÇ ³»¿ëÀ» ¹«½ÃÇÏ°Ô Çϱâ À§Çؼ­´Â "dev/null"(Unix) ¶Ç´Â "nul"(Win32) °ªÀ» ÁöÁ¤ ÇØ¾ß ÇÕ´Ï´Ù.

#Timeout - Ŭ¶óÀ̾ðÆ®°¡ ¼­¹ö¿¡ ¿äûÇÑ Á¤º¸¸¦ ¹ÞÀ» ¶§ ¼Ò¿ä µÇ´Â ½Ã°£À» Á¤ÇØ ÁÝ´Ï´Ù.

µðÆúÆ®´Â 300À¸·Î ¼³Á¤µÇ¾îÁ® ÀÖ°í ÃÊ´ÜÀ§·Î ¼³Á¤À» ÇÕ´Ï´Ù. ¼­¹ö ¼º´É¿¡ µû¶ó Àû´çÇÑ °ªÀ» Àû¾î ÁÖ¸é È¿À²Àû ÀÔ´Ï´Ù.

#KeepAlive - µðÆúÆ® °ªÀÌ onÀ¸·Î µÇ¾î ÀÖ½À´Ï´Ù.    ±× ÀÌÀ¯´Â ¼º´ÉÀúÇÏ ¶§¹®Àε¥ ÀÚ½Ä ÇÁ·Î¼¼¼­°¡ ÇÑ°¡Áö Àϸ¸ ó¸®ÇÏ°í Á×´Â °ÍÀÌ ¾Æ´Ï¶ó ´ÙÀ½ÀÇ Àϵµ ó¸®ÇÔÀ¸·Î½á ¼º´É Çâ»óÀ» ²ÒÇÏ´Â °ÍÀÔ´Ï´Ù.

#MaxKeepAliveTimeout - KeepAlive°¡ ¼³Á¤µÇ¾î ÀÖÀ» ¶§, Ŭ¶óÀ̾ðÆ®ÀÇ ¿äûÀ» ¸î ¹ø À̳ª ó¸®ÇÏ°í ´Ù½Ã Ã³À½ »óÅ·Πµ¹¾Æ °¡´ÂÁö¸¦ ¼³Á¤ ÇÕ´Ï´Ù. ¸¸¾à ÀÌ ¼³Á¤ÀÌ "0"ÀÏ °æ¿ì Ŭ¶óÀ̾ðÆ®°¡ Á¢¼ÓÀ» ²÷À» ¶§±îÁö °è¼Ó ¿¬°á »óÅ·ΠÀÖ½À´Ï´Ù.

(´ëºÎºÐÀÇ °æ¿ì ³ôÀº ¼º´É Çâ»óÀ» À§ÇØ ³ôÀº °ªÀ» Àû¾î ÁÝ´Ï´Ù.)

#KeepAliveTimeout - KeepAlive °¡ ¼³Á¤µÇ¾î ÀÖÀ» °æ¿ì Ŭ¶óÀ̾ðÆ®ÀÇ ¿äûÀÌ Á¤ÇØÁø Ãʾȿ¡ ¾øÀ» °æ¿ì Á¢¼ÓÀ» ²÷½À´Ï´Ù.

¿©·¯ºÐµéÀÇ ¼­¹ö¿¡ ¸Â°Ô Ãʸ¦ ¹Ù²Ù¾î ÁÖ¸é µË´Ï´Ù.

#MinSpareServer , MaxSpareServer - ¼­¹ö Ç®À» ¼³Á¤ÇÏ´Â ºÎºÐÀÔ´Ï´Ù. ¿©±â ¼³Á¤µÈ µðÆúÆ® °ªÀº ´ëºÎºÐÀÇ ¼­¹ö¿¡ ÀûÇÕÇÑ »óÅÂÀÔ´Ï´Ù.

Áï, Ŭ¶óÀ̾ðÆ®ÀÇ ¿äûÀÌ ¸¹Àº »çÀÌÆ®¶ó¸é Àû´çÈ÷ ÀÌ °ªµéÀ» Áõ°¡ ¶Ç´Â °¨¼ÒÇؼ­ »ç¿ëÇØ¾ß ÇÕ´Ï´Ù.    ¾ÆÆÄÄ¡´Â ÃÖ¼Ò °ª°ú ÃÖ´ë °ªÀ» Á¤ÇØ ÁÜÀ¸·Î½á Ŭ¶óÀ̾ðÆ®ÀÇ ¿äûÀÌ ¸¹Àº °æ¿ìµç ÀÛÀº °æ¿ìµç ½±°Ô ÇÁ·Î¼¼¼­¸¦ ´Ã¸®°í ÁÙÀÏ ¼ö ÀÖµµ·Ï ÇÏ´Â °ÍÀÔ´Ï´Ù.    Áï, ¾ÆÆÄÄ¡´Â Ŭ¶óÀ̾ðÆ®ÀÇ ¿äûÀÌ ÀûÀ» °æ¿ì ¶Ç´Â ÃÖ¼Ò °ª º¸´Ù ÇÁ·Î¼¼¼­°¡ ÀûÀ» °æ¿ì¿¡ ÀÚµ¿À¸·Î ÃÖ¼Ò ¿©À¯ ¼­¹öÀÇ °³¼ö¸¦ ¸ÂÃßµµ·Ï ³ë·Â ÇÕ´Ï´Ù.    ÃÖ´ë °ªº¸´Ù ÇÁ·Î¼¼¼­°¡ ¸¹À» °æ¿ì¶ó¸é ÀÚµ¿ÀûÀ¸·Î ÃÖ´ë ¿©À¯ ¼­¹öÀÇ °³¼ö¿¡ ¸ÂÃß¾î ÁÝ´Ï´Ù.

#StartServer - ¾ÆÇÇÄ¡ ¼­¹ö¸¦ ½ÇÇà ÇÒ ¶§ °°ÀÌ »ý¼ºµÉ ¿©ºÐÀÇ ÇÁ·Î¼¼¼­ÀÇ °³¼ö¸¦ Á¤ÇÕ´Ï´Ù.

µðÆúÆ® °ªÀº 5 ÀÔ´Ï´Ù.(6°³ »ý¼ºµÇ¾îÁü)

#MaxClients - µ¿½Ã¿¡ ¾ÆÆÄÄ¡ ¼­¹ö¿¡ Á¢¼ÓÇÒ ¼ö Àִ Ŭ¶óÀ̾ðÆ®ÀÇ °³¼ö¸¦ ¼³Á¤ ÇÕ´Ï´Ù.

ÀÌ °ªÀ» ´Ã¸®°Å³ª ÁÙÀÏ °æ¿ì MinSpareServer , MaxSpareServer ,StartServer ÀÇ °ªµµ Á¶Á¤ ÇØ ÁÖ¾î¾ß ÇÕ´Ï´Ù.    Áï, ÃÖ´ë°ªÀ» ³Ñ¾î¼³ æ¿ì Ŭ¶óÀ̾ðÆ®ÀÇ ¿äûÀº ¾ÕÀÇ ¿äûÀÌ ³¡³¯ ¶§±îÁö ´ë±â »óÅ·ΠÀÖ¾î¾ß ÇÕ´Ï´Ù.    ÀÌ ¼³Á¤Àº ¾ÆÆÄÄ¡ ¼­¹ö°¡ ¸¹Àº ÀÚ¿øÀ» ³¶ºñÇØ ¼­¹ö ºÎÇÏ°¡ »ý±â´Â °ÍÀ» ¸·±â À§ÇØ »ç¿ëµË´Ï´Ù.

#MaxRequestsChild - °¢°¢ÀÇ ÀÚ½Ä ÇÁ·Î¼¼¼­°¡ Á×±â Àü±îÁö ó¸®ÇÒ ¼ö ÀÖ´Â ¿äû ¼ö¸¦ ¼³Á¤ ÇÕ´Ï´Ù.    ´ëºÎºÐÀÇ ½Ã½ºÅÛ¿¡¼­´Â ÇϳªÀÇ ÇÁ·Î¼¼¼­°¡ ¿À·§µ¿¾È »ç¿ëµÇ¸é ¸Þ¸ð¸® ¶Ç´Â ÀÚ¿ø ´©Ãâ Çö»óÀÌ ¹ß»ý ÇÒ ¼ö ÀÖÀ¸¹Ç·Î ÀÌ ÇÁ·Î¼¼¼­´Â ÀÚµ¿À¸·Î Á¦°Å µË´Ï´Ù.    ÇÏÁö¸¸ ¼Ö¶ó¸®½º ¿î¿µÃ¼Á¦ÀÇ °æ¿ì ÀÌ ¼³Á¤ÀÌ ÇÊ¿äÇÕ´Ï´Ù.

#Listen - ¾ÆÇÇÄ¡¸¦ ƯÁ¤IP ¶Ç´Â Æ÷Æ®¿Í °áÇÕ ½Ãų °æ¿ì »ç¿ë ÇÕ´Ï´Ù.

<VirtualHost> Áö½ÃÀÚ ¶ÇÇÑ Âü°í Çϼ¼¿ä.

#BindAddress - ÀÌ ¿É¼ÇÀ» »ç¿ëÇؼ­ °¡»óÈ£½ºÆ®¸¦ Áö¿øÇÒ ¼ö ÀÖ½À´Ï´Ù. ¿É¼Ç¿¡´Â ¡®*¡¯ ¡®IP address¡¯ ¡®ÀÎÅÍ³Ý µµ¸ÞÀÎ À̸§¡¯À» »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.

<VirtualHost>°ú Listen Áö½ÃÀÚµµ Âü°í Çϼ¼¿ä.

°¡»óÈ£½ºÆ®¿¡ °üÇÑ ÀÚ¼¼ÇÑ »çÇ×Àº http://kldp.org·Î °¡½Ã¸é Çѱ۷ΠÀÛ¼ºµÈ ¸¹Àº ¹®¼­µéÀ» Âü°íÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.

Dynamic Shared Object (DSO) - DSO(µ¿Àû °øÀ¯ °´Ã¼)¸¦ »ç¿ë Çϱâ À§Çؼ­ ¸ðµâÀ» Áö½ÃÇÏ´Â ¼³Á¤ÀÔ´Ï´Ù. DSOÀÇ ÀÛµ¿ ¹æ½ÄÀ» º¸·Á¸é ¾ÆÆÄÄ¡ 1.3 ¹èÆ÷ÆÇÀÇ README.DSO ÆÄÀÏÀ» Âü°í Çϱ⠹ٶø´Ï´Ù. ¿©·¯ºÐµéÀÇ httpd ¹ÙÀ̳ʸ®¿¡ ³»ÀåµÈ ¸ðµâ ¸ñ·ÏÀ» È®ÀÎÇÏ·Á¸é ¡"http -l" À» ½ÇÇàÇÏ¸é º¼ ¼ö ÀÖ½À´Ï´Ù.

¸ðµâ ÀûÀçÀÇ ¼ø¼­´Â Áß¿ä »çÇ×À̹ǷΠ¾Æ¹«·¸°Ô³ª ¼ø¼­¸¦ ¹Ù²Ù¸é ¾ÈµË´Ï´Ù.

#ExtendedStatus - "server-status"°¡ È£Ã⠵ǾúÀ» ¶§ ¾ÆÆÄÄ"¡ ÀÚ¼¼ÇÑ ¼­¹ö »óÅ Á¤º¸¸¦ ¸¸µé °ÍÀÎÁö ¿©ºÎ¸¦ ¼³Á¤ÇÕ´Ï´Ù.

OffÀÏ °æ¿ì ±âº»ÀûÀÎ »çÇ×ÀÇ Á¤º¸¸¸ »ý¼ºÇÕ´Ï´Ù.

¾ÆÆÄÄ¡ÀÇ ÁÖ ¼­¹ö ¼³Á¤(Section 2)

°¡»óÈ£½ºÆ®¿¡¼­ 󸮵ÇÁö ¾Ê´Â ¿äûÀ» ¸ðµÎ ó¸®ÇÏ´Â ÁÖ ¼­¹ö ¶Ç´Â ±âº» ¼­¹öÀÇ ÀÛµ¿À» Á¦¾îÇÏ´Â ºÎºÐÀÔ´Ï´Ù.

#Port - µ¶¸³Çü ¼­¹ö°¡ ´ë±âÇÏ´Â Æ÷Æ®¸¦ ¼³Á¤ÇÕ´Ï´Ù. Æ÷Æ® ¹øÈ£°¡ 1023¹ø º¸´Ù ³·À» °æ¿ì óÀ½ root ±ÇÇÑÀ¸·Î httpd°¡ ½ÇÇàµÇ¾î¾ß ÇÕ´Ï´Ù.

±âº»ÀûÀ¸·Î ¼³Á¤µÈ Æ÷Æ® ¿Ü¿¡ ´Ù¸¥ Æ÷Æ®¸¦ ¼³Á¤ÇÔÀ¸·Î½á ¿©·¯ºÐµéµµ httpd¸¦ ¿î¿µÇÒ ¼ö ÀÖ½À´Ï´Ù.

<TIP>----------------------------------------------------------------------------

À¯µ¿ ip·Î °øÂ¥ µµ¸ÞÀÎ »ç¿ëÇϱâ

¿©·¯ºÐµé ´ëºÎºÐÀÇ °æ¿ì°¡ ÄÉÀÌºí ¸ðµ©À̳ª adslÀ» »ç¿ëÇÑ´Ù°í °¡Á¤ ÇÏ°Ú½À´Ï´Ù.    ÀÏ´Ü ¹Ù²î´Â À¯µ¿ ip¿¡ °øÂ¥·Î µµ¸ÞÀÎÀ» ÁÖ´Â °÷À» º¸¸é http://www.dyndns.org/- ¿©±âÀÇ °æ¿ì ÀÏ´Ü °¡ÀÔÀ» ÇÑ ÈÄ 24½Ã°£ ¾È¿¡ ÇØ´ç idÀÇ Æнº¿öµå¸¦ ¸ÞÀÏ·Î ¹Þ½À´Ï´Ù. ±×¸®°í ±× Æнº¿öµå·Î Á¢¼ÓÇÑ ´ÙÀ½ ¿øÇÏ´Â Æнº¿öµå·Î ¹Ù²Ù¾î Áà¾ß ÇÕ´Ï´Ù.    °íÁ¤ ipÀÇ °æ¿ìµµ µµ¸ÞÀÎÀ» Á¦°øÇÏ°í ¿©·¯ °¡Áö ¿É¼ÇµéÀÌ ´Ù¾çÇÏ°Ô ÀÖ½À´Ï´Ù.    Å¬¶óÀ̾ðÆ®¸¦ ¹Þ¾Æ ¼­¹öÀÇ °¡µ¿°ú µ¿½Ã¿¡ ¹Ù²î´Â ip¿¡ µû¸¥ µµ¸ÞÀÎ ¼³Á¤À» Àâ¾Æ ÁÙ ¼öµµ ÀÖ½À´Ï´Ù.     http://xdomain.neti.org/- ¿©±â´Â Çѱ¹ »çÀÌÆ®ÀÌ°í Á¢¼ÓÀÌ ÀÚÁÖ ²÷±â´Â Çö»óÀÌ ÀÖ½À´Ï´Ù.    ÇÏÁö¸¸ °øÂ¥´Ï ºÒ¸¸À» °¡Áú ¼ö´Â ¾ø°ÚÁÒ? ÀÏ´Ü °¡ÀÔ Áï½Ã »ç¿ë °¡´ÉÇÏ°í, Ä£ÀýÈ÷ °ü¸®ÀÚ°¡ °Ô½ÃÆÇ¿¡ ´äµµ ÇØÁÝ´Ï´Ù.

----------------------------------------------------------------------------------------------------

#User , Group - µ¶¸³Çü ¼­¹ö¿¡¼­ »ç¿ëµÇ¸ç, ÀϹÝÀûÀ¸·Î ¼­¹ö¿¡¼­ ÀÛ¾÷ ÇÁ·Î¼¼¼­´Â nobody·Î ¼³Á¤À» ÇØ ÁÝ´Ï´Ù.

   Áï, Á¦ÀÏ ±ÇÇÑÀÌ ¾ø´Â °ÍÀ¸·Î ¼³Á¤À» ÇÕ´Ï´Ù.    º¸¾È ¶§¹®¿¡ ÀÌ·¸°Ô ¼³Á¤À» ÇÏ´Â °ÍÀÌ°í, ¸¸¾à nobody·Î ¼³Á¤ µÇ¾îÁø »óŶó¸é telnetÀ¸·ÎÀÇ Á¢±Ù ¶ÇÇÑ ¸·¾Æ¾ß µË´Ï´Ù.    SCO(ODT 3)ÀÇ °æ¿ì User nouser , Group nogroup·Î ¼³Á¤ÇØ ÁÝ´Ï´Ù.

#ServerAdmin - ¼­¹ö¿¡ ¹®Á¦°¡ »ý°åÀ» °æ¿ì ¸ÞÀÏÀ» º¸³¾ ÁÖ¼Ò¸¦ Àû¾î ÁÖ´Â °÷ÀÔ´Ï´Ù.

ÀÌ ÁÖ¼Ò´Â ¿¡·¯ ¹®¼­¿Í °°ÀÌ ¼­¹ö°¡ »ý¼ºÇÏ´Â ÆäÀÌÁö¿¡ ³ªÅ¸³³´Ï´Ù.

#ServerName - ¸¸¾à ¿©·¯ºÐµéÀÌ µî·ÏµÈ DNS¸¦ °¡Áö°í ÀÖ´Ù¸é ±×°ÍÀ» Àû¾î ÁÖ¸é µË´Ï´Ù.

¸¸¾à Ŭ¶óÀ̾ðÆ®¿¡ º¸³¾ ¼­¹ö À̸§ÀÌ ´Ù¸¦ °æ¿ì È£½ºÆ®ÀÇ ½ÇÁ¦ À̸§ÀÌ ¾Æ´Ñ WWW¸¦ »ç¿ëÇÏ°Ô ÇÒ ¼öµµ ÀÖ½À´Ï´Ù.(IP¸¦ ÀÔ·ÂÇصµ µË´Ï´Ù.)    ¸¸ÀÏ DNS°¡ Á¸ÀçÇÏÁö ¾Ê´Â °ÍÀ̶ó¸é °³ÀΠȨÆäÀÌÁö ¼­ºñ½º¿¡µµ ¿µÇâÀ» ÁÝ´Ï´Ù. ±×·¯ÇÑ ÀÌÀ¯ ¶§¹®¿¡ ÀÌ ¼³Á¤Àº À¯ÀÇÇØ¾ß µË´Ï´Ù.

#DocumentRoot - ±âº»ÀûÀÎ html ¶Ç´Â php µîµîÀÇ °ü·Ã ¹®¼­ÀÇ ±âº» µð·ºÅ丮¸¦ ¼³Á¤ ÇÕ´Ï´Ù.

(½Éº¼¸¯ ¸µÅ© ¶Ç´Â ¾Ù¸®¾î½º¸¦ »ç¿ëÇØ ´Ù¸¥ À§Ä¡¸¦ Àû¾î ÁÙ ¼öµµ ÀÖ½À´Ï´Ù.)

<TIP>----------------------------------------------------------------------------

°¢ µð·ºÅ丮º° »ç¿ëÀÚ ÀÎÁõ ¼³Á¤Çϱâ

´ÙÀ½¿¡ ¼³¸íÇÒ µð·ºÅ丮 ¼³Á¤°ú °ü·ÃµÇ¾î ÀÌ ºÎºÐÀ» Ãß°¡ ÇØ ÁÖ¸é µË´Ï´Ù.

    AuthType Basic                                  - »ç¿ëÀÚ ÀÎÁõ ¹æ¹ý
    AuthName cry                                    - ÀÎÁõÇÒ »ç¿ëÀÚ¸í
    AuthUserFile /usr/local/httpd/htdocs/.htpasswd    - Æнº¿öµå ÆÄÀÏÀÇ À§Ä¡
    AuthGroupFile /dev/null         - »ç¿ë ±×·ìÀ» Ç¥½ÃÇÒ ÆÄÀÏÀÇ °æ·Î

Æнº¿öµå ÆÄÀÏÀ» ¸¸µé·Á¸é ¾Æ·¡¿Í °°ÀÌ ÇÕ´Ï´Ù.

  /usr/local/apache/bin/htpasswd ÆÄÀÏÀ» »ç¿ëÇÏ´Â ¹æ¹ý°ú Á÷Á¢ ÀÛ¼ºÇÏ´Â ¹æ¹ýÀÌ ÀÖ½À´Ï´Ù.
  bin#.htpasswd -c Æнº¿öµåÆÄÀϸí À¯Àú¸í 
  À§¿Í °°ÀÌ ½ÇÇàÇÏ¸é »õ·Î¿î Æнº¿öµå ÀԷ¶õÀÌ ³ª¿À°í °Å±â¿¡ Æнº¿öµå¸¦ ÀÔ·ÂÇÏ¸é µË´Ï´Ù.
  ±×¸®°í »ý¼ºµÈ ÆÄÀÏÀ» ÀÎÁõÇÒ µð·ºÅ丮·Î ¿Å±â¸é µË´Ï´Ù.

----------------------------------------------------------------------------------------------------

#Directory ¿É¼Ç - °¢°¢ÀÇ µð·ºÅ丮¿¡ °üÇÑ ±ÇÇÑ µîÀÇ ¿©·¯ °¡Áö ¼³Á¤À» ÇÏ´Â °÷ÀÔ´Ï´Ù.

<Directory "µð·ºÅ丮 path">   </Directory>·Î ¼³Á¤ÇÕ´Ï´Ù.

¿©±â¿¡´Â ¿©·¯ °¡Áö ¿É¼ÇÀÌ ÁÖ¾îÁö´Âµ¥ Â÷·Ê·Î º¸°Ú½À´Ï´Ù.

¿É¼ÇÀÇ »ç¿ë

    Option ¿É¼Ç¸í ¿É¼Ç¸í ¡¦ ÀÔ´Ï´Ù.

¿É¼Ç Á¾·ù

  • None - ¿É¼ÇÀ» ÁÖÁö ¾Ê½À´Ï´Ù.
  • All - ¸ðµç ¿É¼ÇÀ» ÁÝ´Ï´Ù.
  • Indexes - ÇØ´ç µð·ºÅ丮 ¾È¿¡ DirectoryIndex Áö½ÃÀÚ ºÎºÐÀÇ ÆÄÀÏÀÌ ¾øÀ» °æ¿ì µð·ºÅ丮¿Í ÆÄÀϵéÀ» ¸ñ·ÏÈ­Çؼ­ º¸¿© ÁÝ´Ï´Ù.
  • Includes - Server Side Includes¸¦ °¡´ÉÇÏ°Ô ÇÕ´Ï´Ù.
  • FollowSymLinks - ½Éº¼¸¯ ¸µÅ©·ÎÀÇ À̵¿À» °¡´ÉÇÏ°Ô ÇÕ´Ï´Ù.
  • ExecCGI - CGI Ç®±×·¥À» ½ÇÇà °¡´ÉÇÏ°Ô ÇÕ´Ï´Ù.
  • AllowOverride ¿É¼Ç¸í - NoneÀÏ °æ¿ì .htaccess ³»¿ëÀÌ access.confÀÇ ¿É¼Ç¿¡ ÀÇÇØ È¿·ÂÀÌ ¾ø¾î Áý´Ï´Ù.(ÇØ´ç µð·ºÅ丮 ¾È¿¡ .htaccess ÆÄÀÏÀÌ Á¸ÀçÇÒ °æ¿ì) Áï, access.conf ¼³Á¤ÀÇ ¾î´À ºÎºÐÀ» ¹«½Ã ÇÒ°ÇÁöÀÇ ¿©ºÎ¸¦ ¼³Á¤ÇÕ´Ï´Ù.
  • order ¿É¼Ç¸í - ÇØ´ç µð·ºÅ丮¿¡ ´ëÇÑ IP , DNS ÇÊÅ͸µÀÇ ¼ø¼­¸¦ ¼³Á¤ÇÕ´Ï´Ù.

#UserDir - °³ÀΠȨ ÆäÀÌÁö ¼­ºñ½º¸¦ À§ÇÑ °³ÀΠȨÆäÀÌÁö µð·ºÅ丮 ¼³Á¤ ºÎºÐÀÔ´Ï´Ù.

Áï, °³ÀÎÀÇ µð·ºÅ丮¿¡ public_html µð·ºÅ丮¸¦ ¸¸µé¸é ȨÆäÀÌÁö ¼­ºñ½º¸¦ ¹ÞÀ» ¼ö ÀÖ½À´Ï´Ù.    Ex>http://skycry.ath.cx/ userid    À§ÀÇ µðÆúÆ® µð·ºÅ丮 ¸»°í ´Ù¸¥ µð·ºÅ丮¸¦ Ãß°¡ ÇÔÀ¸·Î¼­ ¿©·¯ °³ÀÇ µð·ºÅ丮 ¼­ºñ½º¸¦ ÇÒ ¼ö ÀÖ½À´Ï´Ù.

#UserDir ¿É¼Ç - °³ÀΠȨÆäÀÌÁö µð·ºÅ丮¿¡ ´ëÇÑ Á¢±Ù ±ÇÇÑ µîÀ» ¼³Á¤ ÇÕ´Ï´Ù.

<Limit>   </Limit> ·Î °¢°¢ÀÇ Á¢±ÙÀ» Á¦¾î ÇÒ ¼öµµ ÀÖ½À´Ï´Ù. ¿É¼ÇµéÀº ¾Õ ºÎºÐ¿¡¼­ ¼³¸íÇÑ ´ë·Î ÇÏ¸é µË´Ï´Ù.    ¹°·Ð »ç¿ëÀÚ ÀÎÁõµµ ÇÒ ¼ö ÀÖ½À´Ï´Ù.

#DirectoryIndex - ºê¶ó¿ìÀú°¡ ¾ÆÆÄÄ¡ ¼­¹ö·Î óÀ½ Á¢±Ù ÇßÀ» ¶§ º¸¿©ÁÙ ¹®¼­¸¦ ¼³Á¤ÇÕ´Ï´Ù.

   ÇÑ °³ ÀÌ»ó ³ª¿­ÀÌ °¡´ÉÇÏ°í, ¾Õ¿¡ ¼³¸íÇÑ µð·ºÅ丮 ¼³Á¤¿¡¼­ Option indexes·Î µÇ¾î ÀÖ°í, DirectoryIndex Áö½ÃÀÚ¿¡ Ç¥½ÃÇÑ ÆÄÀÏÀÌ µð·ºÅ丮¿¡ ¾øÀ» °æ¿ì ÇØ´ç µð·ºÅ丮¿Í ÆÄÀϵéÀº ¸ñ·ÏÈ­ µÇ¾î ºê¶ó¿ìÀú¿¡ ³ªÅ¸³³´Ï´Ù.

#AccessFileName - °¢°¢ÀÇ µð·ºÅ丮ÀÇ Á¢±ÙÀ» Á¦¾îÇÏ´Â Á¤º¸¸¦ °¡Áø ÆÄÀÏ À̸§ ÀÔ´Ï´Ù.

   Áï, ÀÌ ÆÄÀÏÀ» Á¦¾î ÇÏ·Á´Â µð·ºÅ丮¿¡ ³Ö¾î »ç¿ë ÇÕ´Ï´Ù. ¾ÕÀÇ µð·ºÅ丮 Áö½ÃÀÚ¿Í ¿¬°üÇÏ¿© Âü°í Çϼ¼¿ä.

#.htaccess ÆÄÀÏ¿¡ÀÇ Á¢±Ù - <Files ÆÄÀϸí>   </Files>·Î ¼³Á¤À» Çϸç, »ç¿ë µÇ´Â ¿É¼ÇÀº¾Õ¿¡¼­ ¼³¸íÇÑ °Í°ú °°½À´Ï´Ù.

   ±×¸®°í ÆÄÀϸíÀ» .htaccess °¡ ¾Æ´Ñ ´Ù¸¥ À̸§À¸·Î ¾ÕÀÇ AccessFileName¿¡¼­ ¹Ù²Ù¾ú´Ù¸é ±× À̸§À» Àû¾î Áà¾ß µË´Ï´Ù.

#CacheNegotiatedDocs - ¾ÆÆÄÄ"¡ ±âº»ÀûÀ¸·Î Çù»óµÈ ¹®¼­¿¡ ´ëÇؼ­´Â <Pragma: no-cache> ³»¿ëÀ» º¸³À´Ï´Ù.

Áï, ÇÁ¶ô½Ã ¼­¹öµéÀÌ ¹®¼­¸¦ ij½¬ÇÏÁö ¸øÇÏ°Ô ¿äû ÇÕ´Ï´Ù.    # ¸¦ Á¦°ÅÇÏ°í ¿É¼ÇÀ» ½ÇÇà ÇÏ¸é ¸ðµç ÇÁ¶ô½Ã°¡ ¹®¼­¸¦ ij½¬ÇÒ ¼ö ÀÖ°Ô ÇÕ´Ï´Ù.

#UseCanonicalName - ¾ÆÆÄÄ¡ 1.3 ¹öÀü¿¡¼­ »õ·Ó°Ô µîÀåÇÑ ±â´ÉÀÌ°í, ÀÌ ¿É¼ÇÀÌ ÄÑÁ® ÀÖÀ» °æ¿ì

ÀÚ±â ÂüÁ¶ URL(ÀÀ´äÀÌ ¿À´Â ¼­¹ö¸¦ ´Ù½Ã °¡¸®Å°´Â URL)À» ¸¸µé ÇÊ¿ä°¡ ÀÖÀ» ¶§¸¶´Ù °ø½ÄÀûÀÎ À̸§À» ¸¸µé±â À§ÇØ ServerName¿Í Port¸¦ »ç¿ë ÇÕ´Ï´Ù.    off ÀÏ °æ¿ì´Â ¾ÆÆÄÄ¡´Â °¡´ÉÇÒ °æ¿ì Ŭ¶óÀ̾ðÆ®°¡ Á¦°øÇÏ´Â hostname:port¸¦ »ç¿ë ÇÕ´Ï´Ù.    ÀÌ°ÍÀº ¶ÇÇÑ CGI ½ºÅ©¸³Æ®ÀÇ SERVER_NAME¿Í SERVER_PORT¿¡µµ ¿µÇâÀ» ÁÝ´Ï´Ù.

#TypeConfig - mime.type ÆÄÀÏÀÇ À§Ä¡¸¦ ¼³Á¤ÇÕ´Ï´Ù.

#DefaultType - ¼­¹ö¿¡¼­ »ç¿ëµÇ´Â ¹®¼­Áß MIME ŸÀÔÀ¸·Î ¾Ë ¼ö ¾ø´Â ¹®¼­¿¡ ´ëÇØ Àû¿ëÇÒ ±âº» MIME ŸÀÔÀ» ¼³Á¤ÇÕ´Ï´Ù.

µðÆúÆ® °ªÀº text/plain À̸ç ÀÌ °ªÀº ÁÖ·Î ¼­¹ö¿¡ ¹®¼­ ÆÄÀÏÀÌ ¸¹À» °æ¿ì¿¡ »ç¿ë ÇÕ´Ï´Ù. ¸¸ÀÏ ¹ÙÀ̳ʸ®³ª ½ÇÇà ÆÄÀÏÀÌ ¸¹À» °æ¿ì¶ó¸é ÀÌ ¿É¼ÇÀº application/octet-streamÀ¸·Î Àû¾î ÁÖ¸é µË´Ï´Ù.    (À¥ ºê¶ó¿ìÀú°¡ ½ÇÇà ÆÄÀÏ µîÀ» ÅؽºÆ® ¹®¼­·Î Âø°¢ÇÏ°í ºê¶ó¿ìÀú »ó¿¡ Ç¥½ÃÇÏÁö ¾Ê±â À§ÇÔ ÀÔ´Ï´Ù.)

#mod_mine_magic - mod_mine_magic ¸ðµâÀ» »ç¿ëÇÒ °æ¿ì ÇØ´ç ÆÄÀÏÀÇ ³»¿ëÀ¸·Î ÆÄÀÏ Å¸ÀÔ ÈùÆ®¸¦ ¾ò´Â ¿ªÇÒÀ» ÇÕ´Ï´Ù.

ÀÌ°ÍÀ» »ç¿ëÇϱâ À§Çؼ­´Â ÇØ´ç ¸ðµâÀ» žÀç ÇØ¾ß ÇÕ´Ï´Ù.    <IfModule>   </IfModule> Áö½ÃÀÚ´Â ÀÌ ¸ðµâÀÌ ÀÖÀ» ¶§ °¡´ÉÇÕ´Ï´Ù.

#HostnameLookups - ¾ÆÆÄÄ¡´Â Ŭ¶óÀ̾ðÆ®ÀÇ ¿äûÀ» ¹Þ¾Æ µéÀ̸鼭 IP¸¦ È®ÀÎÇÏ°í È®ÀÎÇÑ ÁÖ¼Ò¸¦ DNS ¼­¹ö¿¡ ´Ù½Ã ÀÇ·Ú ÇÏ´Â ÀÛ¾÷À» Çϱ⠶§¹®¿¡ »ó´çÇÑ ½Ã°£À» ¿äÇÏ°Ô µË´Ï´Ù. µðÆúÆ® °ªÀÎ off·Î µÎ°í »ç¿ëÇÏ±æ ±ÇÀå ÇÕ´Ï´Ù.

#ErrorLog - ¿¡·¯¸¦ ±â·ÏÇÒ ÆÄÀÏÀÇ À§Ä¡¸¦ Àû¾î ÁÝ´Ï´Ù. <VirtualHost> Áö½ÃÀÚ¿¡¼­ ErrorLog ¼³Á¤À» ÇÏÁö ¾Ê¾Ò´Ù¸é ¿©±â¼­ÀÇ ¼³Á¤À»À» µû¸¨´Ï´Ù.    ·Î±× ÆÄÀÏÀÇ °æ¿ì´Â °è¼Ó ¿ë·®ÀÌ Áõ°¡Çϱ⠶§¹®¿¡ ¼ö½Ã·Î ¿ë·®À» ÁÙ¿©¾ß ÇÕ´Ï´Ù.

#LogLevel - ·Î±×¸Þ¼¼ÁöÀÇ Å©±â¸¦ Á¦¾î ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù.

¿É¼Ç¿¡´Â debug , info , notice , warn , error , crit ,alert , emerg µîÀÌ ÀÖ½À´Ï´Ù.

#LogFormat - CustomLog Áö½ÃÀÚ¿¡¼­ »ç¿ëÇÒ º°¸íÀ» Á¤ÀÇ ÇÕ´Ï´Ù.

    %h - È£½ºÆ®¸í
    %l - ¸®¸ðÆ® ·Î±× À̸§
    %u - »ç¿ëÀÚ ÀÎÁõ¿¡ »ç¿ëµÈ À¯Àú¸í
    %t - ½Ã°£
    %r - ¿äûÇÑ ³»¿ëÀÇ Ã¹¹ø° ÁÙ
    %s - ¼­¹ö »óÅÂ
    %b - Àü¼Û·®(Çì´õ Æ÷ÇÔ)
    %{Çì´õ} - ¿ä±¸µÈ Çì´õ ³»¿ë
    %U - ¿ä±¸ÇÑ URL

#CustomLog - access_log ÆÄÀÏÀÇ À§Ä¡¸¦ ¼³Á¤ ÇÕ´Ï´Ù. <VirtualHost> Áö½ÃÀÚ¿¡¼­ ÀÌ ¼³Á¤ ºÎºÐÀÌ ¾øÀ» °æ¿ì ¿©±â¼­ ¼³Á¤ÇÑ À§Ä¡·Î ¸ðµÎ ÀúÀåµË´Ï´Ù.

°¡»ó È£½ºÆ®º°·Î µû·Î Á¢±Ù ·Î±× ÆÄÀÏÀ» ¸¸µé°í ½ÍÀ¸¸é ÀÌ ¼³Á¤À» °¢°¢ÀÇ <VirtualHost> Áö½ÃÀÚ ¾È¿¡ ³Ö¾î Áà¾ß ÇÕ´Ï´Ù.

#agent_log , referrer_log - ¸¸¾à ¿©·¯ºÐµéÀÌ agent_log , referrer_log ÆÄÀÏÀ» »ý¼º ÇÏ°íÀÚ ÇÒ °æ¿ì #¸¦ Á¦°ÅÇÕ´Ï´Ù.

#single logfile - ¸¸¾à ¿©·¯ºÐµéÀÌ access , agent , referrer Á¤º¸¸¦ ÇϳªÀÇ ÆÄÀÏ¿¡ ¸ðµÎ ÀúÀå Çϱ⸦ ¿øÇÑ´Ù¸é combined ¿É¼ÇÀ» ÀÌ¿ë ÇÕ´Ï´Ù.

#ServerSignature - ¾ÆÆÄÄ¡ ¼­¹ö°¡ »ý¼ºÇÏ´Â ÆäÀÌÁö(¿¡·¯¹®¼­ , FTP µð·ºÅ丮 list , mod_status , mod_info output , CGI »ý¼º¹®¼­ Á¦¿Ü)¿¡ ¼­¹ö ¹öÀü°ú °¡»ó È£½ºÆ® À̸§À» Æ÷ÇÔÇÏ´Â ÇàÀ» ³Ö´Â °ÍÀ» ¼³Á¤ÇÕ´Ï´Ù.

¿É¼Ç¿¡´Â On | Off | Email µîÀÌ ÀÖ°í EmailÀÇ °æ¿ì ServerAdminÀ¸·ÎÀÇ mailto: ¸µÅ©µµ Æ÷ÇÔ µË´Ï´Ù.

#Alias - º°ÄªÀ» ¼³Á¤ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù.

º°ÄªÀÇ ¼³Á¤Àº Alias /º°Äª/ "path" ÇÏ¸é µË´Ï´Ù.

   º°Äª »ç¿ë ½Ã¿¡ º°Äª ´ÙÀ½¿¡ "/"¸¦ Àû¾îÁÖ¸é º°ÄªÀ» Ç¥ÇöÇÒ ¶§ /º°Äª/ ÀÌ·¸°Ô Ç¥ÇöÇØ¾ß µË´Ï´Ù.    µð·ºÅ丮 ¼³Á¤Àº ¾Õ¿¡¼­ »ç¿ëÇÑ ¿É¼ÇÀ» »ç¿ëÇÏ¸é µË´Ï´Ù.    º°ÄªÀº Çϳª ÀÌ»ó ¿©·¯ °³ ¸¸µé¾î »ç¿ë °¡´ÉÇϱ⠶§¹®¿¡ ÇÊ¿äÇÑ ¸¸Å­ ¸¸µé¾î »ç¿ëÇÏ¸é µË´Ï´Ù.    ¹°·Ð, ÁÖÀÇ ÇÒ ºÎºÐÀº º°Äª ´ÙÀ½ÀÇ "/"¸¦ Àû¾î Áá´À³Ä ÇÏ´Â °ÍÀÔ´Ï´Ù.    ¼­¹ö°¡ URL¿¡ "/"ÀÌ ÀÖ¾î¾ß ó¸®Çϱ⠶§¹®ÀÔ´Ï´Ù.

#ScriptAlias - ¼­¹ö ½ºÅ©¸³Æ®¸¦ Æ÷ÇÔÇÑ µð·ºÅ丮¸¦ Á¦¾îÇÏ´Â ¼³Á¤ ÀÔ´Ï´Ù.

Alias¿Í ¼³Á¤ ÇÏ´Â ºÎºÐÀº °°Áö¸¸ ÀÌ ¼³Á¤Àº °¡¸®Å°´Â µð·ºÅ丮 ¾ÈÀÇ ¹®¼­¸¦ ½ÇÇàÇÏ´Â ÇÁ·Î±×·¥À¸·Î ÀνÄÇÏ¿© ½ÇÇàÇÏ°Ô µË´Ï´Ù.

À§ ±×¸²ÀÇ µð·ºÅ丮 ¼³Á¤ path ºÎºÐÀº ScriptAlias ·Î º°Äª ó¸®µÈ ½ÇÁ¦ CGI µð·ºÅ丮·Î ¼³Á¤ ÇØ¾ß µË´Ï´Ù.

#Redirect - ¼­¹ö¿¡ Á¸ÀçÇÏÁö ¾Ê´Â ¹®¼­·Î Á¢±ÙÀÌ ¿Ã °æ¿ì ÇöÀç Á¸ÀçÇÏ´Â ¹®¼­·ÎÀÇ À§Ä¡¸¦ ¹Ù²ã ÁÖ´Â ¼³Á¤ ÀÔ´Ï´Ù.

Áï, ¿¾³¯¿¡ »ç¿ëÇÏ´ø URL·Î Á¢¼ÓÇÏ´Â »ç¿ëÀÚ¸¦ À§ÇØ »õ·Î¿î URL·Î À̵¿ÇÏ°Ô ÇØÁÖ´Â °ÍÀÔ´Ï´Ù.    »ç¿ë ¹æ¹ýÀº "Redirect ¿¾³¯URL »õ·Î¿îURL" ÇÏ¸é µË´Ï´Ù.

#IndexOptions - DirectoryIndex Áö½ÃÀÚ¿¡¼­ Ç¥½ÃÇÑ ÆÄÀÏÀÌ Á¸ÀçÇÏÁö ¾ÊÀ» °æ¿ì µð·ºÅ丮 ¿Í ÆÄÀϵéÀÇ ¸ñ·ÏÀ» º¸¿© ÁÙ ¶§ µð·ºÅ丮¿Í ÆÄÀÏÀÇ ¼Ó¼º¿¡ µû¸¥ ¾ÆÀÌÄÜÀ» »ç¿ëÇÒÁö ¿©ºÎ¸¦ ¼³Á¤ ÇÕ´Ï´Ù.

#AddIcon - IndexOptions¿¡¼­ FancyIndexing·Î ¼³Á¤ µÇ¾î ÀÖÀ» °æ¿ì »ç¿ë µÇ¸ç °¢°¢ÀÇ È®ÀåÀÚ¿¡ µû¸¥ ¾ÆÀÌÄÜÀÇ ¸ð¾çÀ» Á¤ÇØ ÁÝ´Ï´Ù.

#DefaultIcon - AddIcon¿¡¼­ ¼³Á¤ µÇÁö ¾ÊÀº ±âº» ¾ÆÀÌÄÜÀ» ¼³Á¤ ÇÕ´Ï´Ù.

µðÆúÆ® ¾ÆÀÌÄÜÀº unknown.gif ÀÔ´Ï´Ù.

#AddDescription - ÀÌ ¼³Á¤Àº ¼­¹ö ÀÚµ¿ »ý¼º À妽º ÆÄÀÏÀÇ µÚ¿¡ °£´ÜÇÑ ¼³¸íÀ» Ãß°¡ÇÒ ¶§ »ç¿ë ÇÕ´Ï´Ù. (FancyIndexing ¼³Á¤ ÀÏ ¶§ °¡´ÉÇÕ´Ï´Ù.)

¹æ¹ýÀº AddDescription "¼³¸í" ÆÄÀϸí

#ReadmeName , HeaderName - ReadmeNameÀº ¼­¹ö°¡ µð·ºÅ丮 ¸ñ·Ï µÚ¿¡ ºÙ¿© ³ÖÀ» README ÆÄÀÏÀÇ À̸§À» ¼³Á¤Çϸç, HeaderNameÀº µð·ºÅ丮 À妽º ¾Õ¿¡ ³»¿ëÀ» ³ÖÀ» ÆÄÀÏÀÇ À̸§À» ¼³Á¤ÇÕ´Ï´Ù.

   ¼­¹ö´Â óÀ½ name.html ÆÄÀÏ Ã£°í Á¸Àç ÇÏ¸é ±× ³»¿ëÀ» Æ÷ÇÔÇÕ´Ï´Ù.    ¸¸¾à ÆÄÀÏÀÌ Á¸ÀçÇÏÁö ¾Ê´Â´Ù¸é name.txt¸¦ ã°í txt ³»¿ëÀ¸·Î Æ÷ÇÔ ÇÕ´Ï´Ù.

#IndexIgnore - DirectoryIndexing¿¡¼­ ¸ñ·Ï¿¡¼­ Á¦¿ÜÇÒ ÆÄÀϸíÀ» ¼³Á¤ ÇÕ´Ï´Ù.

½© ½ºÅ¸ÀÏ°ú ¿ÍÀϵå Ä«µå »ç¿ëÀÌ °¡´É ÇÕ´Ï´Ù.

#AddEncoding - ƯÁ¤ ºê¶ó¿ìÀú(Mosaic/x 2.1+)°¡ ÀڷḦ ¹ÞÀ¸¸é¼­ ¾ÐÃàÀ» Ç® ¼ö ÀÖµµ·Ï ÇØ ÁÝ´Ï´Ù.

   ÀÌ°ÍÀº ¸ðµç ºê¶ó¿ìÀú°¡ °¡´É ÇÑ °ÍÀº ¾Æ´Õ´Ï´Ù.    (FancyIndexingÀÇ Add Áö½ÃÀÚ¿Í Áö±ÝºÎÅÍ ³ª¿­ÇÏ´Â Add Áö½ÃÀÚ¿Í´Â °ü·ÃÀÌ ¾ø½À´Ï´Ù.)

#AddLanguage - ¹®¼­ÀÇ ¾ð¾î¸¦ Ç¥½Ã ÇÕ´Ï´Ù. Áï, ³»¿ë Çù»ó °úÁ¤À» ÅëÇØ ºê¶ó¿ìÀú°¡ ÀÌÇØÇÏ´Â ¾ð¾îÀÇ ¹®¼­¸¦ Á¦°øÇÒ ¼ö ÀÖ½À´Ï´Ù.

   Æú¶õµå¾îÀÇ °æ¿ì ÆÞ°ú ±¸ºÐ Çϱâ À§ÇØ pl .po·Î Ç¥±â ÇÕ´Ï´Ù.

#LanguagePriority - ¹®¼­ ¹®Àå À» ÀÐ¾î µéÀÌ´Â µ¿¾È ¿©·¯ °¡Áö ¾ð¾î°¡ Á¸Àç ÇÒ °æ¿ì ¿ì¼±µÇ´Â ¾ð¾î¸¦ ³ª¿­ÇØ ÁÝ´Ï´Ù.

   ¼³Á¤Àº ³»¸²Â÷¼øÀ¸·Î ³ª¿­ ÇÕ´Ï´Ù.

#AddType - php È®ÀåÀÚ¸¦ »ç¿ë Çϱâ À§Çؼ­´Â ²À ÇÊ¿äÇÑ ¼³Á¤ ºÎºÐ ÀÔ´Ï´Ù.

Áï, mime.typesÀÇ ¼öÁ¤ ¾øÀÌ mime¸¦ ¼³Á¤ °¡´ÉÇÏ°Ô ÇØÁÝ´Ï´Ù.    ¾ÆÆÄÄ¡ 1.3.12ÀÏ °æ¿ì´Â php¸¦ ¼³Á¤ÇÏ´Â ºÎºÐÀÌ µû·Î ³ª¿Í ÀÖ½À´Ï´Ù. ±× ÀÌÀü ¹öÀüÀÏ °æ¿ì À§¿Í °°ÀÌ ¼³Á¤À» ÇÏ¸é µË´Ï´Ù.    ÇØ´ç È®ÀåÀÚ¿¡ ´ëÇØ Æ¯Á¤ ŸÀÔÀ¸·Î ½ÇÇà µÇ°Ô ÇÏ´Â °ÍÀÔ´Ï´Ù, ¿©·¯ºÐµéÀÇ ¸ñÀûÀº php¸¦ »ç¿ë ÇÏ´Â °ÍÀ̹ǷΠ¾Ë¸Â°Ô °íÄ¡¸é µË´Ï´Ù.    (php3 .htm) ÀÌ ºÎºÐÀº .htm È®ÀåÀÚ¸¦ php3ŸÀÔÀ¸·Î ½ÇÇà ÇÑ´Ù´Â ¸»ÀÔ´Ï´Ù.

 
    AddType application/x-httpd -php .php      -   .php È®ÀåÀÚ¸¦ phpŸÀÔÀ¸·Î ½ÇÇà 
    AddType application/x-httpd -php .html      -   .html È®ÀåÀÚ¸¦ phpŸÀÔÀ¸·Î ½ÇÇà
    AddType application/x-httpd -php .inc       -   .inc È®ÀåÀÚ¸¦ phpŸÀÔÀ¸·Î ½ÇÇà
    AddType application/x-httpd -php-source .phps - .phps È®ÀåÀÚµéÀº php ¼Ò½º¸¦ º¸°ÔÇÕ´Ï´Ù.

#AddHandler - ƯÁ¤ ÆÄÀÏ È®ÀåÀÚ³ª 󸮱⿡ ¿¬°áÇϰųª ƯÁ¤ ÆÄÀÏ Å¸ÀÔ¿¡ ƯÁ¤ µ¿ÀÛ ¿¬°áÀ» ¼³Á¤ ÇÕ´Ï´Ù.

¼­¹ö ¾È¿¡ Àְųª ¶Ç´Â action ¸í·ÉÀ» »ç¿ëÇؼ­ Ãß°¡ °¡´É ÇÕ´Ï´Ù.

    CGI ½ºÅ©¸³Æ®¸¦ »ç¿ë  
        AddHandler cgi-script .cgi

    ¼­¹ö ó¸® HTML ÆÄÀÏ »ç¿ë 
        AddType text/html .shtml
        AddHandler server-parsed .shtml

    ¾ÆÆÄÄ¡ÀÇ send-asis HTTP ÆÄÀÏ ±â´É »ç¿ë
        AddHandler send-as-is asis

    ¼­¹ö ó¸® imap ÆÄÀÏÀ» »ç¿ë  
        AddHandler imap-file map

    Type mapÀ» »ç¿ë 
        AddHandler type-map var

#Action - ¸ÅĪµÇ´Â ÆÄÀÏÀÌ ºÒ·ÁÁú ¶§¸¶´Ù ÇØ´ç ¹Ìµð¾î ŸÀÔ¿¡ ¸Â´Â ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÒ ¼ö ÀÖ½À´Ï´Ù.

ÀÌ ¼³Á¤Àº ÀÚÁÖ »ç¿ëµÇ´Â CGI ÆÄÀÏ ÇÁ·Î¼¼¼­¿¡ ´ëÇØ ¹Ýº¹ÀûÀ¸·Î URLÀ» »ç¿ëÇÏÁö ¾Ê¾Æµµ µË´Ï´Ù.

#MetaDir , MetaSuffix - MetaDir´Â ¾ÆÆÄÄ"¡ ¸ÞŸ Á¤º¸ ÆÄÀÏÀ» ãÀ» µð·ºÅ丮 À̸§ ÀÔ´Ï´Ù.

ÀÌ ÆÄÀÏ¿¡´Â ¹®¼­¸¦ º¸³¾ ¶§ Ãß°¡ÇÒ Ãß°¡ HTTP Çì´õ Á¤º¸°¡ ÀÖ½À´Ï´Ù.    MetaSuffix´Â ¸ÞŸ Á¤º¸¸¦ °¡Áö°í ÀÖ´Â ÆÄÀÏÀÇ Á¢¹Ì¾î¸¦ ¼³Á¤ ÇÕ´Ï´Ù.

#Customizable error response - Á¸ÀçÇÏÁö ¾Ê´Â ÆäÀÌÁö¸¦ ¿äû ¹ÞÀ» °æ¿ì ¶Ç´Â ÇØ´ç µð·ºÅ丮ÀÇ Æ۹̼ÇÀÌ ¾øÀ» °æ¿ì º¸¿© ÁÖ´Â ¿¡·¯ ¸Þ½ÃÁö ¼³Á¤ ÀÔ´Ï´Ù.

°ü¸®ÀÚ ÀÓÀÇ·Î ´ÙÀ½ 3°¡Áö Áß ¼±Åà Çؼ­ Ãâ·ÂÇØ ÁÙ ¼ö ÀÖ½À´Ï´Ù.

    1)  plain text - º¸Åë ÅؽºÆ® È­¸é
    2)  local redirects - ³»ºÎ Url·Î ¹æÇâ ÀüȯÀ» ÇÕ´Ï´Ù.
    3)  external redirects - ¿ÜºÎ Url·Î ¹æÇâ ÀüȯÀ» ÇÕ´Ï´Ù.

ÀϹÝÀûÀ¸·Î ¿ø·¡ ¿äû°ú °ü°èµÈ ȯ°æ º¯¼öÀÇ ´ëºÎºÐÀÌ ½ºÅ©¸³Æ®¿¡ Àü´ÞµÇÁö ¸øÇÕ´Ï´Ù.

#BrowserMatch - HTTP ÀÀ´ä ¹æ½ÄÀ» ¼öÁ¤ÇÕ´Ï´Ù.

ù¹ø° Áö½ÃÀÚ´Â Netscape 2.x ¿Í À¯»çÇÑ ºê¶ó¿ìÀú¿¡ ´ëÇØ KeepAlive ±â´ÉÀ» »ç¿ëÇÏÁö ¸øÇÏ°Ô ÇÏ´Â ¼³Á¤ÀÔ´Ï´Ù.    (ÇØ´ç ºê¶ó¿ìÀú´Â KeepAlive±â´É ±¸Çö¿¡ ¹®Á¦Á¡ÀÌ ÀÖ½À´Ï´Ù.)    µÎ¹ø° Áö½ÃÀÚ´Â HTTP/1.1À» À߸ø ±¸ÇöÇϸç 301, 302(redirect) ÀÀ´ä¿¡ ´ëÇØ KeepAliveÀ» Á¦´ë·Î Áö¿ø ¸øÇÏ´Â MS Explorer 4.0b2¸¦ À§ÇÑ ¼³Á¤ÀÔ´Ï´Ù.

# BrowserMatch - HTTP/1.1 ÀÀ´äµµ Á¦´ë·Î ó¸® ÇÏÁö ¸øÇØ HTTP/1.1 spec¸¦ À§¹ÝÇÏ´Â ºê¶ó¿ìÀú¿¡ ´ëÇØ HTTP/1.1 ÀÀ´äÀ» ÇÏÁö ¾Ê°Ô ÇÏ´Â ¼³Á¤ÀÔ´Ï´Ù.

#server status , server info reports - ¼­¹ö »óÅ Á¤º¸¸¦ Çã¿ëÇÒ servernameÀ» Àû¾î ÁÝ´Ï´Ù.

server status ¹æ¹ýÀº http://servername /server-status ÀÔ´Ï´Ù.

¿©±â¼­ servernameÀ» ÀûÀýÈ÷ ¹Ù²Ù¾î »ç¿ëÇÏ¸é µË´Ï´Ù.

server info ¹æ¹ýÀº

http://servername /server-info ÀÔ´Ï´Ù (mod_info.c °¡ ·ÎµåµÇ¾î ÀÖ¾î¾ß ÇÕ´Ï´Ù.)

#¹ö±× ÀÌ¿ë ¹æÁö - ÀÌÀü 1.1¹öÀü¿¡¼­ ÀÖ´ø ¹ö±×¸¦ ¾Ç¿ë ÇÏ·Á´Â »ç¶÷ÀÌ Àִµ¥, #¸¦ Á¦°ÅÇÏ¸é ¹ö±×¸¦ ÀÌ¿ëÇÑ °ø°ÝÀÌ ÀÖÀ» ¶§ phf.apache.org»óÀÇ ±â·Ï ½ºÅ©¸³ÅÍ·Î ¹æÇâ ÀüȯÀ» ½ÃÅ°°Ô ÇÕ´Ï´Ù.    ¶Ç ´Ù¸¥ ¹æ¹ýÀº Á÷Á¢ support/php_abuse_log.cgi ½ºÅ©¸³Æ®¸¦ ÀÌ¿ëÇØ ¿©·¯ºÐ ÀÚ½ÅÀÌ ÀúÀåÇÏ´Â °ÍÀÔ´Ï´Ù.

#Proxy Server - ÇÁ¶ô½Ã ¼­¹ö »ç¿ëÀ» ¼³Á¤ÇÏ´Â ºÎºÐÀÔ´Ï´Ù.

ÇÁ¶ô½Ã ¼­¹ö ¸ðµâÀ» Æ÷ÇÔ ÇßÀ» °æ¿ì #¸¦ Á¦°ÅÇϸé ÇÁ¶ô½Ã ¼­¹ö »ç¿ëÀÌ °¡´É ÇÕ´Ï´Ù.

#ProxyVia - HTTP/1.1 <Via:> Çì´õ¸¦ ó¸®ÇÒÁö ¿©ºÎ¸¦ ¼³Á¤ÇÏ´Â ºÎºÐÀÔ´Ï´Ù.

¿É¼Ç¿¡´Â Off | On | Full | Block µîÀÌ ÀÖÀ¸¸ç FullÀº ¼­¹ö ¹öÀüÀ» Æ÷ÇÔ Çϸç, Block´Â ³ª°¡´Â ¸ðµç ÀÚ·á¿¡ <Via:>¸¦ Á¦°Å ÇÕ´Ï´Ù.

#cache - ij½¬ ±â´ÉÀ» enable Çϱâ À§Çؼ­´Â #À» Á¦°Å ÇÕ´Ï´Ù.

(CacheRoot°¡ ¾øÀ¸¸é ij½¬ÇÏÁö ¾Ê½À´Ï´Ù.)

¾ÆÆÄÄ¡ÀÇ °¡»ó È£½ºÆ® ¼³Á¤(section 3)

´Ù¸¥ IP¿Í È£½ºÆ® À̸§À» ó¸®ÇÏ´Â °¡»óÈ£½ºÆ® ¼³Á¤ ºÎºÐ

¿©·¯ºÐµéÀÌ À¥ ¼­¹ö¿¡ ´Ù¼öÀÇ µµ¸ÞÀÎ/È£½ºÆ®À̸§À» °ü¸®ÇÏ±æ ¿øÇÑ´Ù¸é ÇØ´çÇϴ ȣ½ºÆ®¸¦ VirtualHost Áö½ÃÀÚ¿¡ Æ÷ÇÔ ½ÃÄÑ¾ß ÇÕ´Ï´Ù.

#NameVirtualHost - À̸§ ±â¹ÝÀÇ °¡»ó È£½ºÆ®¸¦ »ç¿ëÇÏ·Á¸é Àû¾îµµ ÇϳªÀÇ IP(port ¹øÈ£)¸¦ Á¤ÀÇ ÇØ¾ß ÇÕ´Ï´Ù.

# VirtualHost - <VirtualHost È£½ºÆ® ¸í>   < /VirtualHost > ÀÌ·¸°Ô ¼³Á¤ ÇÏ¸ç º¸´Ù ÀÚ¼¼ÇÑ °¡»ó È£½ºÆ®¿¡ °üÇÑ ÀÚ·á´Â http://www.apache.org/³ª http://kldp.org ¿¡¼­ ãÀ» ¼ö ÀÖ½À´Ï´Ù.

´ÙÀ½ Àå¿¡¼­´Â PHPÀÇ ±âº» ¹®¹ý°ú ÇÁ·Î±×·¥ ÀÛ¼º ¹æ¹ýÀ» ¼³¸íÇÏ°Ú½À´Ï´Ù.

7. PHP ±âº» ¹®¹ý

7.1 PHP ¹®¹ý ±¸¼º°ú ÀÛ¼º

ÀÌ Àå¿¡¼­´Â phpÀÇ ±âº»ÀûÀÎ ¹®¹ý ±¸¼º°ú ÀÛ¼ºÇÏ´Â ¿ä·ÉÀ» »ìÆì º¸°Ú½À´Ï´Ù. ´ëºÎºÐÀÇ °æ¿ì C¾ð¾î¸¦ Á¢ÇÑ °æÇèÀÌ ÀÖÀ»Å×Áö¸¸ Ȥ ±×·¸Áö ¾Ê´õ¶óµµ ½±°Ô ¹è¿ï ¼ö ÀÖ½À´Ï´Ù.

PHP ¾ç½Ä

1. PHPÀÇ ½ÃÀÛ°ú ³¡Àº ´ëºÎºÐÀÇ °æ¿ì <?php    php ¹®Àå   ?>À̶ó°í Ç¥½ÃÇÕ´Ï´Ù. ¶Ç´Â <?  ~ ?> ÀÌ·¸°Ô ª°Ô ÁÙ¿©¼­ Ç¥½ÃÇÒ ¼öµµ ÀÖ½À´Ï´Ù. 
2. HTMLÀ» ½ºÅ©¸³Æ®¿¡ Ç¥ÇöÇÒ ¶§´Â echo(" ~html~ "); Áï, echo¹® ¾È¿¡ Ç¥ÇöÇÕ´Ï´Ù. 
   ÀÌ°ÍÀº ¹Ý´ë·Î HTML ¹®¼­ ¾È¿¡ ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÒ °æ¿ì <? ~ ?> ¾È¿¡ »ç¿ëÇÒ ¼öµµ ÀÖ½À´Ï´Ù.
3. ¹®ÀåÀÇ ³¡Àº " ; "·Î Ç¥½ÃÇØ ÁÝ´Ï´Ù. (Á¾Á¾ ¹®ÀåÀÇ Á¾°áÀ» Ç¥ÇöÇÏÁö ¾Ê¾Æ¼­ ½ºÅ©¸³Æ®  ¿À·ù°¡ ÀÚÁÖ »ý±é´Ï´Ù.)
4. PHP ÇÔ¼ö´Â <? ~ ?> ¿µ¿ª ¾È¿¡¼­ ÀÚÀ¯·ÎÀÌ »ç¿ë °¡´ÉÇÏ¸ç º¯¼ö ¼±¾ðÀÌ ÇÊ¿äÄ¡ ¾Ê½À´Ï´Ù.
5. PHP ½ºÅ©¸³Æ®¿¡¼­ ÁÖ¼®Àº // ¶Ç´Â  /* ~ */¸¦ »ç¿ëÇÕ´Ï´Ù.

º¯¼öÀÇ ÇüÅÂ

PHP¿¡¼­ º¯¼ö´Â ±× ŸÀÔÀÌ ¹Ì¸® Á¤ÀǵÇÁö ¾Ê´Â °ÍÀÌ ±âº»ÀÔ´Ï´Ù. ´Ù¸¥ ¿©·¯ ¾ð¾î¿¡¼­´Â º¯¼ö ŸÀÔÀ» ¼³Á¤ÇÏÁö¸¸ PHP´Â ÀÚ½ÅÀÇ °ªÀÌ ¼±¾ðµÇ¸é ÀÚµ¿ÀûÀ¸·Î ¾Ë¾Æ¼­ ŸÀÔÀ» ¹Ù²Ù¾îÁÖ´Â °ÍÀÔ´Ï´Ù.    ±×¸®°í º¯¼ö¸¦ ¼±¾ðÇÒ ¶© ¸î °¡Áö À¯ÀÇÇØ¾ß ÇÒ °ÍÀÌ ÀÖ½À´Ï´Ù.

    1. º¯¼öÀÇ ¼³¸íÀ» ³ªÅ¸³»´Â À̸§À» »ç¿ëÇϼ¼¿ä.
    2. ºÒÇÊ¿äÇÏ°Ô º¯¼ö À̸§¿¡ ´ë¹®ÀÚ¸¦ ¸¹ÀÌ »ç¿ëÇÏÁö ¸¶¼¼¿ä.
    3. ÇÑ°¡Áö ÇüŸ¦ À¯ÁöÇØ¾ß ÇÕ´Ï´Ù.

    1~3¹ø ÀÌ¿Ü¿¡ ¿©·¯ °¡Áö À¯ÀÇÇÒ ºÎºÐµéÀÌ ÀÖÀ» °Í ÀÔ´Ï´Ù. À§¿¡ ºÎºÐµéÀº ƯÈ÷ ÁÖÀÇÇÒ ºÎºÐµéÀ̸ç Ç×»ó »ó±âÇϱ⠹ٶø´Ï´Ù.
    ¡¤ ¼ýÀÚ¸¦ ÀúÀåÇÏ´Â º¯¼ö(Á¤¼öÇü, ½Ç¼öÇü)

       $S = 4989 ; // ½ÊÁø¼ö, ¾çÀÇ Á¤¼ö
       $S = -4989 ; // À½ÀÇ Á¤¼ö
       $S = 4.989 ;  , $S = 4.9E89 ; // ½Ç¼öÇü 

    ¡¤ ¹®ÀÚ¿­ º¯¼ö

       ¹®ÀÚ¿­Àº Å« µû¿ÈÇ¥(") ¾È¿¡ Ç¥½ÃµË´Ï´Ù. ¹®ÀÚ¿­ ¾È¿¡´Â ¿©·¯ °¡Áö ÇüÅÂÀÇ     ESCAPED ij¸¯ÅÍ°¡ µé¾î°¥ ¼ö ÀÖ°í, 
       ¹®ÀÚ¿­ÀÌ ¼ýÀÚ·Î ÀÎ½ÄµÉ °æ¿ì´Â ±× ÇüÅ°¡ ¹®ÀÚ¿­ ¾È¿¡ ÀÖ´Â ¼ýÀÚ³ª ¡®e¡¯ , ¡®E¡¯ ÀÇ Ç¥½Ã ¿©ºÎ¿¡ µû¶ó ´Þ¶óÁý´Ï´Ù.

        $S = 4 + "-9.8E9" ; // ½Ç¼öÇüÀ» ³ªÅ¸³À´Ï´Ù.
        $S = 4 + "CRY9" ; //  Á¤¼öÇü 4ÀÔ´Ï´Ù.
        $S = 4 + "9 CRY" ; // Á¤¼öÇü 13ÀÔ´Ï´Ù.
        $S = 4 + "98.9" ; // ½Ç¼öÇüÀ» ³ªÅ¸³À´Ï´Ù.
        $S = "9 CRY" + 4 ; // Á¤¼öÇü 13ÀÔ´Ï´Ù.
        $S = "SKYCRYZ" ; // ¹®ÀÚ¿­ SKYCRY ÀÔ´Ï´Ù.
        
                          
    ¡¤ ¹è¿­¿¡¼­ º¯¼ö

        ¿©±â¼­µµ ¸¶Âù°¡Áö·Î º¯¼öÀÇ ÇüŸ¦ ¼±¾ðÇÒ ÇÊ¿ä°¡ ¾ø½À´Ï´Ù.

        $S[0] =  "SKY" ; 
        $S[1] =  "CRY" ; 
        $S[2] =  "SKYCRY" ;
        $S[3] =  "14" ;


        °á°ú -> $S[0] =  "SKY" ;

            $S[1] =  "CRY" ;
            $S[2] =  "SKYCRY" ; 
            $S[3] =  "14" ;

        ¿©±â¼­ $S[] =  "SKY" , $S[] = "CRY" , $S[] =  "SKYCRY" ,
        $S[] = "14"·Î Ç¥ÇöÇصµ °á°ú´Â ¸¶Âù°¡ÁöÀÔ´Ï´Ù.

        ¹è¿­À» Ç¥Çö¿¡´Â À§ÀÇ ¹æ¹ýµµ ÀÖÁö¸¸ array( ) ÇÔ¼ö¸¦ »ç¿ëÇÏ´Â ¹æ¹ýµµ ÀÖ½À´Ï´Ù.

            $S = array("NAME" => array(0 => "SKY"
                                                     1 => "MY NAME IS CRY"),
                       "NAMESUM" => array(
                                                             2 => "SKYCRY"
                                                                                 3 => "14")
              ) ;

ÀÌ·¸°Ô 1Â÷¿ø ¹è¿­À» ÇÕÇؼ­ ¿©·¯ ÇüÅÂÀÇ ´ÙÂ÷¿ø ¹è¿­µµ ¸¸µé ¼ö ÀÖ½À´Ï´Ù. À§ ¹è¿­À» °£´ÜÈ÷ ¾Æ·¡¿Í °°Àº ½ºÅ©¸³Æ®·Î Ãâ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù.

    
    <?php    // PHPÀÇ ½ÃÀÛ
        $S = array("NAME" => array(0 => "SKY"
                                             1 => "MY NAME IS CRY"),
                   "NAMESUM" => array(
                                             2 => "SKYCRY"
                                             3 => "14")
                   ) ;

        echo $S["NAME"][1];
        echo('<br>');
        echo $S["NAMESUM"][2];
    ?>

    ¡¦

        ¡¤ °´Ã¼Çü º¯¼ö
        
        °´Ã¼¶õ °ü·Ã ÇÔ¼ö¿Í °ü·Ã º¯¼öÀÇ ÁýÇÕü ÀÔ´Ï´Ù. ´Þ¸® ¸»Çϸé CLASS¶ó°í ºÎ¸£±âµµ ÇÕ´Ï´Ù
        ¿©±â¼­ °´Ã¼¸¦ »ý¼ºÇÏ´Â ¹æ¹ýÀ» °£´ÜÈ÷ º¸¿©µå¸®°Ú½À´Ï´Ù.
 
 
            Class skycry
            {      
                function cry()
                {
                    $connection = mysql_connect("localhost","mysql","");
                }
            }   // cry() ÇÔ¼ö´Â mysql Á¢¼Ó ÇÔ¼öÀÔ´Ï´Ù. 

            $connet = new skycry ; // new¸¦ »ç¿ëÇؼ­ skycry °´Ã¼¸¦ »ý¼ºÇÕ´Ï´Ù.
            $connet -> cry() ; // °´Ã¼ ¾È¿¡ cry( ) ÇÔ¼ö¸¦ ºÒ·¯¿É´Ï´Ù.
                                 

       À§ÀÇ ¹æ¹ýÀ¸·Î ¿©·¯ °¡Áö¸¦ Çѹø Ãâ·ÂÇØ º¸¾Ò½À´Ï´Ù.
       ¿©·¯ºÐÀº ¹ØÀÇ ¹æ½ÄÀ¸·Î ¿©·¯ °¡Áö º¯¼ö¿Í ÇÔ¼öÀÇ ÁýÇÕÀΠŬ·¡½º¸¦ ¸¸µé¾î »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. 

        À§ ¿¹Á¦ÀÇ °æ¿ì ´Ü¼øÈ÷ ÇÔ¼ö¸¦ È£ÃâÇؼ­ Ãâ·Â ÇÏ´Â ºÎºÐÀÔ´Ï´Ù. ÇÏÁö¸¸ º¯¼öÀÇ Àü´Þ ÀÎÀÚ¸¦ ¼³Á¤ÇÏ°í
        °¢ ÇÔ¼ö¸¦ Ãâ·ÂÇÏ°Ô ÇÒ ¼öµµ ÀÖ½À´Ï´Ù. 
        Áï, cry($a,$b)¿Í °°ÀÌ $a ,$bÀÇ °ªÀ» Àü´ÞÇؼ­ ÇØ´ç ÀÎÀÚ¸¦ ¹Ý¿µÇÏ°Ô ÇÒ ¼ö ÀÖ½À´Ï´Ù.
        35,36,37ÇàÀº °´Ã¼¸¦ ºÒ·¯¿Í¼­ Ãâ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù.

    ¡¤ º¯¼öÀÇ »ç¿ë ¹üÀ§

        PHPÀÇ º¯¼ö ¹üÀ§´Â ¼±¾ðµÇ¾îÁø ºÎºÐ¸¸ °¡´ÉÇÕ´Ï´Ù. ´Ù½Ã ¸»ÇØ º¯¼öÇüÅ°¡ ¸¸µé¾îÁø ºÎºÐ¿¡¼­¸¸ »ç¿ë°¡´É
        ÇÕ´Ï´Ù.   ÇÔ¼ö ¾È¿¡ ÀÖ´Â º¯¼ö¿Í Àü¿¡ ¼±¾ðµÈ º¯¼ö´Â ´Ù¸£´Ù´Â °ÍÀÔ´Ï´Ù.

            $S =  4
            function cry()
            {
                echo $S ; // Áö¿ª º¯¼ö
            }
            cry( ) ; // 4°¡ Ãâ·ÂµÇÁö ¾Ê½À´Ï´Ù.


        ¿©±â¼­  4°¡ Ãâ·Â µÇ°Ô ÇÏ·Á¸é ÇÔ¼ö ¾È¿¡ º¯¼ö¸¦ ´Ù½Ã ÁöÁ¤ÇØ ÁÖ¾î¾ß ÇÕ´Ï´Ù.
        ÀÌ°ÍÀ» global º¯¼ö¶ó°í ÇÕ´Ï´Ù.
        ÇÔ¼ö ¾È¿¡ global $S ;¸¦ Ãß°¡ ÇßÀ» °æ¿ì 4°¡ Ãâ·ÂµË´Ï´Ù.

        ÀÌ·¯ÇÑ ¹æ¹ý ¸»°í ´Ù¸¥ ¹æ¹ýÀº function cry($S)¶ó Àû¾îÁÖ¸é µË´Ï´Ù.

        À§ ¿¹ 42ÇàÀÇ º¯¼ö´Â ÇÔ¼ö ¾ÈÀÇ º¯¼ö °ª Áï Áö¿ª º¯¼ö¸¦ ³ªÅ¸³»°í 44ÇàÀº ÇÔ¼ö ¹ÛÀÇ º¯¼ö °ª Áï ,
        ±Û·Î¹ú º¯¼ö °ª ÀÔ´Ï´Ù.

    ¡¤ °¡º¯ º¯¼ö

        º¯¼öÀÇ À̸§Àº PHP¿¡¼­µµ ¹Ù²Ü ¼ö ÀÖ½À´Ï´Ù. ÀÌ ¹æ¹ýÀ» »ç¿ëÇÏ´Â °ÍÀº Á¶±Ý º¹ÀâÇÕ´Ï´Ù.
        ±¸Áö ÀÌ ¹æ¹ýÀ» »ç¿ëÇØ¾ß ÇÒ °æ¿ì »ç¿ëÇÏ´Â °ÍÀÌ ÁÁÀ» µí ÇÕ´Ï´Ù. 
        Ç¥ÇöÇÏ´Â ¹æ½ÄÀÌ ¾î·Á¿î °ÍÀÌ ¾Æ´Ï¶ó ±× Çü½ÄÀÇ Á¾·ù¿¡ µû¶ó È¥µ¿µÉ °¡´É¼ºÀÌ ¸¹½À´Ï´Ù.

            $$s = "bye jun" ; //º¯¼ö¿¡ º¯¼ö¸¦ ÁÝ´Ï´Ù.

        À§ÀÇ °¡º¯ º¯¼ö¸¦ ÀÌ¿ëÇÒ ¶§ Áß¿äÇÑ ºÎºÐÀº ${$s}¿¡¼­ "{}"¸¦ »ç¿ëÇÏ´Â °ÍÀÔ´Ï´Ù.
        "{}" ÀûÀýÈ÷ »ç¿ëÇؼ­ È¥µ·À» ÁÙÀÏ ¼ö ÀÖ½À´Ï´Ù. ´Ù¸¥ °÷¿¡ Àû¿ëÇÒ ¶§´Â ÀÌ°ÍÀ» »ó±âÇϱâ
        ¹Ù¶ø´Ï´Ù.

    ¡¤ Form Çü½ÄÀÇ º¯¼ö

        Form Çü½ÄÀÇ º¯¼ö´Â ÀÚ±â ÀÚ½ÅÀÇ ÆäÀÌÁö³ª ´Ù¸¥ ÆäÀÌÁö·Î Çϳª ¶Ç´Â ¿©·¯ °³ÀÇ º¯¼ö¸¦ Àü´ÞÇÏ´Â Çü½Ä
        ÀÔ´Ï´Ù.   FormÀÇ ÇüŸ¦ ¿ì¼± º¸¸é 
                
            <form method=~ action=~>
              <input type=~ name=~ value=~>
            </form>
                        
       °¢ ÀÎÀÚÀÇ ¿ªÇÒÀº ¾Æ·¡¿Í °°½À´Ï´Ù.
       Method´Â post(º¸³¾ ¶§)¿Í get(°¡Á®¿Ã ¶§) ÀÎÀÚ¸¦ »ç¿ëÇÕ´Ï´Ù
       Action´Â º¸³»°Å³ª °¡Á®¿Ã °³Ã¼¸¦ Àû¾îÁÝ´Ï´Ù.
       Type´Â text(±ÛÀÏ °æ¿ì), submit(ÀÔ·Â ½Ã) µîÀ» ÁÖ·Î »ç¿ëÇÕ´Ï´Ù.
       Name´Â ¿øÇÏ´Â ¸íÀ» Àû¾îÁÖ¸é ±× ¸íÀÌ º¯¼ö°¡ µÇ¾î º¸³»°Å³ª °¡Á®¿É´Ï´Ù.
       Value´Â name ÀÌ º¯¼ö·Î º¸³»Áú ¶§³ª °¡Á®¿Ã ¶§ÀÇ °ªÀ» ÁöÁ¤ÇÕ´Ï´Ù.
       º¸´Ù ÀÚ¼¼ÇÑ formÀÇ ÇüÅ´ <url url="http://www.irt.org" name="http://www.irt.org"> °¡¸é »ó¼¼ÇÑ
       ¼³¸íÀÌ ÀÖ½À´Ï´Ù.. 
       ÀÌ·¯ÇÑ Æû ¹®ÀÇ ÇüÅ´ ÁÖ·Î ÀÔ·ÂÀ» ¿äÇÏ´Â ºÎºÐ¿¡¼­ »ç¿ëÇÕ´Ï´Ù.
       ±Û¾²±âÀÇ °æ¿ì¿Í ¸ÞÀÏ µîÀÇ ³»¿ëÀ» µ¥ÀÌÅͺ£À̽º·Î ¿Å±æ °æ¿ì ±× º¯¼ö·ÎÀÇ Àü´Þ·Î »ç¿ë Çϸé ÆíÇÕ´Ï´Ù.

        À§ ¼Ò½º 20ÇàÀÇ °æ¿ì name = friend[] °¡ º¹¼ö º¯¼ö·Î ¸¸µé¾îÁ® º¸³»Áö´Â °ÍÀ» ¾Ë ¼ö ÀÖ½À´Ï´Ù.
        ÀÌ·¸µí ÆûÀ» ÀÌ¿ëÇؼ­ ÀÚµ¿ÀûÀ¸·Î º¯¼ö¸¦ »ý¼ºÇÒ ¼ö ÀÖ½À´Ï´Ù.
        ±×¸®°í submit¸¦ À̹ÌÁö·Î »ç¿ëÇÏ´Â ¹æ¹ýÀº ¾Æ·¡¿Í °°½À´Ï´Ù.

            <intput type=image src= "image.gif" name = "put">

        putÀº À̹ÌÁö¿¡¼­ Ŭ¸¯ÇÑ À§Ä¡¸¦ (x , y·Î) ³ª´²¼­ µÎ°³·Î Àü´Þ µË´Ï´Ù.
        put_x , put_y  

        ¼Ò½º 20ÇàÀÇ action="4-2-2form.php"  ºÎºÐÀº À§ °á°ú È­¸é¿¡¼­ Ä£±¸µéÀ» ¼±ÅÃÇÏ°í µî·Ï
        ¹öÆ°À» ´­·¶À» ¶§ ÇØ´ç ÀÎÀÚ°¡ º¸³»Áú ÆÄÀÏ À̸§ÀÔ´Ï´Ù. 
        ÀÌ ºÎºÐÀº ÀÓÀÇ·Î ¿©·¯ºÐµéÀÌ Á¤Çؼ­ º¸³»¸é µÇÁö¸¸ ÇöÀç À§ ¼Ò½º´Â ÀÚ±â Àڽſ¡°Ô ÀÎÀÚ¸¦ Àü´Þ Çؾß
        ÇØ´ç ¼±Åà Ç׸ñµéÀÌ Ãâ·Â µÇ°Ô µË´Ï´Ù. 
        ¿©±â¼­ 4-2-2 form.phpºÎºÐÀ» $PHP_SELF¸¦ °íÃÄ Àڽſ¡°Ô ´Ù½Ã ÀÎÀÚµéÀÌ Àü´Þ µÇ°Ô ÇÏ´Â ¹æ¹ýµµ ÀÖ½À´Ï´Ù.

 
 
    ¡¤ ȯ°æ º¯¼ö

        ȯ°æº¯¼ö´Â PHP¿¡ Á¢¼ÓÇÑ Å¬¶óÀ̾ðÆ®ÀÇ IP¿Í À¥ ºê¶ó¿ìÀú µîÀ» ¾Ë¾Æº¸´Â ¿ªÇÒÀ» ÇÕ´Ï´Ù. 

        $REMOTE_ADDR  -  ¹æ¹®ÀÚÀÇ IP¸¦ ¾Ë ¼ö ÀÖ½À´Ï´Ù.
        $HTTP_USER_AGENT   -  ¹æ¹®ÀÚÀÇ À¥ ºê¶ó¿ìÀú¸¦ ¾Ë ¼ö ÀÖ½À´Ï´Ù.

        ȯ°æ º¯¼ö¸¦ »ç¿ëÇؼ­ °³ÀΠȨÆäÀÌÁö³ª °Ô½ÃÆÇ »ç¿ëÀÚÀÇ ±¸ºÐÀ» Ç¥½ÃÇϸé À¯¿ëÇÏ°Ô »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.

 

    ¡¤ ½Ã°£ º¯¼ö

        ½Ã°£À» ³ªÅ¸³»¾ß ÇÒ °æ¿ì date() ÇÔ¼ö¸¦ »ç¿ëÇØ¾ß ÇÕ´Ï´Ù.
        ÀÌ ÇÔ¼ö¸¦ È£Ãâ ÇÏ´Â ¼±Åà »çÇ×Àº ¿©·¯ °¡Áö°¡ Àִµ¥ ¾Æ·¡ÀÇ Ç¥¸¦ Âü°íÇϼ¼¿ä.
        »ç¿ëÇÏ´Â ¹æ¹ýÀº º¯¼ö¸¦ ¸¸µé¾î »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.

           $date = date(Y-M-d : h/i/s a : l); 

  
        µ¥ÀÌÅÍ ÇÔ¼ö¿¡ »ç¿ë ÇÏ´Â ÀÎÀÚµé

           a -  "am" ¶Ç´Â "pm"
           Y -   "0000" ´ÜÀ§·Î ³âµµÇ¥½Ã
           A -  "AM" ¶Ç´Â "PM"
           w -  ÀÏ¿äÀϺÎÅÍ "0"À¸·Î ¼ýÀڷΠǥ½Ã
           d -  "00" Çü½ÄÀ¸·Î ³¯Â¥¸¦ Ç¥½Ã       
           y -  "00" Çü½ÄÀ¸·Î ³âµµ Ç¥½Ã
           D -  "Mon, Tue" ¿äÀÏÀ» 3ÀÚ¸®·Î Ç¥½Ã  
           z -  1¿ù 1ÀϺÎÅÍ °è»êµÈ ³¯¼ö
           F -  "January" Çü½ÄÀÇ ´ÞÀ» Ç¥½Ã      
           H -  ½Ã°£À» 24½Ã°£À¸·Î Ç¥½Ã
           i -  ºÐÀ» ¼ýÀڷΠǥ½Ã                
           h -  ½Ã°£À» 12½Ã°£À¸·Î Ç¥½Ã
           l -  "Monday" Çü½ÄÀ¸·Î ¿äÀÏÇ¥½Ã     
           m -  ¿ùÀ» ¼ýÀڷΠǥ½Ã
           M -  "Jan" Çü½ÄÀÇ ´ÞÀ» ¾à¾î·Î Ç¥½Ã   
           j -  "0"Çü½ÄÀ¸·Î ³¯Â¥¸¦ Ç¥½Ã
           s -  Ãʸ¦ ¼ýÀڷΠǥ½Ã

        À§ÀÇ ¼Ò½º¸¦ º¸¸é ¿©·¯ °¡Áö µ¥ÀÌÅÍ ÀÎÀÚ¸¦ »ç¿ëÇؼ­ Ãâ·Â ÇÏ´Â °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.
        ¿©±â¼­ date()ÇÔ¼ö ¸»°í Áß¿äÈ÷ ¿©±æ °ÍÀÌ ÀÖ½À´Ï´Ù. ¹Ù·Î ÇÔ¼ö¸¦ ¸¸µé°í º¯¼ö¸¦ È£ÃâÇÏ´Â °ÍÀÔ´Ï´Ù.
        ¼Ò½º 11ÇàÀÇ °æ¿ì ÇÔ¼ö ¾ÈÀÇ $d1À» Ãâ·Â Çϱâ À§ÇØ º¯¼ö °ªÀ» ÇÒ´çÇÏ´Â ºÎºÐÀÔ´Ï´Ù. 
        ÇÔ¼ö¿¡ º¯¼ö¸¦ Àü´ÞÇÏ´Â ¹æ¹ýÀÌ global ¸í·É ´ë½Å ÀÌ·¸°Ô »ç¿ëÇÏ´Â °Íµµ °¡´ÉÇÕ´Ï´Ù. 

¿¬»êÀÚ

¿¬»êÀÚÀÇ °æ¿ì´Â ¸¸µé¾îÁø º¯¼öÀÇ °ª³¢¸® ¿¬»êÀ» ÇÏ´Â °ÍÀÔ´Ï´Ù.    ¿©·¯ °¡Áö ¿¬»êÀÚ¸¦ ÀÌ¿ëÇؼ­ º¸´Ù °£°áÇϸ鼭 ¸íÄèÇÑ Ç¥ÇöÀ» ÇÏ´Â °Ô ¸ðµç À̵éÀÌ Ãß±¸ÇÏ´Â °ÍÀÔ´Ï´Ù.    ´ëºÎºÐÀÇ ¹®ÀåÀº Ç¥Çö½ÄÀ¸·Î ÀÌ·ç¾îÁö¹Ç·Î ¿¬»êÀÚ´Â ²À µé¾î°"â ¸¶·ÃÀÔ´Ï´Ù.    ¿©±â¼­ Ç¥Çö½ÄÀ̶ó ÇÔÀº ÇϳªÀÇ º¯¼ö¿¡ ƯÁ¤ÇÑ °ªÀ» ÁÖ´Â °ÍÀ» ¸»ÇÕ´Ï´Ù.

$a=4 ÀÌ·± ½ÄÀ¸·Î ¸»ÀÌÁÒ. ±×¸®°í ÀÌ º¯¼ö·Î ¿¬»êÀ» Çصµ ¸¶Âù°¡Áö ÀÔ´Ï´Ù.

±×·³ ±¸Ã¼ÀûÀ¸·Î ¿¬»êÀÚÀÇ Á¾·ù¿Í ±â´ÉÀ» ¾Ë¾Æ º¸°Ú½À´Ï´Ù.

    ¡¤ »ê¼ú¿¬»êÀÚ

        »ê¼ú¿¬»êÀÚ´Â ¸» ±×´ë·Î »ê¼ú¿¬»ê(°"¨½ÂÁ¦)À» ¼öÇàÇÕ´Ï´Ù.

            $a + $b  :  $a ¿Í $b ÀÇ ÇÕÀÔ´Ï´Ù.
            $a - $b  :  $a ¿Í $b ÀÇ »«°ª ÀÔ´Ï´Ù.
            $a * $b  :  $a ¿Í $b ÀÇ °öÇÑ°ª ÀÔ´Ï´Ù.
            $a / $b  :  $a ¿Í $b ÀÇ ³ª´«°ª(¸ò) ÀÔ´Ï´Ù.
            $a % $b  :  $a ¿Í $b ÀÇ ³ª´« ³ª¸ÓÁö ÀÔ´Ï´Ù.


    ¡¤ ¹®ÀÚ¿­ ¿¬»êÀÚ¿Í ´ëÀÔ ¿¬»êÀÚ

        ¹®ÀÚ¿­ ¿¬»êÀÚ´Â ¹®ÀÚ¿­ ³¢¸® ¿¬°áÇÏ´Â ¿ªÇÒÀ» ÇÕ´Ï´Ù. (".")·Î Ç¥Çö ÇÕ´Ï´Ù.
        ´ëÀÔ ¿¬»êÀÚ´Â $a = 4¿Í °°ÀÌ ÇÇ¿¬»êÀÚ($a)¿¡ (4)ÀÇ °á°ú¸¦ ´ëÀÔÇÏ´Â °ÍÀ» ¸»ÇÕ´Ï´Ù.
        (4) ºÎºÐÀº ¿©·¯ºÐµéÀÌ ¾î¶°ÇÑ ¿¬»êÀÚ¸¦ »ç¿ëÇؼ­ ´ëÀÔÇÏ´Â °Ì´Ï´Ù.
        ÀÌ·¯ÇÑ Ç¥Çö½ÄÀº À§¿¡¼­ºÎÅÍ º¸¾Æ¿Â ¼Ò½º¸¦ Âü°íÇÏ¸é µË´Ï´Ù.

  
    ¡¤ bit ´ÜÀ§ ¿¬»êÀÚ

        bit´ÜÀ§ ¿¬»êÀÚÀÇ °æ¿ì´Â Á¤¼öÀÇ °³º°ÀûÀÎ bit¸¦ on, off ÇÏ´Â ¿ªÇÒÀ» ÇÕ´Ï´Ù.

            $a & $b  :  AND  :  $a ¿Í $b°¡ 1ÀÎ bit¸¸ 1ÀÌ µË´Ï´Ù.
            $a | $b  :  OR   :  $a ¿Í $b Áß Çϳª¶óµµ 1ÀÎ bit¸é 1ÀÌ µË´Ï´Ù.
            ~$a      :  NOT  :  $a ¿Í $b ÀÇ »«°ª ÀÔ´Ï´Ù.
            $a << $b  :  Shift Left   :  $a ¿Í $b ÀÇ °öÇÑ°ª ÀÔ´Ï´Ù.
            $a >> $b  :  Shift Right  :  $a ¿Í $b ÀÇ ³ª´«°ª(¸ò) ÀÔ´Ï´Ù.



    ¡¤ ³í¸® ¿¬»êÀÚ

        ³í¸®ÀûÀÎ ¿¬»êÀ» ¼öÇà ÇÕ´Ï´Ù.

            $a and $b  :  AND  :  $a ¿Í $b°¡ ¸ðµÎ ÂüÀ̸é ÂüÀÔ´Ï´Ù.
            $a or $b   :  OR   :  $a ¿Í $bÁß Çϳª¶óµµ ÂüÀ̸é ÂüÀÔ´Ï´Ù.      
            $a xor $b  :  XOR  :  $a ¿Í $bÁß Çϳª¸¸ ÂüÀ̸é ÂüÀÔ´Ï´Ù.         
            !$a        :  NOT  :  $a °¡ ÂüÀÌ ¾Æ´Ï¸é ÂüÀÔ´Ï´Ù. 
            $a && $b   :  AND  :  $a ¿Í $b°¡ ¸ðµÎ ÂüÀ̸é ÂüÀÔ´Ï´Ù. 
            $a || $b   :  OR   :  $a ¿Í $b Áß Çϳª¶óµµ ÂüÀ̸é ÂüÀ̺ó´Ù. 


        "&&" ¿Í "and" ¿¬»êÀÚ ±×¸®°í "or" °ú "||" ¿¬»êÀÚ´Â ´ëÀÔÇÏ´Â
                
        º¯¼öÀÇ ¿ì¼± ¼øÀ§°¡ ´Ù¸£±â ¶§¹®¿¡ °¢°¢ÀÇ ±â´ÉÀÌ ´Ù¸¨´Ï´Ù.



    ¡¤ ºñ±³ ¿¬»êÀÚ

        µÑÀÇ °ªÀ» ºñ±³ÇØ ÁÝ´Ï´Ù. À§ÀÇ ³í¸® ¿¬»êÀÚ¿Í ÇÔ²² ºñ±³ ¿¬»êÀÚ ¿ª½Ã Á¦¾î ±¸Á¶¿¡ ÁÖ·Î »ç¿ëµË´Ï´Ù.
        ÀÌ µÑÀº ÀÚÁÖ »ç¿ëÇÒ °ÍÀÔ´Ï´Ù. 
        ´É¼÷ÇÏ°Ô Àû¿ëÇÏ·Á¸é ÀÚÁÖ Çغ¸´Â ¹æ¹ý»ÓÀÌ ¾ø½À´Ï´Ù. 

            $a == $b  :  $a ¿Í $b°¡ °°À¸¸é ÂüÀÔ´Ï´Ù.     
            $a != $b   :  $a ¿Í $b°¡ ´Ù¸£¸é ÂüÀÔ´Ï´Ù.               
            $a <  $b  :  $a °¡ $bº¸´Ù ÀÛÀ¸¸é ÂüÀÔ´Ï´Ù.              
            $a >  $b  :  $a °¡ $bº¸´Ù Å©¸é ÂüÀÔ´Ï´Ù.                
            $a <=  $b  :  $a °¡ $bº¸´Ù À۰ųª °°À¸¸é ÂüÀÔ´Ï´Ù.       
            $a >=  $b  :  $a °¡ $bº¸´Ù Å©°Å³ª °°À¸¸é ÂüÀÔ´Ï´Ù.       


    ¡¤ ¿¬»êÀÚ ¿ì¼± ¼øÀ§

        µ¿ÀÏÇÑ »óȲ¿¡¼­ ¿¬»êÀ» ÇÒ °æ¿ì ¿ì¼±ÇÏ´Â ¼øÀ§¸¦ ¸»ÇÕ´Ï´Ù. 3+4*4 = 19ÀÔ´Ï´Ù.
                
        "*" ¿¬»êÀÚ°¡ ¿ì¼± ¼øÀ§¸¦ °¡Áö±â ¶§¹®ÀÔ´Ï´Ù. 

        ÀÌ·¯ÇÑ °æ¿ì´Â Çб³¿¡¼­ ¹è¿î °Í°ú °°½À´Ï´Ù. ÇÏÁö¸¸ ¸î °¡Áö Ãß°¡µÉ ºÎºÐÀÌ ÀÖ¾î Ç¥¸¦ ÷ºÎÇß½À´Ï´Ù.

              Associativity           operators
            -------------------------------------------------------------------------------
              Non associativity       New
              Right                   [
              Right                   ! ~ ++ -- (int) (double) (string) (array) (object) @
              Left                    * / %
              Left                    + - .
              Left                    << >>
              Non associativity       < <= > >=
              Non associativity       == !=
              Left                    &
              Left                    ^
              Left                    |
              Left                    &&
              Left                    ||
              Left                    ? :
              Left                    = += -= *= /= .= %= &= != ~= <<= >>=
              Right                   Print
              Left                    And
              Left                    Xor
              Left                    Or
              Left                    .
            -------------------------------------------------------------------------------

        30Çà°ú 42ÇàÀº if¹®À» »ç¿ëÇؼ­ ºñ±³¿¬»êÀ» ÇÑ °ÍÀÔ´Ï´Ù. "$a" ¿Í "$b" , "$e"°¡ °°°Å³ª
        °°Áö ¾ÈÀ» ¶§¸¦ ºñ±³Çؼ­ ¾ÈÀÇ ³»¿ëÀ» Ãâ·ÂÇÏ´Â °ÍÀÔ´Ï´Ù. ±×¸®°í 44ÇàÀÇ °æ¿ì´Â (" . ") ¿¬»êÀÚ¸¦
        »ç¿ëÇؼ­ ¹®ÀÚ¿­À» ´ëÀÔÇØ º¸¾Ò½À´Ï´Ù.

        ¿©·¯ºÐµµ ¿©·¯ °¡Áö ¸¸µé¾î º¸¼¼¿ä.

        ¿©±â¼± 30Çà °ú 42ÇàÀÇ if ¹®¿¡ "xor" °ú "&&" ¿¬»êÀÚ¸¦ »ç¿ëÇØ º¸¾Ò½À´Ï´Ù. 
        ÀüÀÚ´Â ´ëÀÔµÈ µÑÀÇ º¯¼ö Áß¿¡ Çϳª¸¸ ÂüÀ̾î¾ß ½ÇÇàµÇ°í, ÈÄÀÚ´Â µÑ ¸ðµÎ°¡ ÂüÀ̾î¾ß ½ÇÇàµË´Ï´Ù.
        ±×·¡¼­ ù¹ø°(30Çà)ÀÇ if ¹®Àº ½ÇÇàµÇÁö ¾Ê½À´Ï´Ù. ±× ´ÙÀ½ÀÇ 35ÇàÀÌ ½ÇÇàµÇ´Â °ÍÀÔ´Ï´Ù.
        ±×¸®°í 42Çà±îÁö ½ÇÇàÇÏ´Â °ÍÀÔ´Ï´Ù.

Á¦¾î±¸Á¶

Á¦¾î ±¸Á¶´Â ¾ÕÀ¸·Î ¿©·¯ºÐµéÀÌ ¸¹ÀÌ Á¢ÇÏ°í °í¹ÎÇÏ´Â ºÎºÐÀÏ °ÍÀÔ´Ï´Ù.    Á¦¾î ±¸Á¶¸¦ Àß ÆľÇÇÏ°í PHP ¹®ÀåÀ» ¸¸µé¾úÀ» ¶§ ¹«¾ùº¸´Ù ±× ¹®ÀåµéÀº ºûÀÌ ³¯ °ÍÀÔ´Ï´Ù.    Á¦¾î±¸Á¶´Â ¿©·¯ °¡Áö°¡ Àִµ¥ Á¶°Ç¹®, ¹Ýº¹¹®, ÇÔ¼ö È£Ãâµî c¾ð¾î¿Í À¯»çÇÑ ºÎºÐÀÌ ¸¹ÀÌ ÀÖ½À´Ï´Ù.    ÇüÅ´ °ÅÀÇ C ¹®ÀåÀÌ´Ï ¿©·¯ºÐµéÀº ³¸¼³Áö ¾ÊÀ» °ÍÀÔ´Ï´Ù. ±×·¯¸é ±¸¹®ÇüŸ¦ »ìÆì º¸µµ·Ï ÇÏ°Ú½À´Ï´Ù.

    ¡¤ if ¹®
        
        ¾Õ¿¡¼­ if¹®À» Àá½Ã º¸¾ÒÀ» °ÍÀÔ´Ï´Ù 
                
        Çü½Ä -  if(Á¶°Ç)
                {  ¹®Àå ;  }
                 
        ÇØ´ç Á¶°ÇÀÌ ÂüÀÌ¸é ¹®ÀåÀ» ½ÇÇàÇÏ°í, °ÅÁþÀÌ¸é ³Ñ¾î°©´Ï´Ù.
                 
                    
    ¡¤ else ¹®

        ÀÌ ¹®Àº ifÀÇ Á¶°ÇÀÌ °ÅÁþÀÌ¸é ½ÇÇà ÇÏ°Ô²û ÇÏ´Â °ÍÀÔ´Ï´Ù.
                         
        Çü½Ä  -  else{  ¹®Àå ;  }
                         
                           
    ¡¤ elseif

        else¿Í if¸¦ ÇÕÃÄ ³õÀº °Í°ú °°½À´Ï´Ù.
        ÀüÀÇ if ¹®ÀÌ °ÅÁþÀÌ°í, ³ª¸ÓÁö elseif ¹®ÀÌ °ÅÁþÀ̸é ÀÌ ¹®ÀåÀ» ½ÇÇàÇÕ´Ï´Ù.

        Çü½Ä  -  elseif(Á¶°Ç){  ¹®Àå;  } 

        c¿Í °°ÀÌ ¿©·¯ °³ÀÇ ¹®À» »ç¿ëÇصµ ¹«°üÇÕ´Ï´Ù.

        ¿©±â¼­ elseif´Â ifÀÇ Á¶°ÇÀÌ °ÅÁþ À̹ǷΠÀÚ½ÅÀÇ Á¶°ÇÀ» °Ë»çÇÑ ÈÄ Ãâ·ÂÇÏ°Ô µË´Ï´Ù
        ±×¸®°í µÎ ¹ø° if¹®Àº ¸¶Âù°¡Áö·Î °ÅÁþÀ̹ǷΠelse¹®À» Ãâ·ÂÇÕ´Ï´Ù. 
        ÀÌ·¸µí "if" ¿Í "else" , "elseif" ¹®Àº Ç¥Çö½Ä¿¡¼­ ÀüüÀûÀÎ ±¸Á¶¸¦ Àâ¾ÆÁÖ´Â ¿ªÇÒÀ» ÇÕ´Ï´Ù.
        Áï, ´Ù½Ã ±× ¾È¿¡ ´Ù¸¥ Á¦¾î±¸Á¶ ¹®ÀÌ µé¾î°¡´Â ÇüÅ°¡ µË´Ï´Ù. 

        Âü°í·Î if ¹®°ú while ¹®ÀÇ °æ¿ì "{ }" ´ë½Å¿¡  " : "¸¦ »ç¿ëÇÏ´Â ¹æ¹ýµµ ÀÖ½À´Ï´Ù. 


    ¡¤ while ¹®

        while¹®Àº Á¶°Ç¿¡ ÃæÁ· µÉ ¶§±îÁö ¹®À» ¹Ýº¹ÇÕ´Ï´Ù.

        Çü½Ä -  while( Á¶°Ç ) {  ¹®Àå  }
         

        À§ ¼Ò½º´Â 1¿¡¼­ 5±îÁö Ãâ·ÂÀ» ÇÏ´Â ·çÇÁÀÔ´Ï´Ù.
        ÀÌ·¯ÇÑ ¼Ò½º´Â ¿©·¯ °¡Áö ´Ù¸¥ ·çÇÁ¿Í °°ÀÌ »ç¿ëÇÒ ¼ö Àִµ¥ ÇÊÀÚ´Â " ,"¸¦ Ãß°¡ÇØ º¸¾Ò½À´Ï´Ù. 
        ¸¶Áö¸· if ¹®À» º¸¸é $a°¡ Çѹø¾¿ Áõ°¡ ÇÒ ¶§¸¶´Ù " , "¸¦ Ãâ·ÂÇØ ÁÖ´Â ·çÇÁÀÓÀ» ¾Ë ¼ö ÀÖÀ» °ÍÀÔ´Ï´Ù.

    ¡¤ do .. while ¹®

        do .. while ·çÇÁÀÇ °æ¿ì´Â do ¹®ÀåÀ» Çѹø ½ÇÇàÇÏ°í ´ÙÀ½ while¹®À» ¼öÇà ÇÕ´Ï´Ù.
        (ÃÖÃÊ ÇѹøÀº do ¹®ÀåÀ» ½ÇÇàÇÕ´Ï´Ù.)

        Çü½Ä -  do { ¹®Àå }while( Á¶°Ç ) 

        ¼Ò½º¸¦ º¸¸é ÀÏ´Ü do ¹®(18Çà)Àº Çѹø ½ÇÇàÇÏ´Â °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.

    ¡¤ switch ¹®

        ÀÌ ¹®Àº if ¹®À» ³ª¿­ÇÑ °Í°ú ÇüŸ¦ °°ÀÌ ÇÕ´Ï´Ù.

        À§ ¼Ò½º¿¡¼­ switch¹®ÀÇ Á¶°ÇÀÌ ÀÏÄ¡ÇÏ´Â case¹®À» ½ÇÇà ÇÕ´Ï´Ù. 
        $i°¡ 2º¸´Ù ÀÛÀ» ¶§±îÁö $i´Â 1¾¿ Áõ°¡Çϸç switch¹®À» ½ÇÇàÇÕ´Ï´Ù. 
        óÀ½ " 0"ÀÏ ¶§ ¸ðµÎ¸¦ Ãâ·ÂÇÏ°í ´ÙÀ½ "1"ÀÏ ¶§ case 0 ÀÌÈÄÀÇ ¸ðµç °ÍÀ» Ãâ·ÂÇÕ´Ï´Ù.

        À§ °á°ú¿¡¼­ switch ¹®À» »ç¿ëÇϸ鼭 ¹®ÀÇ ½ÇÇàÀ» ÁßÁö ½Ãų ÇÊ¿ä°¡ ÀÖÀ» ¶© " break ; "
        À» »ç¿ëÇؼ­ ÁßÁö½Ãų ¼ö ÀÖ½À´Ï´Ù.
        °¡·É $i °¡ " 0 " ÀÏ ¶§ ¹® ÀüºÎ¸¦ ½ÇÇàÇÏÁö ¾ÊÀ¸·Á¸é ÀÌ Ç׸ñÀ» Ãß°¡ÇÏ´Â °ÍÀÔ´Ï´Ù. 

 
    ¡¤ for ¹®

        ÀÚÁÖ »ç¿ë ÇؾßÇÏ´Â ±¸¹® Áß¿¡ ÇϳªÀÌ°í, ¹°·Ð Çؼ® Çϱ⿡ µû¶ó ¾î·Á¿î ±¸¹®ÀÏ ¼ö ÀÖ½À´Ï´Ù.
        ÇÏÁö¸¸ ¸î¹ø µÇÇ®ÀÌ ÇÏ°í ¿¬½ÀÇÑ´Ù¸é ÃæºÐÈ÷ ¼ÒÈ­ÇÒ ¼ö ÀÖ½À´Ï´Ù.

        Çü½Ä  -  for( ÀÎÀÚ ; ÀÎÀÚ2 ; ÀÎÀÚ3 ) { ¹®Àå }

        ¿©±â¼­ "ÀÎÀÚ"ÀÇ °æ¿ì´Â óÀ½ ½ÃÀÛÇÒ ¶§ ÀÏ´Ü Çѹø ½ÇÇàÀ» ÇÕ´Ï´Ù.
        ±×¸®°í "ÀÎÀÚ2" ÀÇ °æ¿ì ¹Ýº¹ µÉ ¶§¸¶´Ù Çѹø¾¿ ½ÇÇàÇÕ´Ï´Ù. 
        ¸¶Áö¸·À¸·Î "ÀÎÀÚ3"Àº "ÀÎÀÚ2"ÀÇ °á°ú¿¡ µû¶ó ½ÇÇàµÇ¾îÁý´Ï´Ù.
        "ÀÎÀÚ2"°¡ °ÅÁþÀÏ °æ¿ì±îÁö °è¼Ó ½ÇÇàÀÌ µÇ´Â °ÍÀÔ´Ï´Ù. ´Ù½Ã ¸»Çϸé, "ÀÎÀÚ2"°¡ ÂüÀÏ °æ¿ì
        ³¡¾øÀÌ ½ÇÇàµÇ´Â ¹«ÇÑ ·çÇÁµµ ÀÖ´Ù´Â ¸»ÀÔ´Ï´Ù. ("ÀÎÀÚ2"´Â ºñ¿öµÎ°í for ¹®À» ¸¸µé ¼öµµ ÀÖ½À´Ï´Ù.) 
        for¹®ÀÇ ¿¹´Â Áö±Ý±îÁö ¹è¿î °Í°ú ³ª¸ÓÁö °ÍµéÀ» ÀÀ¿ëÇؼ­ °Ô½ÃÆÇ¿¡¼­ page ÇÒ´çÇÏ´Â °Í°ú page ¸µÅ© ¼ö
        ÇÒ´çÇÏ´Â °ÍµîÀ» ¼³¸íÇÏ°Ú½À´Ï´Ù.
   

        ¸ÕÀú À§ ¼Ò½º¿¡¼­ º¯¼öµéÀÇ ¿ªÇÒÀ» ¼³¸íÇÏ°Ú½À´Ï´Ù.
                
        $p_dip´Â ÆäÀÌÁö´ç ±Û ¼ö¸¦ ¸»ÇÕ´Ï´Ù.
        $t_numÀº ÃÑ ±Û ¼ö¸¦ ¸»ÇÕ´Ï´Ù.
        $p_page´Â ÇÑ page´ç page ¸µÅ© ¼ö¸¦ ¸»ÇÕ´Ï´Ù ( [1] [2] [3] .. )
        $p_pagex´Â "ceil()"·Î °è»êÇÏ´Â page¸µÅ© ¼ö Æò±Õ °ªÀÔ´Ï´Ù.
        ÀÌ ÇÔ¼ö´Â ÀÎÀÚ °ªº¸´Ù ÀÛÁö ¾ÊÀº ÃÖ¼ÒÀÇ Á¤¼ö¸¦ ±¸ÇØ ÁÝ´Ï´Ù.
        $page´Â ÇöÀç page ¼ö¸¦ ³ªÅ¸³À´Ï´Ù.
        $pt_page´Â ½ÃÀÛÇÒ page¸µÅ© ¼ýÀÚ¸¦ ¸»ÇÕ´Ï´Ù. ¿©±â¼­µµ ceilÀ» »ç¿ëÇߴµ¥ »ç¿ëÇÏÁö ¾Ê¾Æµµ µË´Ï´Ù.
        ÁÖ·Î " / "¸¦ ÇÒ ¶§ »ç¿ëÇÏ´Â °ÍÀÔ´Ï´Ù.
        $next_p´Â ´ÙÀ½ ÆäÀÌÁö¸¦ ³ªÅ¸³À´Ï´Ù.
        $pre_p ´Â ÀÌÀü ÆäÀÌÁö¸¦ ³ªÅ¸³À´Ï´Ù.
                
        $start_numÀº ÃÑ ±Û ¼ö¿¡¼­ ÇöÀç page¿Í ÆäÀÌÁö´ç ±Û ¼öÀÇ °öÀ» »« °ªÀÔ´Ï´Ù.
        ±×¸®°í ÀÌ º¯¼ö´Â ÇöÀç page¿¡ Ãâ·ÂµÉ ±ÛÀÇ ½ÃÀÛ ¹øÈ£¸¦ °¡Áý´Ï´Ù.
        $last_numÀº ÇöÀç page¿¡ Ãâ·ÂµÉ ±ÛÀÇ ¸¶Áö¸· ¹øÈ£¸¦ °¡Áý´Ï´Ù. ÀÌ º¯¼ö´Â ¿©±â¼­ Á÷Á¢ ´ëÀÔÇؼ­ »ç¿ë
        ÇÏÁö ¾Ê¾Ò½À´Ï´Ù. ±×·³ Â÷·Ê·Î ¹®À» Àоµµ·Ï ÇÏ°Ú½À´Ï´Ù.
                
        óÀ½ 21Çà¿¡¼­ if¹®Àº $page°¡ °ÅÁþÀÏ ¶§ "1"À» ÇÒ´ç ÇÕ´Ï´Ù.
        óÀ½ ½ÇÇàÇÏ¸é ¹°·Ð $page´Â °ÅÁþÀÌ´Ï "1"ÀÌ ÇÒ´ç µË´Ï´Ù.
        ±×¸®°í, 26ÇàÀÇ if¹®ÀÇ °æ¿ì 38ÇàÀÇ  $pt_page¸¦ ±¸Çϱâ À§ÇØ »ç¿ëÇÕ´Ï´Ù.
        Àß º¸½Ã¸é page ¸µÅ© Æò±Õ ¼öº¸´Ù ÀÛÀ» °æ¿ì ÀÌ °ª¿¡ "1"À» ´õÇؼ­ ( [1]..) ÀÌ Ãâ·Â µÇ°Ô ÇÕ´Ï´Ù. 
        ´ÙÀ½ 30ÇàÀº ³ª¸ÓÁö °æ¿ì $p_start °ªÀ» Á¤ÇØ ÁÝ´Ï´Ù. 32ÇàÀº ¾ÆÁ÷ ¹Ì¼÷ÇÑ ¸éÀÌ ÀÖ½À´Ï´Ù.
                
        ¿©·¯ºÐÀÌ Àß ¼öÁ¤ÇØ º¸½Ã±â ¹Ù¶ø´Ï´Ù.

        µåµð¾î 45Çà¿¡ for¹®ÀÌ ³ª¿Ô½À´Ï´Ù. ÀÌ ÇàÀº $pdÀÇ °ªÀ» $start_numÀ¸·Î ÇÏ°í ½ÃÀÛ±Û ¼ö¿¡ ÇÑ page´ç
        Ãâ·ÂµÉ ±Û ¼ö¸¦ ´õÇÑ °ª º¸´Ù À۰ųª °°À» ¶§±îÁö Áõ°¡ ½ÃÅ°´Â ¹® ÀÔ´Ï´Ù.
        Áï, ÇÑ page´ç Ãâ·ÂµÉ ±Û ¼ö¸¦ °è»ê ÇÏ´Â °ÍÀÔ´Ï´Ù. ($start_num ¿¡¼­ $start_num+$p_dip±îÁö)
        ÇÏÁö¸¸ ¿©±â¼­ Áß¿äÇÑ°Ç 48ÇàÀÇ if¹® ÀÔ´Ï´Ù. ¸¸¾à Ãâ¹ß ÆäÀÌÁö°¡ ( - ) ÀÏ °æ¿ì Ãâ·Â µÇÁö ¸»¾Æ¾ß
        µÇ±â ¶§¹®¿¡ "0" º¸´Ù Ŭ ¶§ ¶ó´Â Á¶°ÇÀ» ÁØ °ÍÀÔ´Ï´Ù.
        60ÇàÀÇ ½ÃÀÛ ±Û ¼ö´Â ( - )°ªÀÌ ³ª¿Íµµ Ãâ·ÂµÇ´Â °ÍÀÌ ¾Æ´Ï±â ¶§¹®¿¡ °ÆÁ¤ÇÏÁö ¾Ê¾Æµµ µË´Ï´Ù.
        Á¦ÀÏ ¸¶Áö¸· page¶õ¿¡ °¡¸é ÀÌ °æ¿ì°¡ »ý±é´Ï´Ù.
        (½ÃÀÛ ¹øÈ£¸¦ º¸¿©ÁÖ±â À§Çؼ­ 60ÇàÀ» µÎ¾ú½À´Ï´Ù)
        ±×¸®°í °¢°¢ 56, 57Çà¿¡ ÃÑpage ¼ö, 64, 65Çà¿¡ ÇöÀç page ¼ö¸¦ ³ªÅ¸³»µµ·Ï Çß½À´Ï´Ù.

        69ÇàÀÇ for¹®Àº ( [1] [2] [3]..)À» Ãâ·ÂÇϱâ À§ÇØ Á¸ÀçÇÕ´Ï´Ù.
        $pp´Â ¸µÅ© pageÀÇ ½ÃÀÛ È£¸¦ ³ªÅ¸³»¸ç ÇÒ´çµÈ ¸µÅ© page ¼ö ¸¸Å­ °è¼Ó Áõ°¡ ÇÕ´Ï´Ù.
        73ÇàÀÇ  if¹®Àº ÇöÀç pageÀÏ °æ¿ì ¸µÅ©¸¦ ÁÖÁö ¾Ê°Ô ÇÏ´Â °ÍÀÌ°í, ±× À½ 79ÇàÀÇ else¹®ÀÇ if¹®Àº
        ( - )´Â Ç¥½ÃÇÏÁö ¾Ê°í ÇöÀç page¿¡ Ãâ·ÂµÉ ¸µÅ© ¼ö ¸¸Å­ Ç¥½Ã ÇϱâÀ§ÇÑ Á¶°ÇÀÔ´Ï´Ù.
        ¿¬»êÀÚ¸¦ »ç¿ëÇؼ­ µÑÀÇ Á¶°Ç ¸ðµÎ°¡ ÂüÀ̾î¾ß ½ÇÇàµË´Ï´Ù.

        ¿©±â¼­´Â ( [1] [2] )ÀÇ Ç¥½Ã ¸»°í "´ÙÀ½ page"¿Í "ÀÌÀü page"¸¦ Ç¥½ÃÇØ ÁÖ´Â ¼Ò½ºÀÔ´Ï´Ù.
        ÇÑ page¾¿ ´ÙÀ½ page³ª ÀÌÀü page·Î ³Ñ¾î°¥ ¶§ »ç¿ëÇÏ´Â ¸µÅ©ÀÔ´Ï´Ù.
        103ÇàÀÇ if¹®Àº $page°¡ "1"ÀÏ °æ¿ì "óÀ½ page" ¸¦ Ç¥½ÃÇÏ°í ¸µÅ©¸¦ ÁÖÁö ¾Ê´Â °ÍÀÌ°í, 
        107ÇàÀÇ ±× ¹ÛÀÇ °æ¿ì´Â ¸µÅ©¸¦ ½ÃÄÑ ÁÝ´Ï´Ù.
        115ÇàÀÇ if¹®ÀÇ °æ¿ìµµ $page°¡ ÃÑ page¿Í °°À» °æ¿ì "¸¶Áö¸· page" ¸¦ Ç¥½ÃÇØ ÁÖ°í,
        120ÇàÀÇ ±×·¸Áö ¾ÊÀ» °æ¿ì page¸¦ ¸µÅ© ½ÃÄÑ ÁÝ´Ï´Ù.
        ÀÌ ¼Ò½º¸¦ ´Ù¸¥ ¹æ½ÄÀ¸·Î ¿©·¯ºÐÀÌ ´Ù½Ã ¸¸µé¾î º¸±â ¹Ù¶ø´Ï´Ù.
        ƯÈ÷ page ¸µÅ© ºÎºÐÀº ¸¶Áö¸· page ºÎºÐ¿¡¼­ ÇÒ´çµÈ page ¼ö°¡ Ãâ·ÂµÇÁö ¾Ê´Â ¹®Á¦Á¡ÀÌ ÀÖ½À´Ï´Ù.
        ÀÌÁ¡ ¼÷ÁöÇÏ½Ã°í °á°ú¸¦ È®ÀÎÇÏ°Ú½À´Ï´Ù.

        °á°ú¸¦ º¸¸é ¸ðµç ¸µÅ©°¡ Àß ÀÌ·ç¾îÁ® ÀÖ´Â °ÍÀ» È®ÀÎ ÇÒ ¼ö ÀÖ½À´Ï´Ù. ÇÏÁö¸¸ ¾Õ¿¡¼­ ¸»ÇÑ ¹®Á¦Á¡ÀÌ ÀÖ½À´Ï´Ù. 
        µÞºÎºÐÀÇ °æ¸Å °Ô½ÃÆÇÀ̳ª ÁÖ°¡ °Ô½ÃÆÇ µîÀÇ ¼Ò½º¸¦ º¸½Ã¸é Á¶±Ý ¼öÁ¤ÇÑ°É º¼ ¼ö ÀÖ½À´Ï´Ù. 
        ÇÏÁö¸¸ ÀÌ ¼Ò½º¿¡´Â ¸î °¡Áö °íÃÄ¾ß ÇÒ ºÎºÐÀÌ ÀÖ½À´Ï´Ù. ´ÙÀ½ÀÇ ±×¸²À» º¸¸é¼­ ¼³¸í ÇÏ°Ú½À´Ï´Ù.

        ¿©±â¼­ ¸¶Áö¸· page´Â ¸µÅ©°¡ ÇÒ´çµÈ ¼öº¸´Ù 2°³ ¸ðÀÚ¶õ ¸¸Å­ ³ªÅ¸³ª´Â °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù. 
        ÀÌ ¼Ò½º´Â db¿¡ ¿¬°á¸¸ ÇÏ¸é ¹Ù·Î »ç¿ë °¡´É ÇÏÁö¸¸ ¸¶Áö¸· ÆäÀÌÁö ¸µÅ©ÀÇ ¹®Á¦Á¡¸¸ ÇØ°á µÈ´Ù¸é
        ´õ ÁÁÀº ¼Ò½º°¡ µÉ °ÍÀÔ´Ï´Ù. 

 
    À̹ø Àå¿¡¼­´Â PHP ¹®¹ýÀÌ ¾î¶»°Ô ±¸¼ºµÇ´ÂÁö ¾Ë¾Æº¸¾Ò½À´Ï´Ù.
        ÀÌ ³»¿ëÀº PHP ÇÁ·Î±×·¡¹ÖÀÇ ±âº»À̹ǷΠȮ½ÇÈ÷ ÀÌÇØÀ» ÇØ¾ß ÇÕ´Ï´Ù.
    ´ÙÀ½ ÀåÀº ÀÌ Àå¿¡ ÀÌ¾î º»°ÝÀûÀ¸·Î PHPÀÇ ÇÔ¼ö¸¦ ºñ½ÁÇÑ ±â´Éº°·Î ¼³¸íÇÏ°Ú½À´Ï´Ù.


    Âü°í , ¿©±â¼­ ¾ð±ÞÇÑ ¼Ò½º°¡ Á¸ÀçÇÏÁö ¾ÊÀ» ¼ö ÀÖÀ¸¸ç Àǹ®Á¡Àº ¸ÞÀÏ·Î Áú¹®Çϱ⠹ٶø´Ï´Ù.

8. PHP ÇÔ¼öµé°ú ¿¹Á¦

8.1 PHP ÇÔ¼ö

PHP ÇÔ¼ö´Â 900¿©°¡Áö ÀÌ»óÀÌ ÇöÀç Á¸ÀçÇÕ´Ï´Ù.    ¿©±â¼­´Â ¸ðµÎ¸¦ ´Ù·çÁö ¾Ê°í ÀÚÁÖ »ç¿ëÇÏ¸ç ²À ÇÊ¿äÇÑ ÇÔ¼ö ºÎºÐ¸¸ ¼³¸í ÇÏ°Ú½À´Ï´Ù.    ÀÌ Àå¿¡¼­ »ç¿ëÇÏ´Â ¼Ò½º´Â ´ëºÎºÐ °£´ÜÇÑ ¼Ò½ºÀÔ´Ï´Ù.    ÇÏÁö¸¸ Á¶±Ý ³­ÇØÇÑ ¼Ò½ºÀÇ °æ¿ì cd¿¡ Æ÷ÇÔ½ÃÄ×½À´Ï´Ù.

¼öÇÐÇÔ¼ö

1. Abs(x)

    Àý´ë°ªÀ» ¸®ÅÏÇØ ÁÖ´Â ÇÔ¼öÀÔ´Ï´Ù. ½Ç¼ö °ªÀ» ÀÔ·ÂÇÏ¸é ½Ç¼ö °ªÀ» ¸®ÅÏÇÕ´Ï´Ù. 
    ³ª¸ÓÁöÀÇ °æ¿ì int·Î ¸®ÅÏÇÕ´Ï´Ù.

    9ÇàÀÇ abs() ÇÔ¼ö¸¦ Ãâ·ÂÇØ ÁÝ´Ï´Ù. ÀÌ ¿¹´Â Form¹®À» »ç¿ëÇߴµ¥¿ä ¾ÕÀ¸·ÎÀÇ ¼³¸í¿¡µµ ÀÌform¹®À» ÀÚÁÖ
    »ç¿ëÇÏ°Ô µË´Ï´Ù.

    À½ÀÇ ½Ç¼öÇüÀ¸·Î ÀÔ·Â ÇßÀ» °æ¿ì ¾çÀÇ ½Ç¼ö·Î ¸®ÅÏÇÏ´Â °É º¼ ¼ö ÀÖ½À´Ï´Ù.


2. Acos(x)

    ¾ÆÅ© ÄÚ»çÀÎ °ªÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù. ´ëÀÔÇÏ´Â °ªÀÌ (-1 ~ 1) »çÀÌ°¡ ¾Æ´Ï¸é NAN °ªÀ» ¸®ÅÏÇÕ´Ï´Ù. (X´Â ¶óµð¾È °ª)

    À§¿¡¼­ ÀԷ¶õ¿¡ "1"À» ÀÔ·Â ÇßÀ» °æ¿ì Acos, Asin, Atan ÇÔ¼öÀÇ ¼öÇà °á°ú¸¦ º¼ ¼ö ÀÖ½À´Ï´Ù.

  
3. Asin(x)

    ¾ÆÅ© »çÀÎ °ªÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù. ´ëÀÔÇÏ´Â °ªÀÌ (-1 ~ 1) »çÀÌ°¡ ¾Æ´Ï¸é NAN°ªÀ» ¸®ÅÏÇÕ´Ï´Ù. (X´Â ¶óµð¾È °ª)

           
4. Atan(x)

    ¾ÆÅ© źÁ¨Æ® °ªÀ» ¸®ÅÏÇÕ´Ï´Ù. (X´Â ¶óµð¾È °ª)

                     
5. Atan2(x,y)

    x¿Í y»çÀÌÀÇ ¾ÆÅ© źÁ¨Æ® °ªÀ» ¸®ÅÏÇÕ´Ï´Ù. ÀÌ°ÍÀº Atan(y/x) ÇÑ °Í°ú °°½À´Ï´Ù.(X´Â ¶óµð¾È °ª)


6. base_convert(string num, int fromnum, tonum)

    string numÀ» fromnum¿¡¼­ tonumÀ¸·Î º¯È¯ÇÑ ÈÄ Ãâ·ÂÇÕ´Ï´Ù.

     
7. bindec(string bin_string)

    ¹ÙÀ̳ʸ®¸¦ 10Áø¼ö·Î ÀüȯÇؼ­ Ãâ·ÂÇØ ÁÝ´Ï´Ù. ¹Ý´ëÀÇ °æ¿ì´Â decbin(int num)ÀÔ´Ï´Ù.

    À§¿¡¼­ 2Áø¼ö "1010"À» ÀÔ·ÂÇϸé 10Áø¼ö "10"À» Ãâ·Â ÇÏ´Â °ÍÀ» È®ÀÎ ÇÒ ¼ö ÀÖ½À´Ï´Ù.

  
8. ceil(float num)

    float numº¸´Ù ÀÛÁö¾ÊÀº ÃÖ¼Ò Á¤¼ö¸¦ Ãâ·ÂÇØ ÁÝ´Ï´Ù.

    À¯»çÇÑ ¹Ý´ë ÇÔ¼ö´Â floor(x)ÀÔ´Ï´Ù.

9. Cos(x)

    ÄÚ»çÀÎ °ªÀ» ¸®ÅÏÇØÁÝ´Ï´Ù (X´Â ¶óµð¾È °ªÀÔ´Ï´Ù.)

      
10. Dechex(int num)

    10Áø¼ö¿¡¼­ 16Áø¼ö·Î ¸®ÅÏÇØÁÝ´Ï´Ù. ¹Ý´ëÀÇ °æ¿ì´Â Hexdec(string hex_num)ÀÔ´Ï´Ù.

    À§¿¡¼­ 10Áø¼ö "44"¸¦ ÀÔ·ÂÇÑ °á°ú 16Áø¼ö "2c"°¡ Ãâ·Â µÇ´Â °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.

 
11. Log(float x)

    ÀÚ¿¬ ·Î±× °ªÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù. 

           
12. Log10(float x)

    »ó¿ë ·Î±× °ªÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

13. Max(x , y , ¡¦)

    ÁÖ¾îÁø °ªÀ» ºñ±³Çؼ­ ÃÖ´ë°ªÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù.
    ¸¸¾à ÁÖ¾îÁø °ª Áß Çϳª ¶Ç´Â ±× ÀÌ»óÀÌ doubleÀ̸é double·Î °è»êÇϸç ÀÌ °ªÀ¸·Î ¸®ÅÏÇÕ´Ï´Ù.
    ¸¸¾à double °ªÀÌ ¾ø´Ù¸é Á¤¼ö·Î °è»êµÇ¸ç ÀÌ °ªÀ¸·Î ¸®ÅÏÇÕ´Ï´Ù.

            
14. Min(x , y , ¡¦)

    ÁÖ¾îÁø °ªÀ» ºñ±³ÇÏ¿© ÃÖ¼Ò °ªÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù.
    ¸¸¾à ÁÖ¾îÁø °ª Áß Çϳª ¶Ç´Â ±× ÀÌ»óÀÌ doubleÀ̸é ÀÌ °ªÀ¸·Î °è»êÇϸç ÀÌ °ªÀ¸·Î ¸®ÅÏÇÕ´Ï´Ù. 
    ¸¸¾à double°ªÀÌ ¾ø´Ù¸é Á¤¼ö·Î °è»êµÇ¸ç ÀÌ °ªÀ¸·Î ¸®ÅÏÇÕ´Ï´Ù.

15. mt_rand(intÃÖ¼Ò°ª , intÃÖ´ë°ª)

    Á¤¼ö °ªÀ» ºñ±³Çؼ­ ´õ ÁÁÀº ³­¼ö °ªÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

     
16. mt_srand(int x)

    ÁÖ¾îÁø Á¤¼öÀÇ ´õ ÁÁÀº ³­¼öÀÇ Ãʱ⠰ªÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

17. mt_getrandmax(void)

    ÃÖ´ëÀÇ ³­¼ö °ªÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

     
18. number_format(float_num, int_dec, string dec_point, string thousands_sep)

    ÁÖ¾îÁø °ª¿¡ 1000´ÜÀ§¿Í ¼Ò¼öÁ¡ ¼ö¿¡ °üÇØ "," ¿Í "." À» ³Ö¾î ¸®ÅÏÇØ ÁÝ´Ï´Ù.

    À§¿¡¼­ ¼Ò½º 5ÇàÀ» º¸¸é "3"ÀÇ °æ¿ì 1000´ÜÀ§·Î ¼ýÀÚ¸¦ ±¸ºÐ ÇÏ¸ç ¼Ò¼öÁ¡ ÀÌÇÏ´Â "~"·Î
    Ç¥Çö ÇÏ´Â °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.

 
19. Exp(x)

    eÀÇ XÁ¦°ö°ªÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

           
20. Floor(x)

    ÁÖ¾îÁø °ªÀ» ³ÑÁö ¾Ê´Â ÃÖ¼Ò°ªÀ» ¸®ÅÏÇÕ´Ï´Ù.

    À§¿¡¼­ floor_num ÀԷ¶õ¿¡ "4.44"À» ÀÔ·Â ÇßÀ» °æ¿ì ÃÖ¼ÒÀÇ Á¤¼öÀÎ "4"À» Ãâ·ÂÇÏ´Â
    °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.

 

21. getrandmax(void)

    ³­¼öÀÇ ÃÖ´ë°ªÀ» ¸®ÅÏÇÕ´Ï´Ù.

           
22. Srand(int x)

    ³­¼ö »ý¼º½ÃÀÇ ÃʱⰪÀ» ¸®ÅÏÇÕ´Ï´Ù.

                     
23. rand(int ÃÖ¼Ò°ª, intÃÖ´ë°ª)

    ÁÖ¾îÁø °ªÀ» ºñ±³ÇØ ´õ ÁÁÀº ³­¼ö °ªÀ» ¸®ÅÏÇÕ´Ï´Ù.

24. Octdec(x)

    ÁÖ¾îÁø °ªÀ» 8Áø¼ö¿¡¼­ 10Áø¼ö·Î º¯È¯Çؼ­ ¸®ÅÏÇÕ´Ï´Ù.

     
25. Pi(x)

    ÁÖ¾îÁø °ªÀ» ÆÄÀÌ °ªÀ¸·Î º¯È­Çؼ­ ¸®ÅÏÇÕ´Ï´Ù.

                   
26. Pow(x,y)

    xÀÇ y½Â °ªÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

27. round(x)

    xÀÇ ¹Ý¿Ã¸²ÇÑ °ªÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

     
28. sin(x)

    »çÀÎ °ªÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

                   
29. sqrt(x)

    xÀÇ Á¦°ö±ÙÀ» ¸®ÅÏÇÕ´Ï´Ù.

30. tan(x)

    źÁ¨Æ® °ªÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù.
    ¿©±â¼­ ´ëºÎºÐÀÇ ÇÔ¼ö´Â °íµîÇб³³ª ÁßÇб³ ¶§ ¹è¿î ¼öÇÐÀÇ ±â¾ïÀÌ ÀÖ´Ù¸é °£´ÜÈ÷ ÀÌÇØ°¡ µÉ °ÍÀÔ´Ï´Ù.
    ±× Áß ³­¼ö ¹ß»ý¿¡ ´ëÇÑ ¿¹¸¦ Çѹø ´õ º¸ÀÌ°Ú½À´Ï´Ù.
    ³­¼ö´Â ÁÖ·Î ÀÓÀÇÀÇ ¼ö¸¦ ¹«ÀÛÀ§·Î ÃßÃâÇÒ ¶§ »ç¿ëÇÕ´Ï´Ù. º¹±Ç ´ç÷ °æ¿ì¸¦ »ý°¢ÇÏ¸é µÉ °ÍÀÔ´Ï´Ù. 
    ¸ÕÀú ÁÖ¾îÁø ¼öÀÇ °¡Àå ÁÁÀº ³­¼ö¸¦ ã°í ´Ù½Ã ÀÌ °ªÀ» ´Ù¸¥ °ª°ú ºñ±³ÇØ ¹«ÀÛÀ§·Î ³­¼ö¸¦ ¹ß»ý ÇÏ´Â µî
    ¿©·¯ °¡Áö ¹æ¹ýÀÌ ÀÖ½À´Ï´Ù.

    ¿ª½Ã Æû ¹®À» »ç¿ëÇß½À´Ï´Ù. Æû ¹®Àº ´Ü¼øÇÑ °ÍºÎÅÍ º¹ÀâÇÑ °Í ±îÁö Á¾·ù°¡ ¿©·¯ °¡Áö ÀÖ°í ¹è¿ì±â ¶ÇÇÑ
    ½±½À´Ï´Ù. ¾ÕÀ¸·ÎÀÇ ¼Ò½º¸¦ º¸¸é¼­ ÀÍÈ÷±â ¹Ù¶ø´Ï´Ù.

    °á°ú¸¦ º¸¸é 43ÀÇ Á¦ÀÏ ÁÁÀº ³­¼ö °ªÀ» ¾òÀº ´ÙÀ½ "324"¿Í ºñ±³Çؼ­ ´Ù½Ã °¡Àå ÁÁÀº ³­¼ö¸¦ Ç¥½ÃÇØ ÁÝ´Ï´Ù.

ÆÄÀϽýºÅÛ ÇÔ¼ö

1. basename(string path)

    ÆнºÁß¿¡ name ºÎºÐÀ» ±¸ÇØ ÁÝ´Ï´Ù. °ü·Ã ÇÔ¼ö´Â dirname() ÀÔ´Ï´Ù.

2. chgrp(string filename , mixed group)
 
    ÆÄÀÏÀÇ ±×·ìÀ» ¹Ù²Ù¾îÁÝ´Ï´Ù. 

  
3. chmod(string filename, int mode)

    ÇØ´ç ÆÄÀÏÀÇ ¸ðµå¸¦ ¹Ù²Ù¾î ÁÝ´Ï´Ù.

         
4. chown(string filename, mixed user)

    ÇØ´ç ÆÄÀÏÀÇ ¼ÒÀ¯ÀÚ¸¦ ¹Ù²Ù¾î ÁÝ´Ï´Ù.
    °ü·Ã ÇÔ¼ö´Â chmod() ÀÔ´Ï´Ù.

             
 * Âü°í : 2, 3, 4 ¹øÀÇ °æ¿ì ½ÇÁ¦ À¥ ¼­¹öÀÇ ·çÆ®±ÇÇÑÀÌ ÀÖ´Â °æ¿ì ¹Ù²Ü ¼ö ÀÖÀ¸¸ç ÇØ´ç ÆÄÀÏÀÇ ÁÖÀÎÀÏ °æ¿ì °¡´ÉÇÕ´Ï´Ù.
<TIP>----------------------------------------------------------------------------

Chmod ±ÇÇÑ ¼³Á¤°ú ±¸Á¶

ÇØ´çÇÏ´Â µð·ºÅ丮¿Í ÆÄÀÏ¿¡ °üÇÑ ±ÇÇÑ ¼³Á¤Àº ¸®´ª½º¿¡¼­ Áß¿äÇÑ ºÎºÐ ÀÔ´Ï´Ù. 
¿©±â¼­ ½±°Ô ÀÌÇØÇÏ°í ¼³Á¤ÇÏ´Â ¹æ¹ýÀ» º¸¿© µå¸®°Ú½À´Ï´Ù.
drwxrwxrwx - ÀÌ°ÍÀº Â÷·Ê·Î µð·ºÅ丮(d), ¼ÒÀ¯ÀÚ(rwx), ±×·ì(rwx), others(rwx)¸¦ Ç¥Çö ÇÏ´Â °ÍÀÔ´Ï´Ù.
¹°·Ð µð·ºÅ丮°¡ ¾Æ´Ò °æ¿ì "-" ·Î Ç¥ÇöµÇ¸ç ³ª¸ÓÁö ºÎºÐµµ ¸¶Âù°¡Áö ÀÔ´Ï´Ù.

r - Àбâ, w - ¾²±â, x - ½ÇÇà À» Ç¥ÇöÇÕ´Ï´Ù.

  
±×·³, °£´ÜÇÑ ¿¹·Î ƯÁ¤ ÆÄÀÏÀÇ ±ÇÇÑÀ» ¼³Á¤ º¸°Ú½À´Ï´Ù.

#chmod 777 test.txt    -   test.txt ÆÄÀÏÀÇ ±ÇÇÑÀ» 777·Î ÇÕ´Ï´Ù.

¿©±â¼­ 777Àº ¼ÒÀ¯ÀÚ,±×·ì, othersÀÇ 8Áø¼ö¸¦ ´õÇÑ ¼ýÀÚ À̸ç -rwxrwxrwx ÀÔ´Ï´Ù.
Áï, 777 Àº  
¼ÒÀ¯ÀÚ(400 + 200 + 100), ±×·ì(040 + 020 + 010), others(004 + 002 + 001) À»  ´õÇÑ °ª ÀÔ´Ï´Ù.

   
°¢ ¸ðµåº° 8Áø¼ö¸¦ Á¤¸® ÇÏ¸é ¾Æ·¡¿Í °°½À´Ï´Ù.

400 - ¼ÒÀ¯ÀÚ Àбâ( r ), 200 - ¼ÒÀ¯ÀÚ ¾²±â( w ), 100 - ¼ÒÀ¯ÀÚ ½ÇÇà( x )
040 - ±×·ì Àбâ( r ), 020 - ±×·ì ¾²±â( w ), 010 - ±×·ì ½ÇÇà( x )
004 - others Àбâ( r ), 002 - others ¾²±â( w ), 001 - others ½ÇÇà( x )
----------------------------------------------------------------------------------------------------
5. clearstatcache(void)

    ÆÄÀÏÀÇ cache stat¸¦ clear ÇØÁÝ´Ï´Ù.
    Áï, ¸¶Áö¸·À¸·Î ¸Þ¸ð¸®¿¡¼­ ºÒ¸®¾îÁø °á°ú¸¦ ÀÌ ÇÔ¼ö¸¦ »ç¿ëÇؼ­ Á¦°ÅÇØ ÁÝ´Ï´Ù.
    °ü·Ã ÇÔ¼ö·Î´Â stat() , lstat() , file_exists() , is_writeable() , is_readable() , 
    is_executable() , is_file() , is_dir() , is_link , filectime() , fileatime() , filemtime()
    fileinode() , filegroup() , fileowner() , filesize() , filetype() , fileperms() µîÀÔ´Ï´Ù.

          
6. copy(string source, string dest)

    ¼ø¼­´ë·Î ¿øº» ÆÄÀÏ¿¡¼­ ¹Ù²Ü ÆÄÀÏ·Î Ä«ÇÇÇØ ÁÝ´Ï´Ù. °ü·Ã ÇÔ¼ö·Î´Â rename() ÀÔ´Ï´Ù.

    À§¿¡¼­ pathÀÇ "/home/ftp/test" µð·ºÅ丮¿Í "test1.txt" ÆÄÀÏÀÇ chown´Â nobody.nobody À̸ç
    chmod´Â 777·Î ¼³Á¤ÇÑ »óÅ ÀÔ´Ï´Ù. 
    ¾ÆÆÄÄ¡ ¼­¹ö¿¡¼­ copyÇÔ¼ö¸¦ ½ÇÇà Çϱâ À§Çؼ­´Â copyÇÏ°íÀÚ ÇÏ´Â µð·ºÅ丮¿Í ÆÄÀÏÀÇ ±ÇÇÑ¿¡ ¿¬°ü ÇÕ´Ï´Ù. 
    Ãâ·ÂÀÌ "1"ÀÎ °ÍÀº ÂüÀ» ¸»ÇÕ´Ï´Ù.

 
7. unlink(string filename)

    ÆÄÀÏÀ» Á¦°ÅÇÏ´Â ÇÔ¼öÀÔ´Ï´Ù. °ü·Ã ÇÔ¼ö·Î´Â µð·ºÅ丮¸¦ Áö¿ì´Â rmdir()ÀÔ´Ï´Ù. 

    À§¿¡¼­ UnlinkÇÔ¼ö ¿ª½Ã ±ÇÇÑ¿¡ ¿¬°üÇؼ­ ½ÇÇà µÇ¾îÁö¸ç "1"Àº ÇØ´ç ÆÄÀÏÀÌ »èÁ¦ µÇ¾úÀ½À» ³ªÅ¸³À´Ï´Ù.

 
8. unset(mixed var)

    ÇÔ¼öÀÇ °ªÀ» Áö¿ö ÁÝ´Ï´Ù. °ü·Ã ÇÔ¼ö·Î´Â isset()°ú empty()ÀÔ´Ï´Ù.

    
9. dirname(string path)

    ÆнºÀÇ µð·ºÅ丮 À̸§À» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

10. diskfreespace(string directory)

    µð·ºÅ丮ÀÇ »ç¿ë °¡´ÉÇÑ ³²Àº ¿ë·®À» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

11. fclose(int fp)

    ÆÄÀÏ Æ÷ÀÎÅ͸¦ ´Ý½À´Ï´Ù.

  
12. feof(int fp)

    ÆÄÀÏ Æ÷ÀÎÅÍ°¡ EOFÀÎÁö °Ë»çÇÕ´Ï´Ù.

         
13. fgetc(int fp)

    ÆÄÀÏ Æ÷ÀÎÅÍ¿¡¼­ ¹®ÀÚ¸¦ ÀнÀ´Ï´Ù.

            
14. fgetcsv(int fp, int lengyh, string [delimiter])

    ÆÄÀÏ¿¡¼­ csv Çʵå·Î µÈ ¶óÀÎÀ» Àоî¿Í ºÐ¼®ÇÕ´Ï´Ù.

                         
15. fgets(int fp, int length)

    ÆÄÀÏ Æ÷ÀÎÅÍ¿¡¼­ ÇÑ ¶óÀÎÀ» °¡Á® ¿É´Ï´Ù.

    À§¿¡¼­ "test1.txt" ÆÄÀÏÀÇ ³»¿ëÀº "ff i love cry" ÀÔ´Ï´Ù.
    ¸ÕÀú fgetc( ) ÇÔ¼ö¿¡ ÀÇÇØ f°¡ Ãâ·Â µÇ°í ´ÙÀ½ ÆÄÀÏ Æ÷ÀÎÆ®ºÎÅÍ fgets( ) ÇÔ¼ö¿¡ ¼³Á¤ÇÑ 17byte ±æÀÌ
    ¸¸Å­ ¹®ÀÚ¸¦ Ãâ·Â ÇÕ´Ï´Ù.

 
16. fgetss(int fp, int length)

    ÆÄÀÏ Æ÷ÀÎÅÍ¿¡¼­ ÇÑ ¶óÀÎÀ» ÀÐ¾î µé¿© htmlÀ» ÄÚµåµéÀ» ¶¼¾î ³À´Ï´Ù. ±×¸®°í php¸¦ ÀÐ¾î µéÀÔ´Ï´Ù.

    À§ ¼Ò½º¸¦ º¸¸é 5ÇàÀÇ fopen ÇÔ¼ö¸¦ ÀÌ¿ëÇØ "test2.txt" ÆÄÀÏÀ» Àб⠸ðµå( r ) ·Î ¿±´Ï´Ù.
    ´ÙÀ½ 11ÇàÀÇ while¹®Àº ÆÄÀÏ Æ÷ÀÎÆ®°¡ ³¡ÀÌ ¾Æ´Ò ¶§ ±îÁö ¹Ýº¹ÇÕ´Ï´Ù. 
    Ãâ·ÂµÈ °á°ú¸¦ º¸¸é ÇØ´ç ÆÄÀÏÀÇ ³»¿ë Áß html ÄÚµå´Â Á¦°ÅµÇ°í PHP ÄÚµå¿Í ¹®ÀÚ¸¸ Ãâ·Â µÇ´Â °ÍÀ» º¼
    ¼ö ÀÖ½À´Ï´Ù.

 

17. file(string filename)

    ÇÑ ÆÄÀÏÀ» ÀÐ¾î µé¿© ¹è¿­·Î ¸®ÅÏÇØ ÁÝ´Ï´Ù.

    À§ ¼Ò½º¿¡¼­ 12ÇàÀº file ÇÔ¼öÀÇ ¼öÇà °á°ú(8Çà) ÆÄÀÏÀÇ ³»¿ë Áß Ã³À½ ÁÙ¿¡ ÇØ´ç ÇÏ´Â ±ÛÀ» Ãâ·Â ÇÕ´Ï´Ù.  


18. file_exists(string filename)

    ÇØ´ç ÆÄÀÏÀÌ Á¸Àç ÇÏ´ÂÁö ¿©ºÎ¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

    ¿©±â¼­ ÀÛ¼ºÇÑ ¼Ò½º´Â test.php ÆÄÀÏ·Î ÀÛ¼ºÇؼ­ °á°ú¸¦ ½ÇÇà Çß½À´Ï´Ù.
    Cd¾ÈÀÇ ¼Ò½ºÀÇ °æ¿ì ÇØ´ç ÇÔ¼ö ¼øÀ¸·Î ³ª¿­µÇ¾î ÀÖ½À´Ï´Ù.
    8ÇàÀÇ º¯¼ö´Â ÇØ´ç µð·ºÅ丮¿¡ ÆÄÀÏÀÌ Á¸Àç ÇÏ´ÂÁö ¿©ºÎ¸¦ È®ÀÎ ÇÏ°í ¾Æ·¡ 12ÇàÀÇ Á¶°ÇÀ» ¸¸Á·ÇÏ´Â
    ºÎºÐ¿¡¼­ Ãâ·Â µË´Ï´Ù.


19. fileatime(string filename)

    ÇØ´ç ÆÄÀÏ¿¡ ¸¶Áö¸·À¸·Î ¾×¼¼½ºÇÑ ½Ã°£À» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

20. filectime(string filename)

    ÇØ´ç ÆÄÀÏÀÇ inode°¡ ¸¶Áö¸·À¸·Î º¯°æµÈ ½Ã°£À» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

    À§ °á°ú¿¡¼­ ½Ã°£Àº À¯´Ð½º ŸÀÓÀÔ´Ï´Ù.

 
21. filegroup(string filename)

    ÇØ´ç ÆÄÀÏ ¼ÒÀ¯ÁÖÀÇ ±×·ì id¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

    
22. fileinode(string filename)

    ÇØ´ç ÆÄÀÏÀÇ inode numÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

23. filemtime(string filename)

    ÇØ´ç ÆÄÀÏÀÇ ¸¶Áö¸·À¸·Î ¼öÁ¤µÈ ½Ã°£À» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

24. fileowner(string filename)

    ÇØ´ç ÆÄÀÏÀÇ ¼ÒÀ¯ÁÖ id¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

25. fileperms(string filename)

    ÇØ´ç ÆÄÀÏÀÇ Æ۹̼Ç(±ÇÇÑ)À» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

    À§ °á°ú´Â ºñÆ®·Î Ãâ·ÂµÈ °á°úÀÔ´Ï´Ù.
    ÀÌ ÇÔ¼ö¸¦ ÀÌ¿ëÇؼ­ ÆÄÀÏÀÇ Àбâ, ¾²±â, ½ÇÇà ¿©ºÎ¸¦ È®ÀÎÇϱâ À§Çؼ­´Â bit °ªÀ¸·Î Á¶°ÇÀ» ¸¸µé¾î¾ß µË´Ï´Ù.

 
26. filesize(string filename)

    ÇØ´ç ÆÄÀÏÀÇ Å©±â¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

27. filetype(string filename)

    ÇØ´ç ÆÄÀÏÀÇ type¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

28. flock(int fp , int operation)

    ÇØ´ç ÆÄÀÏ Æ÷ÀÎÅÍ·ÎÀÇ Á¢±ÙÀ» Á¦¾îÇÒ ¼ö ÀÖ½À´Ï´Ù.

    ¿É¼Ç¿¡´Â 4°¡Áö°¡ Àִµ¥ 
                
      1. reader 
      2. writer  
      3. shared or exclusive 
      4. flock()
                  
    µîÀÌ ÀÖ½À´Ï´Ù.

   
29. fopen(string filename , string mode)

    ÇØ´ç ÆÄÀÏÀ» ¿­°Å³ª URLÀ» ¿±´Ï´Ù.

    ¿É¼Ç¿¡´Â 

        r - (Àб⸸ °¡´É)ÆÄÀÏ Æ÷ÀÎÅÍÀÇ ½ÃÀÛÀº ÆÄÀÏÀÇ ½ÃÀۺκР,  
        r+ - (Àбâ¿Í ¾²±â °¡´É)r°ú µ¿ÀÏ ,  
        w - (¾²±â¸¸ °¡´É)ÆÄÀÏ Æ÷ÀÎÅÍÀÇ ½ÃÀÛÀº ÆÄÀÏÀÇ ½ÃÀۺκÐÀÌ¸ç ±×¸®°í ÆÄÀÏÀ» Á¦·Î ±æÀÌ·Î ÀÚ¸£°í
             ÆÄÀÏÀÌ Á¸ÀçÇÏÁö ¾ÊÀ» ¶© ±×°ÍÀ» ¸¸µé·Á°í ½ÃµµÇÕ´Ï´Ù. 
        w+ -(Àбâ¿Í ¾²±â ±â´É) w¿Í µ¿ÀÏÇÕ´Ï´Ù.
        a - (¾²±â ±â´É)ÆÄÀÏ Æ÷ÀÎÅÍÀÇ Àå¼Ò´Â ÆÄÀÏÀÇ ³¡ºÎºÐÀ̸ç, ¸¸¾à ÆÄÀÏÀÌ Á¸Àç ÇÏÁö ¾ÊÀ¸¸é ¸¸µé·Á°í
             ½ÃµµÇÕ´Ï´Ù.
        a+ - (Àбâ¿Í ¾²±â) a¿Í µ¿ÀÏÇÕ´Ï´Ù.


30. fpassthru(int fp)

    ÆÄÀÏ Æ÷ÀÎÅÍ¿¡¼­ EOF¸¦ ÀÐ¾î µé¿©(³²¾Æ ÀÖ´Â ÀڷḦ Àоî) Ãâ·ÂÇÕ´Ï´Ù.

    À§¿¡¼­ test.txt ÆÄÀÏÀÇ ³»¿ëÀº "i love cry ~ ^^" ÀÔ´Ï´Ù.
    ¸ÕÀú fgetc( ) ÇÔ¼öÀÇ ¼öÇàÀ¸·Î "i" ¹®ÀÚ¸¦ Ãâ·Â ÇÏ°í ´ÙÀ½ ³ª¸ÓÁö ¹®ÀÚ¿­À» fpassthru( )
    ÇÔ¼ö¿¡ ÀÇÇØ Ãâ·Â ÇÕ´Ï´Ù.

 

31. fputs(int fp , string str , int [length])

    ÇØ´ç ÆÄÀÏ Æ÷ÀÎÅÍ¿¡ ¾²±â ±â´ÉÀ» ÇØÁÝ´Ï´Ù. ¿É¼ÇÀ¸·Î ¹®ÀÚ¿­À» Á¦¾îÇÕ´Ï´Ù.
    Length¸¸Å­ ¾µ ¼ö ÀÖ½À´Ï´Ù. ¾øÀ» °æ¿ì´Â »ó°ü ¾ø½À´Ï´Ù.

    À§ ¼Ò½º 5ÇàÀÇ fopen( ) ÇÔ¼ö¸¦ ÀÌ¿ëÇØ test.txt ÆÄÀÏÀÇ ³»¿ëÀ» "a+" ¸ðµå·Î ¿±´Ï´Ù.
    ÀÌ°ÍÀº Àбâ¿Í ¾²±â ¸ðµå ÀÌ¸ç ±ÛÀ» Ãß°¡ÇÒ °æ¿ì ¸¶Áö¸· ÆÄÀÏ Æ÷ÀÎÆ®¿¡¼­ Ãß°¡ ÇÕ´Ï´Ù.
    7ÇàÀÇ fputs( ) ÇÔ¼ö´Â 14byte¸¸Å­ ÀÔ·ÂµÈ ±ÛÀ» test.txt ÆÄÀÏ¿¡ Ãß°¡ ÇÕ´Ï´Ù.

 

32. fread(int fp , int length)

    ÆÄÀÏÀ» length byte ¸¸Å­ binary·Î ÀÐ¾î µéÀÔ´Ï´Ù.

    À§ ¼Ò½º 7ÇàÀ» º¸¸é fread( ) ÇÔ¼ö´Â test.txt ÆÄÀÏ ³»¿ë Áß 14byte¸¸Å­ ¹®ÀÚ¸¦ Àоî Ãâ·Â ÇÏ´Â °ÍÀ»
    º¼ ¼ö ÀÖ½À´Ï´Ù.

 

33. fseek(int fp , int offset)

    ÆÄÀÏ Æ÷ÀÎÅ͸¦ ¿Å±â°í ¸®ÅÏÇØ ÁÝ´Ï´Ù.

           

34. ftell(int fp)

    fp¸¦ ÂüÁ¶ÇØ ÆÄÀÏÆ÷ÀÎÅÍÀÇ À§Ä¡(ÀÐ°í ¾²´Â À§Ä¡)¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

    À§ ¼Ò½º¸¦ º¸¸é 7Çà¿¡¼­ fread( ) ÇÔ¼ö°¡ test.txt ÆÄÀÏÀÇ ³»¿ëÀ» 16byte¸¸Å­ Àоú½À´Ï´Ù.
    ±×¸®°í 14ÇàÀÇ ftell( ) ÇÔ¼ö·Î ÇöÀç ÆÄÀÏ Æ÷ÀÎÆ® À§Ä¡¸¦ º¸¸é "16" ÀÓÀ» ¾Ë ¼ö ÀÖ½À´Ï´Ù.
 

35. fwrite(int fp , string string , int [length])

    ÆÄÀÏÀ» binary·Î ¾²±â ±â´ÉÀ» ÇÕ´Ï´Ù. ¸¸¾à length ÀÎÀÚ°¡ ÁÖ¾îÁö¸é À̰͸¸Å­ ¾²°í ¾²±â¸¦ ¸ØÃä´Ï´Ù.

    À§ ¼Ò½º¿¡¼­ 5ÇàÀº test1.txt ÆÄÀÏÀ» "a" ¸ðµå·Î ½ÇÇà Çϸç 7ÇàÀº ÀÔ·ÂÇÑ ¹®ÀÚ¿­À» ÆÄÀÏ¿¡
    ÀúÀå ÇÕ´Ï´Ù. 9ÇàÀº ´Ù½Ã ÇØ´ç ÆÄÀÏÀÇ Àüü ³»¿ëÀ» Ãâ·Â ÇÕ´Ï´Ù.


36. set_file_buffer

    ÇØ´çÇÏ´Â ÆÄÀÏ Æ÷ÀÎÅÍ¿¡¼­ ÆÄÀÏÀÇ ¹öÆÛ¸µÀ» ÁöÁ¤ÇØ ÁÝ´Ï´Ù.

           
37. is_dir(string filename)

    ÇØ´çÇÏ´Â ÆÄÀÏ À̸§ÀÌ Á¸ÀçÇÏ°í µð·ºÅ丮ÀÎÁö ¿©ºÎ¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

    À§ °á°ú¿¡¼­ ÇØ´ç ÇÔ¼ö°¡ 11ÇàÀÇ Á¶°Ç¿¡ ÇØ´ç ÇϹǷΠ13ÇàÀÇ ±ÛÀ» Ãâ·ÂÇÕ´Ï´Ù.

  
38. is_executable(string filename)

    ÇØ´ç ÆÄÀÏ À̸§ÀÌ Á¸Àç ÇÏ°í, ½ÇÇà °¡´ÉÇÑ °ÍÀÎÁö¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

    8ÇàÀÇ º¯¼ö °ªÀÌ ÆÄÀÏÀÌ ¾Æ´Ï°í ½ÇÇà ÇÒ ¼ö ¾ø´Â µð·ºÅ丮À̱⠶§¹®¿¡ 18ÇàÀÇ °á°ú¸¦ Ãâ·ÂÇÕ´Ï´Ù.


39. is_file(string filename)

    ÇØ´ç ÆÄÀÏ À̸§ÀÌ Á¸ÀçÇÏ°í, ÀϹÝÀûÀÎ ÆÄÀÏÀÎÁö ¿©ºÎ¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

40. is_link(string filename)

    ÇØ´ç ÆÄÀÏ À̸§ÀÌ ½Éº¼¸¯ ¸µÅ©ÀÎÁö ¿©ºÎ¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.
    ¾Æ·¡ ¼Ò½º´Â 56¹ø ½Éº¼¸¯ »ý¼º ÇÔ¼ö¸¦ »ç¿ëÇؼ­ º¸¿´½À´Ï´Ù.

    ½Éº¼¸¯ ¸µÅ©ÀÇ °æ¿ì ¿øº» ÆÄÀÏÀ» ¸µÅ© ½ÃÄÑÁÖ´Â ¿ªÇÒÀ» ÇÕ´Ï´Ù.
    ÀÌ°ÍÀº »èÁ¦Çصµ ¹«¹æÇÑ ÆÄÀÏÀÌ¸ç ¸µÅ©¸¦ ÀÌ¿ëÇØ º¸´Ù ÆíÇÏ°Ô ÀÛ¾÷ÇÒ ¼ö ÀÖ½À´Ï´Ù. 
    À§ ½Éº¼¸¯ »ý¼º ÇÔ¼öÀÇ °æ¿ì ÇØ´ç µð·ºÅ丮ÀÇ ±ÇÇÑÀÌ ÀÖÀ» ¶§¸¸ »ý¼º °¡´ÉÇÕ´Ï´Ù.

 
42. is_readable(string filename)

    ÇØ´ç ÆÄÀÏ À̸§ÀÌ ÀÖ°í, ÀÌ°ÍÀÌ Àб⠰¡´ÉÇÑ ÆÄÀÏ ¶Ç´Â µð·ºÅ丮 ÀÎÁö ¿©ºÎ¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

    À§ ¼Ò½º¿¡¼­ 5ÇàÀÇ ¼öÇàÀ¸·Î 10Çà°ú 17ÇàÀÇ Á¶°ÇÀ» °Ë»ö ÇÕ´Ï´Ù.
    Áï is_readable( ) ÇÔ¼ö·Î Àü´Þ µÇ¾î¿Â ÆÄÀÏÀ̳ª µð·ºÅ丮°¡ Àб⠰¡´ÉÇÑÁö ¿©ºÎ¸¦ °Ë»ç ÇÏ°í ÇØ´ç Á¶°ÇÀÇ
    ±ÛÀ» Ãâ·Â ÇÕ´Ï´Ù.

 
43. is_writeable(string filename)

    ÇØ´ç ÆÄÀÏ À̸§ÀÌ ÀÖ°í, ÀÌ°ÍÀÌ ¾²±â °¡´ÉÇÑ ÆÄÀÏÀÎÁö ¿©ºÎ¸¦ ¸®ÅÏÇÕ´Ï´Ù.
    ¸¸¾à µð·ºÅ丮¿¡ ¾²±â¸¦ üũ ÇÏ·Á¸é ÆÄÀÏ À̸§ ÀÎÀÚ¿¡ µð·ºÅ丮¸íÀ» ÀûÀ¸¸é µË´Ï´Ù.

44. link(string target , string link)

    hard ¸µÅ©¸¦ ¸¸µé¾î ÁÝ´Ï´Ù.
    hard¸µÅ©ÀÇ °æ¿ì ½Éº¼¸¯ ¸µÅ©¿Í ´Þ¸® µð·ºÅ丮´Â ¸µÅ© ÇÒ ¼ö ¾øÀ¸¸ç ¿øº» µ¥ÀÌÅÍ¿Í ¸µÅ©´Â °°ÀÌ °øÁ¸ÇϹǷÎ
    ¸µÅ©¸¦ »èÁ¦ÇÏ¸é ¿øº»µµ »èÁ¦ µË´Ï´Ù.

    
45. linkinfo(string path)

    ÇØ´ç Æнº¿¡ ´ëÇÑ ¸µÅ© Á¤º¸¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

                  
46. mkdir(string pathname , int mode)

    Æнº À̸§¿¡ ÇØ´çÇÏ´Â µð·ºÅ丮¸¦ ¸ðµåÀÎÀÚ·Î ¸¸µé¾î ÁÝ´Ï´Ù.

                            
47. pclose(int fp)

    ÇØ´ç process ÆÄÀÏ Æ÷ÀÎÅ͸¦ ´Ý½À´Ï´Ù.

                                          
48. popen(string command , string mode)

    ÇØ´çÇÏ´Â process ÆÄÀÏ Æ÷ÀÎÅ͸¦ ¿­¾î ÁÝ´Ï´Ù.

                                                    
49. readfile(string filename)

    ÇØ´ç ÆÄÀÏÀ» ÀÐ¾î µé¿© Ãâ·ÂÇÕ´Ï´Ù.
    ¸¸¾à ÆÄÀÏ À̸§ ÀÎÀÚ°¡ http:// , ftp:// ÀÏ °æ¿ì ÇØ´ç ÇÏ´Â »çÀÌÆ®¿¡ Á¢¼ÓÇؼ­ ±× ÆÄÀÏ¿¡  Á¢±ÙÇÕ´Ï´Ù. 

                                                                     
50. readlink(string path)

    ½Éº¼¸¯ ¸µÅ©ÀÇ ³»¿ëÀ» ¹ÝȯÇØ ÁÝ´Ï´Ù.

                                                                                   
51. rename(string oldname , string newname)

    ÆÄÀÏ À̸§À» ¹Ù²Ù¾î ÁÝ´Ï´Ù.

                                                                                             
52. rewind(int fp)

    ÆÄÀÏ Æ÷ÀÎÅÍÀÇ À§Ä¡¸¦ ÆÄÀÏÀÇ Ã³À½ ºÎºÐÀ¸·Î Ç¥½ÃÇØ ÁÝ´Ï´Ù.

                                                                                                           
53. rmdir(string dirname)

    ÇØ´ç µð·ºÅ丮¸¦ Á¦°ÅÇÕ´Ï´Ù.

                                                                                                                     
54. stat(string filename)

    ÇØ´ç ÆÄÀÏÀÇ Åë°è¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù. ÀÌ Åë°è¿¡´Â ´ÙÀ½ÀÇ ³»¿ëµéÀÌ ÀÖ½À´Ï´Ù.
    device, inode, num of link, ¼ÒÀ¯ÀÚ, ±×·ì, device type if inode device *, size in byte,
    ¸¶Áö¸· ¾×¼¼½º ½Ã°£, ¸¶Áö¸· ±â·Ï ½Ã°£, ¸¶Áö¸· ¹Ù²ï ½Ã°£, blocksize for filesystem i/o *,
    num of blocks allocated

                                                                                                                                    
55. lstat(string filename)

    ÇØ´ç ÆÄÀÏÀ̳ª ½Éº¼¸¯ ¸µÅ©ÀÇ Åë°è¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.
    Åë°è´Â statÀÇ ³»¿ë°ú °°½À´Ï´Ù.(¹è¿­·Î ¸®ÅÏÇÕ´Ï´Ù.)

    À§ °á°ú´Â ¼Ò½º 11Çà for¹®¿¡ ÀÇÇØ ÀúÀåµÇ¾îÁø ¹è¿­ ÀÎÀÚ¸¦ Â÷·Ê·Î ¸®ÅÏÇÑ °á°úÀÔ´Ï´Ù.
    ÀÎÀÚÀÇ °æ¿ì 54¹øÀÇ ÀÎÀÚ ¼ø¼­ ÀÔ´Ï´Ù.


56. symlink(string target , string link)

    ÇØ´ç ¸µÅ©·Î ŸÄÏÀ» ½Éº¼¸¯ ¸µÅ©½ÃÄÑ ÁÝ´Ï´Ù.  (40¹ø Âü°í)

         
57. tempnam(string dir , string prefix)

    ÇØ´ç µð·ºÅ丮¿¡ À¯ÀÏÇÑ ÆÄÀÏ À̸§À» ¸¸µé¾î ÁÝ´Ï´Ù.
    ¸¸¾à µð·ºÅ丮°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù¸é, temporary µð·ºÅ丮¿¡ ÆÄÀÏÀ» »ý¼ºÇÕ´Ï´Ù.

                  
58. touch(string filename , int time)

    ÇØ´ç ÆÄÀÏÀÇ ¼öÁ¤ ½Ã°£À» ¼³Á¤ÇØ ÁÝ´Ï´Ù. time ÀÎÀÚ°¡ ¾øÀ» °æ¿ì ÇöÀç ½Ã°£À¸·Î ¼³Á¤ÇÕ´Ï´Ù.

    À§ °á°ú¿¡¼­ 8ÇàÀÇ time ÀÎÀÚ¸¦ ÁÖÁö ¾Ê¾Ò±â ¶§¹®¿¡ ÇöÀç ½Ã°£À¸·Î ¼öÁ¤Çؼ­ ¸®ÅÏÇÕ´Ï´Ù.

 
59. umask(int mask)

    ÇöÀçÀÇ umask·Î º¯°æÇÕ´Ï´Ù.

    
60. unlink(string filename)

    ÇØ´ç ÆÄÀÏÀ» Áö¿ó´Ï´Ù.

           

¿©±â±îÁö 60°³ÀÇ ÆÄÀÏ ½Ã½ºÅÛ ÇÔ¼ö¸¦ »ìÆì º¸¾Ò½À´Ï´Ù. ¿©±â¼­ ¸î °¡Áö¸¦ ¿¹·Î ´õ ¸¸µé¾î º¸¾Ò½À´Ï´Ù.
Áß¿äÇÑ°Ç ¿©·¯ºÐµéÀÌ ÀÌ ÇÔ¼öµéÀ» ¾îµð¿¡ »ç¿ë Çϴ°¡ ÇÏ´Â °ÍÀÔ´Ï´Ù.
¹°·Ð ÀÌ ÇÔ¼öµéÀÇ ¿ªÇÒÀÌ ¹ºÁö¸¦ ÆľÇÇÏ´Â °Íµµ Áß¿äÇÕ´Ï´Ù.

À§¿¡¼­ ÆÄÀÏÀ» ¿­ ¶§ chmod¸¦ ÀÐ°í ¾µ ¼ö ÀÖ´Â ±ÇÇÑ ÀÎÁö ¸ÕÀú È®ÀÎÇØ¾ß ÇÕ´Ï´Ù.
³ª¸ÓÁö ÇÔ¼öµéÀÇ »ç¿ë ºÎºÐÀº À§¿¡ ³ª¿­ÇÑ ÇÔ¼ö¿¡ °üÇÑ ¼³¸íµéÀ» º¸¸é ÀÌÇØ°¡ ºü¸¦ °ÍÀÔ´Ï´Ù.
À§¿¡¼­ fopen() ÇÔ¼öÀÇ °æ¿ì ºÒ·¯¿Ã ÆÄÀÏÀÇ ³»¿ëÀº Áö¿öÁö°í ´Ù½Ã ÀÔ·ÂÇÑ ³»¿ëÀÌ ÀúÀå µÇ¾î Áý´Ï´Ù.
fwrite() ÇÔ¼ö¸¦ ÀÌ¿ëÇؼ­ ÀÔ·ÂÇÑ ³»¿ëÀ» ¾²°í, ÆÄÀÏÀ» ´Ý½À´Ï´Ù. ±× ´ÙÀ½ ¿À´ÃÀÇ À̽´¸¦ Ãâ·ÂÇÕ´Ï´Ù. 
file() ÇÔ¼öÀÇ °æ¿ì´Â ÇØ´ç ÆÄÀÏÀÇ ³»¿ëÀ» ¹è¿­·Î ¸®ÅÏÇØ ÁÝ´Ï´Ù. À§ ¼Ò½ºÀÇ °æ¿ì Àß º¸½Ã¸é 0~3±îÁö ¹è¿­À»
Ãâ·ÂÇÏ°Ô²û Çß½À´Ï´Ù. ¹°·Ð ÀÔ·ÂÇϴ âµµ 4Çุ ÀÔ·Â °¡´ÉÇϵµ·Ï ¸¸µé¾ú½À´Ï´Ù.
ÀÌ°Í ¿ª½Ã ³ªÁß¿¡ ÀÌ ¼Ò½º¸¦ ¹ÙÅÁÀ¸·Î ȨÀÇ ¾Ë¸²ÆÇ µî¿¡ Àû¿ëÇÏ¸é ¼ö½Ã·Î º¯ÇÏ´Â Áß¿äÇÑ »çÇ×µéÀ» ½±°Ô ¿Ã¸± ¼ö
ÀÖ½À´Ï´Ù. ÀÌ °°ÀÌ °£´ÜÇÑ ³»¿ëÀº µ¥ÀÌÅͺ£À̽º ¿¬°áº¸´Ù ´õ °£°áÇÕ´Ï´Ù.
À§¿Í °°Àº ¹æ¹ýÀ¸·Î ÆÄÀÏ ½Ã½ºÅÛ ÇÔ¼öµéÀ» Çѹø¾¿ Å×½ºÆ®ÇÏ´Â ¹æ¹ý ¶ÇÇÑ »©¸ÔÁö ¸»¾Æ¾ß µË´Ï´Ù.
Áß¿äÇÑ°Ç Çѹø Á÷Á¢ ¸¸µé¾î º¸´Â °ÍÀÔ´Ï´Ù.

Áö±Ý±îÁö ÀÛ¼ºµÈ ¼Ò½º´Â óÀ½ test.php·Î ¸¸µé¾îÁ³±â ¶§¹®¿¡ Æû ºÎºÐ¿¡ ÆÄÀϸíÀ» ¹Ù²ã  Áà¾ß µË´Ï´Ù.
(Áö±ÝÀÇ ÆÄÀÏ·Î) ´Ù¸¥ ¹æ¹ýÀº ÆÄÀϸíÀ» $PHP_SELF·Î ¹Ù²ã ÁÖ´Â °ÍÀÔ´Ï´Ù.

±×·³ °á°ú¸¦ È®ÀÎÇØ º¸°Ú½À´Ï´Ù.

MYSQL ÇÔ¼ö

¿©±â¿¡ ¼Ò°³ÇÏ´Â ÇÔ¼ö´Â PHP¿¡¼­ mysql ¼­¹ö¿¡ Á¢¼ÓÇؼ­ ÀÛ¾÷ÇÒ ¼ö ÀÖ´Â ÇÔ¼öµéÀÔ´Ï´Ù.    ±×·¡¼­ ¿©±â ³ª¿­ÇÑ ÇÔ¼ö´Â mysqlÀÇ ¸í·É¾î¿Í À¯»çÇÕ´Ï´Ù.    º¸´Ù ÀÚ¼¼ÇÑ ³»¿ëÀº http://www.mysql.com ¿¡¼­ ¾òÀ» ¼ö ÀÖ½À´Ï´Ù.    ¿©±â¼­ Âü°í ¿¹Á¦¸¦ À§ÇØ test µ¥ÀÌÅͺ£À̽º¿¡ test Å×À̺íÀ» ¸¸µì´Ï´Ù.    ÀÌ Å×ÀÌºí¿¡´Â Çʵå (content¿Í tel) µÎ°¡Áö¸¦ ´ÙÀ½Ã³·³ ¸¸µì´Ï´Ù.

±× ´ÙÀ½ µ¥ÀÌÅ͸¦ Ãß°¡ÇÕ´Ï´Ù.    ¹æ¹ýÀº ¿©·¯ °¡Áö°¡ ÀÖÁö¸¸ ¿©±â¼­´Â ÆÄÀÏÀ» »ý¼ºÇؼ­ ÇØ´ç Å×À̺í(test)¿¡ ³Öµµ·Ï ÇÏ°Ú½À´Ï´Ù.    ÆÄÀÏÀÇ °¢ Çʵå´Â ±¸ºÐÀº tab Å°·Î ±¸ºÐ ÇÕ´Ï´Ù.

#cat > test.txt

ÀÌÈ«ÀÏ 21447483647 ¹Úº´ÁØ 124234234 °­È£°æ 21447483647 ±èÁÖ¹Ì 21447483647

À§¿Í °°ÀÌ test.txt ÆÄÀÏÀ» »ý¼º Çß´Ù¸é ÀÌÁ¦ test µ¥ÀÌÅÍ º£À̽ºÀÇ test Å×ÀÌºí¿¡ ÆÄÀÏ ³»¿ëÀ» ¾Æ·¡¿Í °°ÀÌ ÀÔ·Â ÇÕ´Ï´Ù. Mysql>load data local infile "test.txt" into table test ; ±×·³ test Å×ÀÌºí¿¡ Ãß°¡ÇÑ 4°¡Áö Ç׸ñÀ» È®ÀÎÇغ¾´Ï´Ù.

ÀÌÁ¦ ÀÌ·¸°Ô µ¥ÀÌÅ͸¦ ÀÔ·ÂÇÑ »óÅ¿¡¼­ PHP¿¡¼­ Á¢±Ù °¡´ÉÇÑ ÇÔ¼ö¸¦ »ìÆ캸°Ú½À´Ï´Ù.

1. mysql_affected_rows (int [int link_identifier])

    ÃÖ±Ù ÁúÀÇ¿¡ °üÇÑ rowÀÇ ¼ö¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

    À§ ¼Ò½º¿¡¼­ ¸ÕÀú mysql¿¡ Á¢¼ÓÀº mysql_connect ÇÔ¼ö¸¦ »ç¿ë Çß°í, µ¥ÀÌÅͺ£À̽º ¼±ÅÃÀº mysql_select_db
    ÇÔ¼ö¸¦ »ç¿ë Çß½À´Ï´Ù. 

    ´ÙÀ½ mysql_query ÇÔ¼ö¸¦ ÀÌ¿ëÇؼ­ sql ÁúÀǸ¦ Çß°í, ³ª¸ÓÁö mysql_affected_rows¿Í mysql_num_rows ÇÔ¼öÀÇ
    °ªÀ» ±¸Çß½À´Ï´Ù. 

    À§ ¼Ò½º ºÎºÐµéÀº ÀϹÝÀûÀÌ°íµµ ¾ÆÁÖ ½¬¿î ¹®ÀåµéÀ̱⠶§¹®¿¡ ±Ý¹æ ÀÌÇØ µÇ¸®¶ó »ý°¢ÇÕ´Ï´Ù.

    À§¿¡¼­ rowÀÇ ¼ö°¡ Á¤È®ÇÏ°Ô 4°³ ³ª¿À´Â °ÍÀ» È®ÀÎ ÇÒ ¼ö ÀÖ½À´Ï´Ù.


2. mysql_close(int [link_identifier])

    mysql Á¢¼ÓÀ» ²÷½À´Ï´Ù.

                          
3. mysql_connect(string [hostname [:port] [:/path/to/socket] ] , string [username] , string [password] )

    ÀÎÀÚÀÇ »ç¿ëÀº À§ ³ª¿­µÈ ±×´ë·Î ÀÔ·ÂÇÏ¸é µÇ°í Â÷·Ê·Î È£½ºÆ®¸í, À¯Àú À̸§, Æнº¿öµå¸¦ ÀÔ·ÂÇÏ¸é µË´Ï´Ù.


4. mysql_create_db(string database name , int [link_identifier])

    mysql database¸¦ ¸¸µé¾î ÁÝ´Ï´Ù. 

                                                      
5. mysql_data_seek(int result_identifier, int row_num)

    ù¹ø° ÀÎÀÚÀÇ °á°ú¿¡¼­ row_numÀ¸·Î À̵¿ÇÕ´Ï´Ù.
        Áï mysql µ¥ÀÌÅͺ£À̽º¸¦ °Ë»öÇÑ °á°ú Áß row_numÀÎÀÚ¿¡ ÇØ´çÇÏ´Â Æ÷ÀÎÅÍ·Î À̵¿ÇÕ´Ï´Ù.

                                                                           
6. mysql_db_query(string database , string query , int[link_identifier])

    mysql query¸¦ ¼öÇàÇÕ´Ï´Ù.  string database ºÎºÐÀº µ¥ÀÌÅͺ£À̽º ¸íÀ» Àû¾î ÁÝ´Ï´Ù.
    ´ÙÀ½ query ÀÎÀÚ´Â µ¥ÀÌÅͺ£À̽ºÀÇ °Ë»ö ¸í·É¾î¸¦ »ç¿ëÇÕ´Ï´Ù. 
    ³ª¸ÓÁö ÀÎÀÚÀÇ °æ¿ì´Â µ¥ÀÌÅͺ£À̽º¿¡ Á¢¼ÓÇÏ´Â ¸í·ÉÀ» »ç¿ëÇÕ´Ï´Ù.
    ´ëºÎºÐ µÎ ¹ø° ¼¼ ¹ø° ÀÎÀÚ´Â º¯¼ö¸¦ ¸¸µé¾î »ç¿ëÇÕ´Ï´Ù.   

                                                                                                          
7. mysql_drop_db(string database_name , int[link_identifier])

    µ¥ÀÌÅͺ£À̽ºÀÇ ÇØ´ç µ¥ÀÌÅͺ£À̽º¸¦ Á¦°ÅÇÕ´Ï´Ù.
    Mysql¿¡ Á÷Á¢ Á¢¼ÓÇؼ­ Çغ¸½Å ºÐÀº ´Ù ¾Æ½Ã°ÚÁö¸¸ ¿©±â ³ª¿­µÇ´Â ¸ðµç ÇÔ¼ö´Â µ¥ÀÌÅͺ£À̽ºÀÇ ´ëÈ­½Ä
    ¸ðµå¿¡¼­ ÇÏ´Â ¸í·É¾î¶û °°´Ù°í »ý°¢ÇÏ¸é µË´Ï´Ù. Php¿¡¼­ mysqlÀÇ ¸í·É¾îµéÀ» Áö¿ø ÇÏ´Â °ÍÀÔ´Ï´Ù. 
    ù¹ø° ÀÎÀÚ´Â Áö¿ï µ¥ÀÌÅͺ£À̽ºÀÇ À̸§À» ±×¸®°í µÎ¹ø° ÀÎÀÚ´Â ¿¬°á ¸ðµå¸¦ Àû½À´Ï´Ù.


8. mysql_errno(int [link_identifier])

    ÀÌÀü¿¡ mysql ½ÇÇà½Ã ¹ß»ýÇÑ ¿¡·¯¹øÈ£¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

                                                                                                                                                   
9. mysql_error(int [link_identifier])

    ÀÌÀü¿¡ mysql ½ÇÇà½Ã ¹ß»ýÇÑ ¿¡·¯ ¸Þ½ÃÁö¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

                                                                                                                                                             
10. mysql_fetch_array(int result , int [result_type] )

    ÀÎÀÚ¿¡ ´ëÇØ ÇÑ ÁÙ¾¿ Á¤·Ä ¼öÁýµÈ ÀڷḦ ¹è¿­·Î ¸®ÅÏÇØ ÁÝ´Ï´Ù.
    ÀÌ ÇÔ¼öÀÇ °æ¿ì´Â °Ô½ÃÆÇ µîÀÇ »ç¿ë ½Ã¿¡ ÀÚÁÖ »ç¿ëµÇ´Â ÇÔ¼öÀÔ´Ï´Ù.
    ´ëºÐÀÇ ÇÔ¼öµµ ¸¶Âù°¡ÁöÁö¸¸ ÀÚÁÖ »ç¿ëµË´Ï´Ù.

    À§ ¼Ò½º¸¦ º¸¸é º¯¼ö $rows¸¦ ÀÌ¿ëÇØ for ·çÇÁ¸¦ ½ÇÇàÇÕ´Ï´Ù.
    For¹® ¾È¿¡mysql_fetch_array ÇÔ¼ö¸¦ »ç¿ëÇØ ÇØ´ç Å×À̺íÀÇ ÇÑ ÇàÀ» ¹è¿­·Î ¸¸µé¾î ÁÝ´Ï´Ù. 
    ±×¸®°í ·çÇÁ°¡ rows ¼ö ¸¸Å­ ¹Ýº¹ µÉ ¶§¸¶´Ù Å×À̺íÀÇ ³»¿ëÀ» Ãâ·ÂÇÕ´Ï´Ù.

11. mysql_fetch_field(int result , int [field_offset])

    ÇØ´ç ÇʵåÀÇ Á¤º¸¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

    µÎ ¹ø° ÀÎÀÚÀÇ ¿É¼Ç¿¡´Â 

        name - column name
        table - column ÀÌ ¼Ò¼ÓµÈ Å×À̺í name
        max_length - column ÀÇ ÃÖ´ë ±æÀÌ
        not_null - ¸¸¾à columnÀÌ null·Î ¾ÈµÇ¸é 1
        primary_key - ¸¸¾à columnÀÌ primary key¸é 1
        unique_key - ¸¸¾à columnÀÌ unique key¸é 1
        multiple_key - ¸¸¾à columnÀÌ non-unique key¸é 1
        numeric - ¸¸¾à columnÀÌ numeric¸é 1
        blob - columnÀÌ blobÇüÀ̸é 1
        type - columnÀÇ type
        zerofill - ¸¸¾à columnÀÌ zero-filled¸é 1


12. mysql_fetch_lengths(int result)

    ¸¶Áö¸·À¸·Î ÇÑ ÁÙ¾¿ Á¤·ÄµÈ °¢°¢ÀÇ Çʵå Å©±â¸¦ ¹è¿­·Î ¸®ÅÏÇØ ÁÝ´Ï´Ù.

                                                                                           
13. mysql_fetch_object(int result , int [result_type])

    ÇÑ ÁÙ¾¿ Á¤·ÄµÈ ÀڷḦ °´Ã¼·Î ¸®ÅÏÇØ ÁÝ´Ï´Ù.

                                                                                                     
14. mysql_fetch_row(int result)

    ÇÑ ÁÙ¾¿ Á¤·ÄµÈ ÀڷḦ ¹è¿­·Î ¸®ÅÏÇØ ÁÝ´Ï´Ù.

                                                                                                                   
15. mysql_field_name(int result , int fild_index)

    ƯÁ¤ ÇʵåÀÇ À̸§À» ¸®ÅÏÇØ ÁÝ´Ï´Ù.  Áï, µÎ ¹ø° ÀÎÀÚÀÇ °ª¿¡ ÇØ´çÇÏ´Â ÇʵåÀ̸§À» ¸®ÅÏÇÕ´Ï´Ù.

                                                                                                                                    
16. mysql_field_seek(int result , int field_offset)

    ƯÁ¤ ÇʵåÀÇ offsetÀ» ¼³Á¤ÇÕ´Ï´Ù.

                                                                                                                                                  
17. mysql_field_table(int result , int field_offset)

    result¿¡¼­ µÎ ¹ø° ÀÎÀÚ¿¡ ÇØ´çÇÏ´Â Çʵ尡 ÀÖ´Â Å×À̺íÀÇ À̸§À» ¸®ÅÏÇØ ÁÝ´Ï´Ù.


18. mysql_field_type(int result , int field_offset)

    result¿¡¼­ µÎ ¹ø° ÀÎÀÚ¿¡ ÇØ´çÇÏ´Â ÇʵåÀÇ Å¸ÀÔÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

                                                                                                                                                                          
19. mysql_field_flags(int result , int field_offset)

    result¿¡¼­ µÎ ¹ø° ÀÎÀÚ¿¡ ÇØ´çÇÏ´Â ÇʵåÀÇ flags¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

                                                                                                                                                                                    
20. mysql_field_len(int result, int field_offset)

   ƯÁ¤ÇÑ ÇʵåÀÇ ±æÀ̸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù, ¹°·Ð result¿¡¼­ µÎ ¹ø° ÀÎÀÚ¿¡ ÇØ´çÇÏ´Â ÇʵåÀÇ ±æÀ̸¦ ¸®ÅÏÇÕ´Ï´Ù.

                                                                                                                                                                                                  
21. mysql_free_result(int result)

    result¿¡ ÇØ´çÇÏ´Â ½ºÅ©¸³Å͸¦ ½ÇÇàÇÏ¸é »ý±â´Â ¸Þ¸ð¸® Á¡À¯¸¦ ÀÌ ÇÔ¼ö¸¦ »ç¿ëÇÔÀ¸·Î½á ½ÇÇàÇÑ ´ÙÀ½ Á¦°ÅÇØ ÁÝ´Ï´Ù.


22. mysql_insert_id(int [link_identifier] )

    ÃÖ±ÙÀÇ insert¹®À» ½ÇÇàÇÏ°í ³­ µÚ ¹ß»ýÇÑ id¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù

                                                                                                                                                                                                                          
23. mysql_list_fields(string database_name, string table_name, int [link_identifier] )

    mysql result field µéÀ» ³ª¿­ÇØ ÁÝ´Ï´Ù.
    ÁÖ¾îÁø µ¥ÀÌÅͺ£À̽º¿Í Å×À̺í À̸§ÀÇ Á¤º¸·Î °Ë»öÇÕ´Ï´Ù.

                                                                                                                                                                                                                                            
24. mysql_list_dbs(int [link_identifier] )

    mysql serverÀÇ databaseµéÀ» ³ª¿­ÇØ ÁÝ´Ï´Ù.


25. mysql_list_tables(string database, int [link_identifier] )

    mysql databaseÀÇ Å×À̺íµéÀ» ³ª¿­ÇØ ÁÝ´Ï´Ù.
                 

26. mysql_num_fields(int result)

    resultÀÇ ÇÊµå ¼ö¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.
                 

27. mysql_num_rows(int result)

    result¿¡¼­ row ¼ö¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.


28. mysql_pconnect(string [hostname [:port] [:/path/to/socket] ] , string [username] , string [password] )

    mysql server¿¡ Áö¼ÓÀûÀ¸·Î ¿¬°áÇØÁÖ´Â ÇÔ¼öÀÔ´Ï´Ù.
    ÀÎÀÚÀÇ °æ¿ì´Â Â÷·Ê·Î È£½ºÆ®¸í, »ç¿ëÀÚ¸í, Æнº¿öµåÀÔ´Ï´Ù.


29. mysql_query(string query, int [link_identifier] )

    mysql server¿¡ ÁúÀǸ¦ Àü¼ÛÇØ ÁÝ´Ï´Ù.
    ÀÌ ÇÔ¼ö¸¦ ÀÌ¿ëÇؼ­ ´ëºÎºÐÀÇ mysql °Ë»öÀ»ÇÕ´Ï´Ù.
    ù¹ø° ÀÎÀÚ´Â mysqlÀÇ ÁúÀǵéÀ» Àû¾îÁÖ¸ç, µÎ ¹ø° ÀÎÀÚ´Â Á¢¼Ó º¯¼ö¸¦ Àû¾îÁÝ´Ï´Ù.


30. mysql_result(int result, int row, mixed [field] )

    result µ¥ÀÌÅ͸¦ ±¸Çؼ­ ¸®ÅÏÇØ ÁÝ´Ï´Ù.


31. mysql_select_db(string database_name, int [link_identifier] )
        
    mysql database¸¦ ¼±ÅÃÇÏ´Â ÇÔ¼ö ÀÔ´Ï´Ù.
    ²À ÇѹøÀº »ç¿ëÇÒ ÇÔ¼öÀ̸ç, Â÷·Ê·Î database À̸§, ±×¸®°í Á¢¼Ó º¯¼ö µîÀ» ³ª¿­ÇÕ´Ï´Ù.

32. mysql_tablename(int result, int i)

    ÇØ´ç ÇʵåÀÇ Å×À̺í À̸§À» ¸®ÅÏÇØ ÁÝ´Ï´Ù.


À§ ÇÔ¼öµéÀÇ ½ÇÁ¦ °á°ú °ªµéÀÌ ¾î¶»°Ô Ç¥ÇöµÇ´ÂÁö ¿©·¯ ÇÔ¼ö¸¦ »ç¿ëÇÑ ¿¹¸¦ º¸µµ·Ï ÇÏ°Ú½À´Ï´Ù.

À§ ¼Ò½º¸¦ º¸¸é 16Çà ~ 20ÇàÀÇ °æ¿ì °¢°¢ ÇʵåÀÇ À̸§, ŸÀÔ, ±æÀÌ, flag, Å×À̺í¸íÀ» ³ªÅ¸³» ÁÖ´Â ÇÔ¼öµé ÀÔ´Ï´Ù.
±×¸®°í ÀÌÀü ¿¹Á¦¿Í´Â ´Þ¸® Å×À̺íÀÇ µ¥ÀÌÅ͵éÀ» Ãâ·Â ÇÒ ¶§mysql_fetch_object ÇÔ¼ö¸¦ »ç¿ëÇؼ­ Ãâ·ÂÇØ ºÃ½À´Ï´Ù. 
ºÒÇÊ¿äÇÑ html ű׵éÀº »ç¿ëÇÏÁö ¾Ê¾Ò±â ¶§¹®¿¡ ¿¹Á¦ÀÇ °á°ú´Â Á¶±Ý ÃʶóÇÒÁö ¸ð¸£Áö¸¸ °£´ÜÈ÷ ½ºÅ©¸³Æ®ÀÇ ÇüÅ¿¡
html ű׸¦ »ç¿ëÇÏ¸é ´õ È¥¶õÀ» ÁÙ °Í °°¾Æ ¿¹Á¦¿¡´Â »ç¿ëÇÏÁö ¾Ê¾Ò½À´Ï´Ù.

object¸¦ »ç¿ëÇÑ °á°ú ¿ª½Ã array¸¦ »ç¿ëÇÑ °Í°ú °°Àº °á°úÀÓÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.
±×¸®°í ÇØ´ç Çʵå(1¹ø)ÀÇ Á¤º¸µéÀ» º¼ ¼ö ÀÖ½À´Ï´Ù. 
À§ÀÇ field_len : 20Àº int(20)ÀÇ ¼ýÀÚÀÔ´Ï´Ù.

 

Âü°í·Î mysql_fetch_array ÇÔ¼ö¿Í mysql_fetch_row ÇÔ¼ö´Â ÇÑ°¡Áö ´Ù¸¥ Á¡ÀÌ Àִµ¥ ÈÄÀÚÀÇ °æ¿ì ÇʵåÀÇ
À̸§À» ÁÙ ¶§ [0]À¸·Î »ç¿ëÇÏ´Â ¹Ý¸é ÀüÀÚ´Â [content]·Î ÇØ´ç Çʵå À̸§À» Á÷Á¢ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
À§ ÇÔ¼öµéÀÇ »ç¿ëÀº µ¥ÀÌÅÍÀÇ ¸¹°í ÀûÀ½¿¡ µû¶ó °¢°¢ÀÇ ¼öÇà ¼Óµµ°¡ ´Þ¶óÁý´Ï´Ù.
´Ù½Ã »ý°¢ÇØ º¸¸é µ¥ÀÌÅÍ°¡ ¸¹À» °æ¿ì ¹è¿­·Î ¸®ÅÏÇÏ¸é ´õ ¼Óµµ°¡ ºü¸¦ °ÍÀÔ´Ï´Ù.
°´Ã¼·Î ¸®ÅÏÇÒ ¼öµµ ÀÖ°ÚÁö¿ä. ÇÏÁö¸¸ °£´ÜÇÑ ³»¿ëÀÇ °æ¿ì ¹è¿­·Î ¸®ÅÏÇÏ´øÁö ÇÑ ÁÙÀ» ±×³É ¸®ÅÏ ÇÏ´øÁö
¼ÓµµÀÇ Â÷ÀÌ´Â ¾øÀ» °ÍÀÔ´Ï´Ù. 
±×·¯¹Ç·Î À§ ÇÔ¼öµéÀ» »ç¿ëÇÒ ¶§´Â Ç×»ó ¸¹Àº µ¥ÀÌÅÍÀÇ °Ë»öÀ» »ý°¢ÇÏ°í »ç¿ëÇϱ⠹ٶø´Ï´Ù.

  

±×·³ ÇØ´ç mysqlÁö¿ø ÇÔ¼öµé Áß ¸î °¡Áö ¿¹¸¦ ´õ º¸¿© µå¸®°Ú½À´Ï´Ù.

À§ ¼Ò½º¸¦ º¸¸é for·çÇÁ ¾È¿¡ mysql_result ÇÔ¼ö¸¦ »ç¿ëÇؼ­ µ¥ÀÌÅÍ ³»¿ëÀ» °è¼Ó Ãâ·ÂÇØ ÁÖ´Â °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.
¸¸¾à ¿©±â¼­ ƯÁ¤ µ¥ÀÌÅ͸¦ Ãâ·ÂÇÏ·Á¸é mysql_data_seek ÇÔ¼ö¸¦ »ç¿ëÇؼ­ Ãâ·ÂÇØ º¼ ¼öµµ ÀÖ½À´Ï´Ù.
ÇÏÁö¸¸ mysql_query ¹®À» ÀÌ¿ëÇÑ ÁúÀǸ¦ ÀÌ¿ëÇÏ´Â ¹æ¹ýÀÌ ´õ È¿À²ÀûÀÌ¸ç ºü¸¦ ¼öµµ ÀÖ½À´Ï´Ù.


À§ ¼Ò½º¿Í ±×Àü ¼Ò½ºµéÀ» ºñ±³Çϸ鼭 °¢°¢ÀÇ ÇÔ¼öµéÀÇ Æ¯Â¡À» Á"ËÇϱ⠹ٶø´Ï´Ù.

°á°ú ¿ª½Ã ÀÌÀü ¼Ò½ºµé°ú ¸¶Âù°¡Áö ÀÓÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù. ±×¸®°í ´Ù¸¥ ÇÔ¼ö·Î °°Àº °á°ú¹°À» ¸¸µé ¼ö ÀÖ½À´Ï´Ù.
À§¿¡¼­ ¸» ÇÑ´ë·Î °¢°¢ÀÇ ÇÔ¼ö »ç¿ëÀº µ¥ÀÌÅÍÀÇ ¾ç¿¡ µû¶ó Á¶±Ý¾¿ ¼Óµµ Â÷°¡ ÀÖÀ» ¼ö ÀÖÀ¸¹Ç·Î °Å±â¿¡ ¸Â´Â ÇÔ¼ö¸¦
»ç¿ëÇÏ¸é µË´Ï´Ù.

URL ÇÔ¼ö

1. base64_decode(string encoded_data)

    base64·Î encodedµÈ ¹®ÀÚ¿­À» Çؼ®ÇÏ°í ¿ø·¡ µ¥ÀÌÅ͸¦ ¸®ÅÏÇÕ´Ï´Ù.


2. base64_encode(string data)

    ÇØ´ç µ¥ÀÌÅ͸¦ base64¹æ½ÄÀ¸·Î ÀÎÄÚµùÇÕ´Ï´Ù. °ü·Ã ÇÔ¼ö·Î´Â chunk_split( )°¡ ÀÖ½À´Ï´Ù.

    À§ base64 ÇÔ¼ö´Â ÇØ´ç µ¥ÀÌÅÍÀÇ MINE ŸÀÔÀ» Áö¿øÇÏ´Â ¿ªÇÒ¿¡ »ç¿ëÇÕ´Ï´Ù.

                
3. parse_url(string url)

    ÇØ´çÇÏ´Â URLÀ» ¹è¿­·Î ÀúÀåÇØ ÁÝ´Ï´Ù.
    ¹è¿­ ÀúÀå¿¡ Æ÷ÇÔ µÇ´Â ºÎºÐÀº scheme, host, port, user, pass, path, query, fragment µîÀÌ ÀÖ½À´Ï´Ù.

                    
4. urldecode(string str)

    %¿Í ##µîÀ¸·Î ÀÎÄÚµùµÈ URLÀ»(str) ¿ø »óÅÂÀÇ URL·Î ¸®ÅÏÇØ ÁÝ´Ï´Ù.

                                     
5. urlencode(string str)

    ÇØ´ç ¹®ÀÚ¿­À» URL ÀÎÄÚµù ¹æ½ÄÀ¸·Î ¹Ù²ã ¸®ÅÏÇØ ÁÝ´Ï´Ù.


´ÙÀ½ ¼³¸íÇÒ ¿¹Á¦ÀÇ °æ¿ì Url ÇÔ¼ö »ç¿ëÀÇ ¿¹¸¦ º¸¿©ÁÖ±â À§ÇØ array ÇÔ¼öµéÀ» »ç¿ëÇß½À´Ï´Ù. 
¸¸¾à ÀÌÇØ°¡ ¾ÈµÇ¸é Array ÇÔ¼ö¸¦ ÂüÁ¶ Çϼ¼¿ä.

À§ ¼Ò½º´Â parse_url( ) ÇÔ¼ö¸¦ ÀÌ¿ëÇØ ÇØ´ç URLÀÇ scheme, host, user, port, pass, path, query, fragment
µîÀ» ¸®ÅÏÇÕ´Ï´Ù.   ¿©±â¼­ °¢°¢ÀÇ KEY°ªÀº °á°ú¸¦ º¸¸é¼­ È®ÀÎÇϱ⠹ٶø´Ï´Ù. È­¸éÀ¸·ÎÀÇ Ãâ·ÂÀº array ÇÔ¼ö¸¦
»ç¿ëÇß°í, array_keys( )´Â ÇØ´ç ¹è¿­ÀÇ key °ªÀ» ¸®ÅÏÇϸç, array_values( )´Â ÇØ´ç ¹è¿­ÀÇ °ªÀ» ¸®ÅÏÇÕ´Ï´Ù.
¿ª½Ã for¹®À» »ç¿ëÇؼ­ °¢ ¹è¿­¸¸Å­¸¸ Ãâ·ÂµÇ°Ô Çß½À´Ï´Ù. Sizeof( ) ÇÔ¼ö´Â ÇØ´ç ¹è¿­ÀÇ ¼ö¸¦ ¸®ÅÏÇÕ´Ï´Ù. 

Urlencode¿Í Urldecode´Â ½ºÅ©¸³Æ®ÀÇ Á¶ÀÛÀ¸·Î ÀÎÇÑ ¿¡·¯¸¦ ¸·±â À§ÇØ »ç¿ëµÇ±âµµ ÇÏ¸ç ¿©·¯ °¡Áö ÀÀ¿ëÇؼ­
»ç¿ë °¡´ÉÇÑ Url ÇÔ¼öÀÔ´Ï´Ù.

ÇØ´ç ¹®ÀÚ¿­ÀÇ ÀÎÄÚµùÀº % ¿Í µÎÀÚ¸® Çí»ç ÄÚµå·Î ÀÌ·ç¾î Áý´Ï´Ù. ÀÌ°ÍÀº ¶ÇÇÑ ¾ËÆĺªÀÌ ¾Æ´Ñ ¹®ÀÚ¿¡ ÇÑÇØ
ÀÌ·ç¾î Áý´Ï´Ù.

ARRAY ÇÔ¼ö

1. array(...)
        
    ¹è¿­À» ¸¸µé¾î ÁÝ´Ï´Ù. Php ±âÃÊ ºÎºÐ¿¡¼­ ÀÌ ÇÔ¼ö¸¦ »ç¿ëÇÏ´Â ¹æ¹ýÀ» º¸¾Ò½À´Ï´Ù.

    À§ ¼Ò½º´Â array( ) ÇÔ¼ö¸¦ ÀÌ¿ëÇÑ 2Â÷¿ø ¹è¿­ ÇüÅÂÀÔ´Ï´Ù.
    ¹è¿­Àº ¿©·¯ Â÷¿øÀ¸·Î ±¸¼ºÇÒ ¼ö Àֱ⠶§¹®¿¡ ¾ÆÁÖ ¿ä±äÇÏ°Ô »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. 
    °Ô½ÃÆÇ ·çÆ® ±â´É Áß °Ô½ÃµÈ ±ÛÀ» ¼±ÅÃÇؼ­ ¿øÇÏ´Â ±Û¸¸ »èÁ¦ÇÒ ¶§ ÀÌ ¹æ¹ýÀÌ »ç¿ë µË´Ï´Ù.
    ( array( ) ÇÔ¼ö´Â PHP ±âº» ¹®¹ý ÀåÀ» Âü°í Çϼ¼¿ä)

2. array_count_values(array input)

    ¹è¿­ÀÇ Àüü ¼ö¸¦ ±¸ÇØ ÁÝ´Ï´Ù. php 4.0¿¡¼­ Ãß°¡ µÇ¾ú½À´Ï´Ù.

3. array_flip(array trans)

    ¹è¿­ÀÇ °ª ¸ðµÎ¿¡ Çø³À»ÇÕ´Ï´Ù. Php 4.0¿¡ Ãß°¡ µÇ¾ú½À´Ï´Ù.

     
4. array_keys(array input, mixed [search_value])

    ¹è¿­ÀÇ ¸ðµç Å° °ªÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù.
    °ü·Ã ÇÔ¼ö·Î´Â array_values() ÀÔ´Ï´Ù.

5. array_merge(array array1, array array2, [ ...] )

    µÎ°³ ¶Ç´Â ±× ÀÌ»óÀÇ ¹è¿­À» Çϳª·Î ÇÕÃÄÁÝ´Ï´Ù. Php 4.0¿¡ Ãß°¡ µÇ¾ú½À´Ï´Ù.

    À§ °á°ú¿¡¼­ ¼Ò½º 10ÇàÀÇ $cnt ¹è¿­ÀÌ $a , $b¸¦ º´ÇÕÇÑ °ÍÀÓÀ» ¾Ë ¼ö ÀÖ½À´Ï´Ù.

 
6. array_pad(array input, int pad_size, mixed pad_value)

    ù¹ø° ÀÎÀÚ(¹è¿­)¸¦ Ãß°¡Çϸ鼭 µÎ ¹ø° ÀÎÀÚ Å©±â¸¸Å­ ¹è¿­À» ¸¸µì´Ï´Ù.
    ¸¸¾à, µÎ ¹ø° ÀÎÀÚ Å©±â ¸¸Å­ ¾ÈµÉ °æ¿ì ¼¼ ¹ø° ÀÎÀÚ¸¦ ä¿ö ³Ö½À´Ï´Ù.

                 
7. array_pop(array array)

    ÇØ´ç ¹è¿­ÀÇ ¸¶Áö¸· ¿ø¼Ò¸¦ ¸®ÅÏÇÏ°í ±× ¿ø¼Ò¸¦ Á¦°ÅÇÕ´Ï´Ù. Php 4.0¿¡ Ãß°¡µÇ¾ú½À´Ï´Ù.

    À§ °á°ú´Â ¼Ò½º 13ÇàÀÇ ÇØ´ç ¹è¿­ÀÇ ¸¶Áö¸· ¿ø¼Ò¸¦ »èÁ¦ÇÏ´Â ºÎºÐ¿¡ ÀÇÇØ 22ÇàÀÌ Ãâ·ÂµÇÁö ¾Ê½À´Ï´Ù.

 
8. array_push(array array, mixed var, [...])

    ÇØ´ç ¹è¿­¿¡ Çϳª ¶Ç´Â ±× ÀÌ»óÀÇ ¿ø¼Ò¸¦ Ãß°¡ÇÕ´Ï´Ù. Php 4.0¿¡ Ãß°¡ µÇ¾ú½À´Ï´Ù.

9. array_reverse(array array)

    ÇØ´ç ¹è¿­À» ÇϳªÀÇ ¹è¿­·Î ¸®ÅÏÇØ ÁÝ´Ï´Ù. Php 4.0 beta3¿¡ Ãß°¡ µÇ¾ú½À´Ï´Ù.

10. array_shift(array array)

    ÇØ´ç ¹è¿­ÀÇ Ã³À½ ¿ø¼Ò¸¦ ¸®ÅÏÇÏ°í ±× ¿ø¼Ò¸¦ »èÁ¦ÇÕ´Ï´Ù. Php 4.0¿¡ Ãß°¡ µÇ¾ú½À´Ï´Ù.

    À§ °á°ú¿¡¼­ ±âÁ¸ÀÇ a[0] ¿ø¼Ò¸¦ »èÁ¦ÇÑ ÈÄ ¹è¿­ a´Â ¿ø¼Ò Çϳª¸¸ Á¸ÀçÇÏ°Ô µË´Ï´Ù.

 
11. array_slice(array array, int offset, int [length] )

    ¹è¿­ÀÇ Æ¯Á¤ ¿ø¼Ò¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù. Php 4.0¿¡ Ãß°¡ µÇ¾ú½À´Ï´Ù.
    (OffsetÀÇ °æ¿ì Á¤¼ö¸¦ »ç¿ëÇÏ¸ç ¾ç¼öÀÏ °æ¿ì offset °ªÀÇ ±× ´ÙÀ½ ¿ø¼ÒºÎÅÍ Ãâ·ÂÇϸç À½¼öÀÏ °æ¿ì
     ¸¶Áö¸· ¿ø¼Ò¿¡¼­ offset °ªºÎÅÍ Ãâ·ÂÇÕ´Ï´Ù.)

12. array_splice(array input, int offset, int [length] , array [replacement])

    ÇØ´ç ¹è¿­ÀÇ Æ¯Á¤ ¿ø¼Ò¸¦ Á¦°ÅÇÏ°í °Å±â¿¡ »õ·Î¿î ´Ù¸¥ ¿ø¼Ò¸¦ ´ëüÇÕ´Ï´Ù.
    Php 4.0¿¡ Ãß°¡µÇ¾ú½À´Ï´Ù.

13. array_unshift(array array, mixed var, [...])

    ÇØ´ç ¹è¿­ÀÇ Ã³À½ ºÎºÐ¿¡ Çϳª ¶Ç´Â ±× ÀÌ»óÀÇ ¿ø¼Ò¸¦ Ãß°¡ÇÕ´Ï´Ù.
    Php 4.0¿¡ Ãß°¡µÇ¾ú½À´Ï´Ù.

14. array_values(array input)

    ÇØ´ç ¹è¿­ÀÇ ¸ðµç °ªµéÀ» ¸®ÅÏÇÕ´Ï´Ù. Php 4.0¿¡ Ãß°¡µÇ¾ú½À´Ï´Ù.

    
15. array_walk(array arr, string func, mixed userdata)

    ÇØ´ç ¹è¿­ ¿ø¼Ò¿¡ °¢°¢ÀÇ °³ÀÎ ÇÔ¼öµéÀ» Àû¿ëÇØ ÁÝ´Ï´Ù. Php 4.0¿¡ Ãß°¡µÇ¾ú½À´Ï´Ù.

                 
16. arsort(array array)

    ÇØ´ç ¹è¿­À» ¿ª¼øÀ» Á¤·Ä Çϸç, index associationÀ» À¯ÁöÇÕ´Ï´Ù. 

                             
17. assort(array array)

    ÇØ´ç ¹è¿­À» Á¤·Ä ÇÏ°í, index associationÀ» À¯ÁöÇÕ´Ï´Ù.

                                          
18. compact(string varname | array varnames, [...])

    ÇØ´ç º¯¼ö À̸§°ú ÇØ´ç º¯¼öÀÇ °ªÀ» Æ÷ÇÔÇÏ´Â ¹è¿­À» ¸¸µì´Ï´Ù. Php 4.0¿¡ Ãß°¡µÇ¾ú½À´Ï´Ù.

19. count(mixed var)

    ÇØ´ç ¹è¿­ º¯¼öÀÇ ¿ø¼ÒÀÇ ¼ö¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

20. current(array array)

    ÇØ´ç ¹è¿­ÀÇ ÇöÀç ¿ø¼Ò¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

     
21. each(array array)

    ÇØ´ç ¹è¿­¿¡¼­ ´ÙÀ½ (key , value)½ÖÀ» ¸®ÅÏÇÕ´Ï´Ù.
    ÀÌ ½Ö¿¡´Â ³×°¡Áö ¿ä¼Ò¸¦ ¸®ÅÏÇϴµ¥ 0, 1, key, value ÀÔ´Ï´Ù.
    ¿©±â¼­ 0, key´Â °¢°¢ÀÇ º¯¼öÀÇ key À̸§À» °¡Áö°í 1, value´Â ÇØ´ç º¯¼öÀÇ °ªÀ» °¡Áý´Ï´Ù.

22. end(array array)

    ÇØ´ç ¹è¿­ÀÇ ³»ºÎ Æ÷ÀÎÅ͸¦ ¸¶Áö¸· ¿ø¼Ò·Î ¿Å±é´Ï´Ù.

23. extract(array var_array, int [extract_type] , string [prefix] )

    ÇØ´ç ¹è¿­ÀÇ ³»¿ëÀ» ½Éº¼ Å×À̺í·Î °¡Á®¿Í ÀÏ¹Ý º¯¼ö·Î ¸®ÅÏÇØ ÁÝ´Ï´Ù.

    À§ °á°ú¿¡¼­ 8ÇàÀÇ ÇÔ¼ö ½ÇÇàÀ¸·Î °¢ ¹è¿­ ¿ø¼Ò°¡ º¯¼ö·Î ´ëÀԵǾî Ãâ·ÂµË´Ï´Ù.

 
24. in_array(mixed needle, array haystack)

ÇØ´ç ¹è¿­¿¡ ÇØ´ç º¯¼ö°¡ Á¸ÀçÇϸé true¸¦ ¸®ÅÏÇÕ´Ï´Ù.

    ¼Ò½º¿¡¼­ 5ÇàÀÇ ¹è¿­¿¡ 7ÇàÀÇ Á¶°Ç¿¡ ¸Â´Â ÀÎÀÚ°¡ Á¸ÀçÇϱ⠶§¹®¿¡ 8ÇàÀÌ Ãâ·ÂµË´Ï´Ù.

 
25. key(array array)

    ÇØ´ç ¹è¿­ÀÇ ÇöÀç positionÀÇ index ¿ø¼Ò¸¦ ¸®ÅÏÇÕ´Ï´Ù.
    Áï, associative ¹è¿­¿¡¼­ °¡¸®Å°´Â ¿ø¼ÒÀÇ Å° °ªÀ» ¸®ÅÏÇÕ´Ï´Ù.

26. krsort(array array)

    ÇØ´ç ¹è¿­À» ¿ªkey ¼øÀ¸·Î Á¤·ÄÇÕ´Ï´Ù.

    
27. ksort(array array)

    ÇØ´ç ¹è¿­À» key ¼øÀ¸·Î Á¤·ÄÇÕ´Ï´Ù.

                 
28. list(...)

    ÇØ´ç º¯¼öµéÀ» ¹è¿­Ã³·³ ¸¸µì´Ï´Ù.

    ¼Ò½º¿¡¼­ 12Çà ÇÔ¼ö ¼öÇàÀ¸·Î ÇØ´ç ¹è¿­À» key ¼øÀ¸·Î ´Ù½Ã Á¤·ÄÇؼ­ Ãâ·ÂÇÕ´Ï´Ù.

 
29. next(array array)

    ÇØ´ç ¹è¿­ÀÇ ³»ºÎ ¹è¿­ Æ÷ÀÎÅ͸¦ ÀüÁø½Ãŵ´Ï´Ù.


30. pos(array array)

    ÇØ´ç ¹è¿­ÀÇ ÇöÀç ¿ø¼Ò¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

            
31. prev(array array)

    ÇØ´ç ¹è¿­ÀÇ ³»ºÎ ¹è¿­ Æ÷ÀÎÅ͸¦ ÈÄÁø½Ãŵ´Ï´Ù.


32. range(int low, int high)

    µÎ ÀÎÀÚ ¹üÀ§ÀÇ Á¤¼ö¸¦ Æ÷ÇÔÇÏ´Â ¹è¿­À» ¸¸µé¾î ÁÝ´Ï´Ù.

33. reset(array array)

    ÇØ´ç ¹è¿­ÀÇ ³»ºÎ Æ÷ÀÎÅ͸¦ ù ¹ø° ¿ø¼Ò·Î setÇÕ´Ï´Ù.

    
34. rsort(array array)

    ÇØ´ç ¹è¿­À» ¿ª¼øÀ¸·Î Á¤·ÄÇÕ´Ï´Ù.

                 
35. shuffle(array array)

    ÇØ´ç ¹è¿­À» ¼¯¾î ÁÝ´Ï´Ù.

                          
36. sizeof(array array)
    
    ÇØ´ç ¹è¿­ÀÇ ¿ø¼Ò °³¼ö¸¦ ±¸ÇØ ÁÝ´Ï´Ù.

                                   
37. sort(array array)

    ÇØ´ç ¹è¿­À» Á¤·ÄÇÕ´Ï´Ù.

                                    
38. uasort(array array, function cmp_function)

    ÇØ´ç ¹è¿­À» »ç¿ëÀÚ°¡ Á¤ÀÇÇÑ ºñ±³ ÇÔ¼ö·Î Á¤·ÄÇÏ°í index associationÀ» À¯ÁöÇÕ´Ï´Ù.

                                                 
39. uksort(array array, function cmp_function)

    ÇØ´ç ¹è¿­À» »ç¿ëÀÚ°¡ Á¤ÀÇÇÑ ºñ±³ ÇÔ¼ö·Î key¼øÀ¸·Î Á¤·ÄÇÕ´Ï´Ù.

                                                                  
40. usort(array array, function cmp_function)

    ÇØ´ç ¹è¿­À» »ç¿ëÀÚ°¡ Á¤ÀÇÇÑ ºñ±³ ÇÔ¼ö·Î value¼øÀ¸·Î Á¤·ÄÇÕ´Ï´Ù.

directory ÇÔ¼ö

1. chdir(string directory)

    ÇØ´ç µð·ºÅ丮·Î ¿Å°Ü ÁÝ´Ï´Ù.

           
2. dir(string directory)

    ÇØ´ç µð·ºÅ丮ÀÇ °´Ã¼¸¦ »ý¼ºÇÕ´Ï´Ù.
    Áï, ÀÌ ÇÔ¼ö¸¦ ÀÌ¿ëÇØ °´Ã¼¸¦ »ý¼ºÇÒ °æ¿ì µÎ°³ÀÇ ¸Þ¼Òµå°¡ ÁÖ¾îÁö´Âµ¥ Çϳª´Â handle , ¶ÇÇϳª´Â path
    ÀÔ´Ï´Ù.  ÀÌ µÎ°³ÀÇ ¼Ó¼ºÀ» ÀÌ¿ëÇØ µÚ¿¡ ¼³¸íÇÒ readdir(), rewinddir() , closedir() ÇÔ¼ö¿Í °°Àº ±â´ÉÀÇ
    3°³ÀÇ ¸Þ¼Òµå¸¦ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.  Â÷·Ê·Î read() , rewind() , close() ÀÔ´Ï´Ù.       

                                                   
3. closedir(int dir_handle)

    ÇØ´ç µð·ºÅ丮 ÇÚµéÀ» ´Ý½À´Ï´Ù.

                                                                  
4. opendir(string path)

    ÇØ´ç µð·ºÅ丮 ÇÚµéÀ» openÇÕ´Ï´Ù. Áï, ÀÌ ÇÚµéÀ» ÀÌ¿ëÇØ closedir(), readdir(), rewinddir() µî¿¡
    Àû¿ëÇÕ´Ï´Ù. 

                                                                                 
5. readdir(int dir_handle)

    ÇØ´ç µð·ºÅ丮 ÇÚµé·ÎºÎÅÍ ÇØ´çÇÏ´Â µð·ºÅ丮¿Í ÆÄÀÏÀÇ ³»¿ëÀ» ÀÐ¾î ¸®ÅÏÇÕ´Ï´Ù.

                                                                                            
6. rewinddir(int dir_handle)

    ÇØ´ç µð·ºÅ丮 ÇÚµéÀ» óÀ½ÀÇ À§Ä¡·Î µÇµ¹¸³´Ï´Ù. Áï, readdir() ÇÔ¼ö¸¦ ÀÌ¿ëÇØ ÇØ´ç µð·ºÅ丮¿Í ÆÄÀϵéÀ»
    Ãâ·ÂÇß´Ù¸é µð·ºÅ丮 ÇÚµéÀº ¸¶Áö¸·¿¡ À§Ä¡ÇÒ °ÍÀÔ´Ï´Ù.
    ´Ù½Ã Çѹø ´õ µð·ºÅ丮¸¦ Àоî Ãâ·ÂÇÏ·Á¸é ÇÚµéÀ» óÀ½À¸·Î µÇµ¹·Á¾ßÇÕ´Ï´Ù.



µð·ºÅ丮 ÇÔ¼ö¸¦ ÀÌ¿ëÇÑ ¿¹Á¦´Â ¸®´ª½ºÀÇ ftp µð·ºÅ丮Áß pub µð·ºÅ丮¸¦ Àоîµé¿© È­¸é¿¡ Ãâ·ÂÇÏ´Â °ÍÀ» º¸¿©
µå¸®°Ú½À´Ï´Ù.  ÀÌ°ÍÀ» ÀÌ¿ëÇØ °£´ÜÈ÷ µð·ºÅ丮ÀÇ ÀÚ·á ¸ñ·ÏÀ» ¸¸µé¾îµµ µË´Ï´Ù.
ftpÀÇ ÀÚ·á·®°ú ¸ñ·ÏÀ» ÇÑ´«¿¡ º¼ ¼ö ÀÖ´Ù¸é »ç¿ëÀÚ°¡ ÆíÇÒ °ÍÀÔ´Ï´Ù. ÀÌ°ÍÀº ÀÚ·á½ÇÀÇ ¿î¿µ¿¡ µµ¿òÀÌ µÉ °Í
ÀÔ´Ï´Ù.  ´Ù¸¥ ÇÔ¼ö¸¦ »ç¿ëÇؼ­ À̸§¼øÀ¸·Î Á¤·ÄÀ» ÇÏ¸é ´õ º¸±â ÆíÇÒ °ÍÀÔ´Ï´Ù.
ÇÏÁö¸¸ ÀÌ·± ¹æ¹ýÀº ÇϳªÀÇ ¹æ¹ý ÀÏ»Ó ²À ÀÌ·¸°Ô Ç϶ó´Â ¹ýÀº ¾ø½À´Ï´Ù.

±×¸². 8-97À» º¸¸é opendir( ) ÇÔ¼ö¸¦ »ç¿ëÇØ ÇØ´ç µð·ºÅ丮¸¦ ¿­°í, readdir( ) ÇÔ¼ö¸¦ »ç¿ëÇؼ­ ÇØ´ç µð·ºÅ丮
³»¿ëÀ» ÀÐ¾î µéÀÔ´Ï´Ù. ±×¸®°í while ±¸¹®À» »ç¿ëÇؼ­ ÇØ´ç µð·ºÅ丮ÀÇ ³»¿ëÀ» ÀüºÎ Ãâ·ÂÇÕ´Ï´Ù. 
´ÙÀ½ closedir( ) ÇÔ¼ö¸¦ »ç¿ëÇؼ­ ¿¬ µð·ºÅ丮¸¦ ´Ý¾ÆÁÝ´Ï´Ù. ±×·³ ±×¸² 8-98ÀÇ °á°ú¸¦ È®ÀÎÇÏ°Ú½À´Ï´Ù.

ÀÌ °á°ú¸¦ ¾ÆÆÄÄ¡ À¥¼­¹öÀÇ µð·ºÅ丮¿¡ Á¸ÀçÇÏ´Â ÆÄÀÏÀ» À¥À¸·Î »Ñ·ÁÁÖ´Â ±â´ÉÀ¸·Î º¸¿© ÁÖ´Â ¹æ¹ýµµ ÀÖ½À´Ï´Ù. 
ÀÌ°ÍÀº À¥¼­¹öÀÇ ÇØ´ç HTMLÆÄÀÏÀÌ ¾øÀ» °æ¿ì µð·ºÅ丮·Î º¸¿©ÁÖ´Â ±â´ÉÀÔ´Ï´Ù.
´ÜÁö À¥¼­¹öÀÇ ÀÌ °°Àº ±â´ÉÀÌ Á¸Àç Çϱ⿡ À¥¼­¹öÀÇ ±â´ÉÀ¸·Î ½ºÅ©¸³Æ®ÀÇ µð·ºÅ丮 ÇÔ¼ö¸¦ ´ë½Å ÇÒ ¼ö´Â ¾ø½À´Ï´Ù. 
½ºÅ©¸³Æ®·Î ¸¸µé¾î ÁÙ ¼ö ÀÖ´Â ºÎºÐÀÌ ¾Æ´Ï±â ¶§¹®¿¡ ¾ö¿¬È÷ À¥¼­¹öÀÇ µð·ºÅ丮 Ãâ·Â°ú ÀÌ°ÍÀº ´Ù¸¥ °ÍÀÔ´Ï´Ù.

DATE¿Í TIME ÇÔ¼ö

³¯Â¥¿Í ½Ã°£ ÇÔ¼öµéÀº mysql ÇÔ¼ö¿Í ºñ½ÁÇÑ ºÎºÐÀÌ ¸¹ÀÌ ÀÖÀ¸¹Ç·Î ´ëºÎºÐ ´Ù ÀÌÇØÇϸ®¶ó »ý°¢ÇÕ´Ï´Ù.

  

1. checkdate(int month, int day, int year);

    ÇØ´çÇÏ´Â ³â , ¿ù , ÀÏ ÀÇ Å¸´ç¼ºÀ» °Ë»çÇØ °á°ú¸¦ ¸®ÅÏÇÕ´Ï´Ù.
    Ÿ´çÇϸé true °ÅÁþÀ̸é false¸¦ ¸®ÅÏÇÕ´Ï´Ù.

  
2. date(string format, int [timestamp] )

    ÇØ´ç timestamp¸¦ ÁöÁ¤ÇÑ format¿¡ ¸Â°Ô ¸®ÅÏÇØ ÁÝ´Ï´Ù.

    ¸¸¾à timestqmp°¡ ÁÖ¾îÁöÁö ¾ÊÀ» °æ¿ì ÇöÀçÀÇ timestamp°ªÀÌ ÁÖ¾îÁý´Ï´Ù.

    FormatÀÇ Á¾·ù¿¡´Â 

        a - "am" ¶Ç´Â "pm"
        A - "AM" ¶Ç´Â "PM"
        d - ÀÏÀ» 2ÀÚ¸® Çü½ÄÀ¸·Î Ç¥ÇöÇÕ´Ï´Ù. ( 01 , 02 , 31 )
        D - ¿äÀÏÀ» ªÀº ¿µ¹® Ç¥±â·Î Ç¥ÇöÇÕ´Ï´Ù. (Mon , Fri)
        F - ´ÞÀ» ±ä ¿µ¹® Ç¥±â·Î Ç¥ÇöÇÕ´Ï´Ù. (January)
        h - ½Ã°£À» 12½Ã°£ ÇüÅ·ΠǥÇöÇÕ´Ï´Ù(01 ~ 12)
        H - ½Ã°£À» 24½Ã°£ ÇüÅ·ΠǥÇöÇÕ´Ï´Ù.(00 ~ 23)
        g - ½Ã°£À» 12½Ã°£ Çü½ÄÀ¸·Î Ç¥ÇöÇÕ´Ï´Ù.(1 ~ 12)
        G - ½Ã°£À» 24½Ã°£ Çü½ÄÀ¸·Î Ç¥ÇöÇÕ´Ï´Ù.(1 ~ 23)
        i - ºÐÀ» 2ÀÚ¸®·Î Ç¥ÇöÇÕ´Ï´Ù. (00 ~ 59)
        j - ÀÏÀ» Ç¥ÇöÇÕ´Ï´Ù. (1 ~ 31)
        l - ¿äÀÏÀ» ±ä ¿µ¹® Ç¥±â·Î Ç¥ÇöÇÕ´Ï´Ù.(Friday)
        L - Çظ¦ ³Ñ±â À§ÇÑ ºÒ ¿¬»êÀ¸·Î Ç¥ÇöÇÕ´Ï´Ù.(0 ¶Ç´Â 1)
        m - ´ÞÀ» Ç¥ÇöÇÕ´Ï´Ù. (01 ~ 12)
        n - ´ÞÀ» Ç¥ÇöÇÕ´Ï´Ù. (1 ~ 12)
        M - ´ÞÀ» ªÀº ¿µ¾î Ç¥±â·Î Ç¥ÇöÇÕ´Ï´Ù.(Jan)
        s - Ãʸ¦ Ç¥ÇöÇÕ´Ï´Ù. (00 ~ 59)
        S - ¿µ¾î½Ä ¼ýÀÚ¸¦ Ç¥ÇöÇÕ´Ï´Ù. (th , nd)
            Áï, 2nd ÀÌ·± ½ÄÀÔ´Ï´Ù.
        t - ÁÖ¾îÁø ´ÞÀÇ ÀÏ ¼ö¸¦ Ç¥ÇöÇÕ´Ï´Ù. (28 , 31)
        U - ÁÖ¾îÁø ½Ã±â·Î ºÎÅÍÀÇ Ãʸ¦ Ç¥ÇöÇÕ´Ï´Ù.
        W - ÇØ´ç ¿äÀÏÀ» ¼ýÀڷΠǥÇöÇÕ´Ï´Ù.( 0 -> Sunday , 1 -> Monday)
        Y - 4ÀÚ¸® ³âµµ¸¦ Ç¥ÇöÇÕ´Ï´Ù. ( 2000 )
        y - 2ÀÚ¸® ³âµµ¸¦ Ç¥ÇöÇÕ´Ï´Ù. ( 00 , 99 )
        z - ±× ÇØÀÇ ¸î ¹ø° ÀÏÀÎÁö Ç¥ÇöÇÕ´Ï´Ù. (0 ~ 365)

3. getdate(int timestamp)

    ÇØ´ç timestampÀÇ date/time Á¤º¸¸¦ ¿¬°ü ¹è¿­·Î ¸®ÅÏÇÕ´Ï´Ù.

    ¿¬°ü ¹è¿­ÀÇ ¿ä¼Ò¿¡´Â

        seconds - Ãʸ¦ Ç¥ÇöÇÕ´Ï´Ù.
        minutes - ºÐÀ» Ç¥ÇöÇÕ´Ï´Ù.
        hours - ½Ã°£À» Ç¥ÇöÇÕ´Ï´Ù.
        mday - ±× ´ÞÀÇ ÀÏÀ» Ç¥ÇöÇÕ´Ï´Ù.
        wday - ±× ÁÖÀÇ ¿äÀÏÀ» ¼ýÀڷΠǥÇöÇÕ´Ï´Ù.
        mon - ´ÞÀ» ¼ýÀڷΠǥÇöÇÕ´Ï´Ù.
        year - ³âµµ¸¦ ¼ýÀڷΠǥÇöÇÕ´Ï´Ù.
        yday - ±× ÇØÀÇ ¸î ¹ø° ÀÏÀÎÁö Ç¥ÇöÇÕ´Ï´Ù. (0 ~ 365)
        weekday - ¿äÀÏÀ» ±ä ¿µ¾î Ç¥±â·Î Ç¥ÇöÇÕ´Ï´Ù.(Friday)
        month - ´ÞÀ» ±ä ¿µ¾î Ç¥±â·Î Ç¥ÇöÇÕ´Ï´Ù. (January)

4. gettimeofday(void)

    ÇöÀçÀÇ ½Ã°£ Á¤º¸¸¦ ¿¬°ü ¹è¿­ ÇüÅ·Π¸®ÅÏÇÕ´Ï´Ù.

    ¹è¿­ ÀÎÀÚ¿¡´Â 

        sec - Ãʸ¦ Ç¥ÇöÇÕ´Ï´Ù.
        Usec - ¸¶ÀÌÅ©·Î Ãʸ¦ Ç¥ÇöÇÕ´Ï´Ù.
        minuteswest - ±×¸°À§Ä¡ ºÐÀ» Ç¥ÇöÇÕ´Ï´Ù.
        dsttime - Á¤È®ÇÑ dst ŸÀÔÀ» Ç¥ÇöÇÕ´Ï´Ù.

5. gmdate(string format, int timestamp)

    ÇØ´ç timestamp(GMT/CUT date/time)¸¦ ÁÖ¾îÁø format ÀÎÀÚ¿¡ ¸Â°Ô ¸®ÅÏÇÕ´Ï´Ù.
    Format ÀÎÀÚ´Â date() ÇÔ¼öÀÇ ÀÎÀÚ ¼³¸í°ú °°½À´Ï´Ù.

           
6. gmmktime(int hour, int minute, int second, int month, int day, int year, int [is_dst])

    GMT date·Î UNIX timestamp¸¦ ±¸ÇÕ´Ï´Ù.

                    
7. gmstrftime(string format, int timestamp)

    ÁÖ¾îÁø timestamp(GMT/CUT time/date)¸¦ locale ¼³Á¤À» µû¸£´Â ÇüÅ·Π¸®ÅÏÇÕ´Ï´Ù.
    format ÀÎÀÚ´Â strftime() ÇÔ¼ö¸¦ ÂüÁ¶Çϼ¼¿ä.

                                       
8. microtime(void)

    ÇöÀçÀÇ UNIX timestamp¸¦ ¸¶ÀÌÅ©·ÎÃÊ(õºÐÀÇ 1ÃÊ ´ÜÀ§)·Î ¸®ÅÏÇÕ´Ï´Ù.

                                                    
9. mktime(int hour, int minute, int second, int month, int day, int year, int [is_dst])

    ÇØ´ç ³¯Â¥¸¦ UNIX timestamp·Î ¸®ÅÏÇÕ´Ï´Ù.


10. strftime(string format, int timestamp)

    ÁÖ¾îÁø timestamp¸¦ locale ¼³Á¤À» µû¸£´Â ÇüÅ·Π¸®ÅÏÇÕ´Ï´Ù.
    ¹°·Ð ¿©±â¼­µµ timestampÀÎÀÚ°¡ ¾øÀ» °æ¿ì ÇöÀç½Ã°£À¸·Î ¼³Á¤µË´Ï´Ù.

    Format ÀÎÀÚ´Â

        %a - ÇöÀç locale À» µû¸£´Â ¿äÀÏÀ» Ãà¾à Ç¥ÇöÇÕ´Ï´Ù.
        %A - ÇöÀç locale À» µû¸£´Â ¿äÀÏÀ» full name·Î Ç¥ÇöÇÕ´Ï´Ù.
        %b - ÇöÀç locale À» µû¸£´Â ´ÞÀ» Ãà¾à Ç¥ÇöÇÕ´Ï´Ù.
        %B - ÇöÀç locale À» µû¸£´Â ´ÞÀ» full name·Î Ç¥ÇöÇÕ´Ï´Ù.
        %c - ÇöÀçÀÇ locale¿¡ ´ëÇÑ ¿ì¼±µÇ´Â ³¯Â¥¿Í ½Ã°£À» Ç¥ÇöÇÕ´Ï´Ù.
        %d - ÀÏÀ» Ç¥ÇöÇÕ´Ï´Ù.(00 ~ 31)
        %H - ½Ã°£À» 24½Ã°£ Çü½ÄÀ¸·Î Ç¥ÇöÇÕ´Ï´Ù. (00 ~ 23)
        %l - ½Ã°£À» 12½Ã°£ Çü½ÄÀ¸·Î Ç¥ÇöÇÕ´Ï´Ù. (01 ~ 12)
        %j - ±× ÇØÀÇ ¸î ¹ø° ÀÏÀÎÁö Ç¥ÇöÇÕ´Ï´Ù. (001 ~ 366)
        %m - ´ÞÀ» Ç¥ÇöÇÕ´Ï´Ù. (1 ~ 12)
        %M - ºÐÀ» Ç¥ÇöÇÕ´Ï´Ù. (00 ~ 59)
        %p - ÁÖ¾îÁø ½Ã°£¿¡ ÇØ´çÇÏ´Â "am" ¶Ç´Â "pm"À» Ç¥ÇöÇÕ´Ï´Ù.
        %S - Ãʸ¦ Ç¥ÇöÇÕ´Ï´Ù 
        %U - ¿ÃÇØÀÇ ¸î ¹ø° ÁÖ°¡ Áö³µ´ÂÁö Ç¥ÇöÇÕ´Ï´Ù.(ù ÁÖÀÇ Ã³À½ ¿äÀÏÀº ÀÏ¿äÀÏ)
        %W - ¿ÃÇØÀÇ ¸î ¹ø° ÁÖ°¡ Áö³µ´ÂÁö Ç¥ÇöÇÕ´Ï´Ù. (ù ÁÖÀÇ Ã³À½ ¿äÀÏÀº ¿ù¿äÀÏ)
        %w - ¿äÀÏÀ» ¼ýÀڷΠǥÇöÇÕ´Ï´Ù.( ÀÏ¿äÀÏ -> 0)
        %x - ÇöÀç locale¸¦ µû¸£´Â ³¯Â¥¸¦ Ç¥ÇöÇÕ´Ï´Ù.
        %X - ÇöÀç locale¸¦ µû¸£´Â ½Ã°£À» Ç¥ÇöÇÕ´Ï´Ù.
        %y - ³âµµ¸¦ µÎÀÚ¸® ¼ýÀڷΠǥÇöÇÕ´Ï´Ù.(00 ~99)
        %Y - ³× ÀÚ¸® ³âµµ¸¦ Ç¥ÇöÇÕ´Ï´Ù.(2000)
        %Z - ÇöÀç ŸÀÓÁ¸À» Ç¥ÇöÇÕ´Ï´Ù.

11. time(void)

    ÇöÀçÀÇ UNIX timestamp¸¦ ¸®ÅÏÇÕ´Ï´Ù.
    ³¯Â¥ ÇÔ¼öÀÇ ¿¹Á¦´Â ´Þ·ÂÀ» ¸¸µé¾î º¸±â·Î ÇÏ°Ú½À´Ï´Ù. ´Þ·ÂÀº °£´ÜÈ÷ ÇÔ¼ö¸¦ ÀÌ¿ëÇϸé ÀÌ·ç¾î Áö´Â °ÍÀÔ´Ï´Ù.
    ±×·³ ¼Ò½º¸¦ º¸¸é¼­ È®ÀÎ ÇÏ°Ú½À´Ï´Ù.

´Þ·Â¸¸µé±â

        <?php

            if($chanl == day && $m < 13 && $m > 0)
            {
                // ´Þ·Â È­¸éÀº $chanlÀÌ dayÀÌ°í, $m(ÇØ´ç ´Þ)ÀÌ 13º¸´Ù À۾ƾ߸¸ Ãâ·ÂµË´Ï´Ù.
                // ÀÌ°ÍÀº º¸°í ½ÍÀº ´ÞÀ» 13 ÀÌ»óÀ¸·Î ÀÔ·ÂÇÒ °æ¿ì Ãâ·ÂÀÌ ¾ÈµÇ°Ô Çϱâ À§ÇÔÀÔ´Ï´Ù.


                $day = 28;
               // ±× ´ÞÀÇ ¸¶Áö¸· ³¯À» °è»êÇϱâ À§ÇØ Ã³À½ °Ë»öÇÒ ³¯Â¥ÀÔ´Ï´Ù.


                while(checkdate($m, $day, 2000))
                {
                    $day++;
                }
               // ÇØ´ç ³¯Â¥¸¦ °Ë»öÇÕ´Ï´Ù. Checkdate( ) ÇÔ¼ö¸¦ ÀÌ¿ëÇؼ­ 28ºÎÅÍ °è¼Ó Áõ°¡Çϸ鼭 Ÿ´çÇÑ ³¯Â¥¸¦ °¡·Á ³À´Ï´Ù. 
               // ¸¸¾à ±× ´ÞÀÌ 30ÀϱîÁö ¶ó¸é 31¿¡¼­ while¹®Àº ¸ØÃâ °ÍÀÔ´Ï´Ù. 


                $day = $day-1;
               // ³¯Â¥ °Ë»öÀÇ °á°ú ³¯Â¥¿¡¼­ -1À» ÇÔÀ¸·Î½á ÁøÂ¥ ³¯Â¥¸¦ °¡·Á ³À´Ï´Ù.
 

                $x = mktime(12,12,12,$m,1,2000);
               // 2000³â $m(Àü´Þ ¹ÞÀº ´Þ)¿ù 1ÀÏ 12:12:12À» ³ªÅ¸³»´Â ŸÀÓ ½ºÅÆÇÁ °ªÀÔ´Ï´Ù.
               // ÀÌ ÇÔ¼ö¸¦ »ç¿ëÇÑ °ÍÀº ´ÜÁö ¿¹¸¦ º¸À̱â À§ÇÔÀ̹ǷΠ´Ù¸¥ ¹æ¹ýÀ» »ç¿ëÇصµ ¹«°üÇÕ´Ï´Ù.


                $day2 = date("w","$x");
               // ÀÌ ÇÔ¼öÀÇ w ÀÎÀÚ´Â ¿äÀÏÀ» ¼ýÀÚ·Î ¸®ÅÏÇÕ´Ï´Ù. 0ÀÏ °æ¿ì ÀÏ¿äÀÏÀÔ´Ï´Ù.
               // Áï, ÇØ´ç ´ÞÀÇ Ã³À½ 1ÀÏÀÇ ¿äÀÏÀ» ¾Ë±â À§ÇØ ¾²¿©Áý´Ï´Ù.

                                                             
                $hday = mktime();
               // ÀÌ ÇÔ¼ö´Â ÇöÀç ³¯Â¥¿Í ½Ã°£À» ¾Ë±â À§ÇØ »ç¿ëÇÕ´Ï´Ù.


                $day3 = date("j", "$hday");
               // $hday º¯¼ö °ªÀ» ÀÌ¿ëÇØ ¿À´ÃÀÇ ³¯Â¥¸¦ ¾Ë¾Æ ³À´Ï´Ù.

                                                                             
                echo ("<b>2000³â $m ¿ù $day3 ÀÏ</b><br>");
               // È­¸é¿¡ ¿À´ÃÀÇ ³¯Â¥¸¦ Ãâ·ÂÇÕ´Ï´Ù.


                echo("<table border=1 cellspacing=2 cellpadding=2 width=400>");
               // ´Þ·ÂÀÇ Å×ÀÌºí ½ÃÀÛÀÔ´Ï´Ù.


                echo("<tr>
                          <td>ÀÏ</td>
                          <td>¿ù</td>
                          <td>È­</td>
                          <td>¼ö</td>
                          <td>¸ñ</td>
                          <td>±Ý</td>
                          <td>Åä</td>
                      </tr>
                      <tr>
                ");
               // ¿äÀÏ Å×À̺í ÀÔ´Ï´Ù. ÀÌ Å×À̺í Çü½ÄÀ¸·Î ³¯Â¥µéÀÌ ¸¸µé¾îÁý´Ï´Ù.


                $r="7"-"$day2" ;
               // ´Þ·ÂÀÇ Ã³À½ 1ÀÏÀÌ ¹«½¼ ¿äÀÏÀÎÁö¸¦ È®ÀÎÇÏ°í ´Þ·Â Ã³À½ ºÎºÐÀÇ °ø¹éÀ» ¸¸µé±â À§ÇÑ °ø¹é Ä­¼ö¸¦ ¾Ë¾Æ³À´Ï´Ù.
               //ÀÌÁ¦ ÇØ´ç ´Þ·ÂÀÇ ½ÇÁ¦ÀûÀÎ ±¸¹®Àº for¹®ÀÔ´Ï´Ù.

                {
               // $nÀº ´Þ·Â¿¡ Ç¥½ÃÇÑ ³¯Â¥ÀÔ´Ï´Ù.
               // ÀÌ°ÍÀº °è¼Ó Áõ°¡ Çϸ鼭 È­¸é¿¡ Ãâ·ÂÇϴµ¥ $day(±× ´ÞÀÇ ¸¶Áö¸· ³¯Â¥)±îÁö Áõ°¡Çϸ鼭 È­¸é¿¡ Ãâ·ÂÇÕ´Ï´Ù.

                     if($n ==1)
                     {
                     //¸¸¾à ÇØ´ç ³¯Â¥°¡ 1 ÀÌ¸é ´Þ·ÂÀÇ Ã³À½ °ø¹é ºÎºÐÀ» Ç¥ÇöÇÕ´Ï´Ù.


                         for($d=0 ; $d <= $day2-1 ; $d++)
                         {
                          // °ø¹éÀÇ ¼ö´Â ±× ´ÞÀÇ 1ÀÏÀ» ¼ýÀÚ·Î ¹ÞÀº $day2 º¯¼ö¿¡ -1ÇÑ °ª ¸¸Å­ ¸¸µì´Ï´Ù.
                             echo("<td>&nbsp;</td>");
                         }
                     }

                     if($n == $r+1 || $n == $r+8 || $n == $r+15 || $n ==$r+22 || $n == $r+29)
                     {
                     // À§ if¹®Àº ³¯Â¥¸¦ Ãâ·Â Çϸ鼭 ÇØ´ç ³¯Â¥ ÀÌÈÄ ´ÙÀ½ Ä­¿¡ Ãâ·Â ÇÏ°Ô Çϱâ À§ÇÑ Á¶°Ç ÀÔ´Ï´Ù.
                         echo("</tr><tr>");
                     }

                     if($day3 == $n)
                     {
                     // ÀÌ Á¶°ÇÀº ¸¸¾à ´Þ·Â Å×À̺íÀ» Ãâ·Â Çϸ鼭 ³¯Â¥°¡ ¿À´Ã ³¯Â¥ÀÏ °æ¿ì ÁøÇÏ°Ô Ç¥Çö Çϱâ À§ÇÑ ¹®ÀÔ´Ï´Ù.
                         echo("<td><b>$n</b></td>"); 
                     }  else { 
                     // ±× ¹ÛÀÇ °æ¿ì ³¯Â¥´Â º¸Åë Å©±â·Î Ãâ·Â µË´Ï´Ù.//
                         echo"<td>$n</td>"); 
                                     }
                }

            }// óÀ½ if¹®ÀÇ ³¡ÀÔ´Ï´Ù.
                        
            echo("</tr>
                  </table><br>
            ");

            echo("<b>º¸°í ½ÍÀº ¿ùÀ» ÀÔ·Â Çϼ¼¿ä<b><br>
                        
                  <form method=post action=/test/test.php>
                      <input type=text size=4 name=m>¿ù
                      <input type=hidden name=chanl value=day>
                      <input type=submit value=View>
                  </form>
            ");
            // ¿©±â¼­ form¹®¿¡ »ç¿ëÇØ º¸°í ½ÍÀº ´ÞÀ» ÀÔ·Â Çϸé È­¸é¿¡ ÇØ´ç ´ÞÀÇ ¿À´Ã ³¯Â¥¸¦ º¼ ¼ö ÀÖ½À´Ï´Ù. 
            // ÀÌ ¹®Àº select¹®À» »ç¿ëÇؼ­ 12¿ù ÀÌÈÄ·Î ÀÔ·ÂÀ» ¸øÇÏ°Ô ¸¸µé ¼öµµ ÀÖÁö¸¸ Á¶°Ç½ÄÀÇ ÇнÀ¿¡ µµ¿òÀ»
                        // ÁÖ±â À§ÇØ text ÀÔ·Â ÆûÀ¸·Î ¸¸µé¾ú½À´Ï´Ù. 
            // Form¹®ÀÇ ÀÎÀÚµéÀ» Àü´ÞÇÒ action ºÎºÐÀº $PHP_SELF¸¦ »ç¿ëÇؼ­ ¿©·¯ºÐÀº Çغ¸±â ¹Ù¶ø´Ï´Ù.
            // ÀÌ°ÍÀº ÇöÀçÀÇ ½ºÅ©¸³Æ® ÆÄÀÏ Àڽſ"Ô·Î ÀÎÀÚµéÀ» Àü´ÞÇÏ´Â °ÍÀÔ´Ï´Ù.
        ?>

    ¿©±â ±îÁö ´Þ·Â ¼Ò½º¸¦ º¸¾Ò½À´Ï´Ù. ±×·³ °á°ú¸¦ º¸¸é¼­ ¼Ò½º¿Í Çѹø ´Ù½Ã ºñ±³ÇØ º¸±â ¹Ù¶ø´Ï´Ù.
 

    °á°ú¸¦ º¸¸é ÇØ´ç ³¯Â¥°¡ ÂðÇÏ°Ô Ç¥½Ã µÇ´Â°É º¼ ¼ö ÀÖ½À´Ï´Ù.
    ÀÌ·¸°Ô ¿©·¯ºÐµéµµ ³ª¸§´ë·Î »õ·ÎÀÌ ´Þ·ÂÀ» ¸¸µé¾î º¸±æ ¹Ù¶ø´Ï´Ù. 
    º¸±â¿¡´Â È­·ÁÇÏÁö ¾ÊÁö¸¸ HTMLÀÇ Á¶±ÝÀÇ ¼öÁ¤À¸·Î µµ ÃæºÐÈ÷ È­·ÁÇØ Áú ¼ö ÀÖ½À´Ï´Ù.
    ¹®Á¦´Â ÀÌ·¸°Ô Ãâ·ÂÇÏ°Ô ÇÏ´Â ½ºÅ©¸³Æ®ÀÇ ±¸¼ºÀ» ÇÏ´Â °ÍÀÔ´Ï´Ù. 
    ¸ÕÀú ÇÔ¼ö¸¦ ÀÐ¾î º¸°í ³­ÈÄ ÀÌ ´Þ·Â ¼Ò½º¸¦ Âü°í ÇÏÁö ¾Ê°í ¸¸µé¾î ºÃÀ¸¸é ÇÕ´Ï´Ù.
    ¹«¾ùÀÌµç ¸ôµÎÇؼ­ ¸¸µé¾î º¸´Â °ÍÀÌ Áß¿äÇÕ´Ï´Ù.
    ÀÌ°ÍÀÌ ½×ÀÌ¸é ½Ç·ÂÀÌ µÇ´Â °ÍÀÔ´Ï´Ù. ÇÊÀÚ´Â ÀÌ·± ´Þ·Â ¼Ò½º¸¦ ¸¸µå´Âµ¥ ²¿¹Ú ÇϷ縦 ÇãºñÇß½À´Ï´Ù. 

STRING ÇÔ¼ö

mysqlÀÇ ¹®ÀÚ¿­ ÇÔ¼öµé°ú °°ÀÌ ¹®ÀÚ¿­À» ´Ù·ç´Â ÇÔ¼öµéÀº µ¥ÀÌÅͺ£À̽º·ÎÀÇ ÀԷ°ú °ü·ÃÇØ Áß¿äÇÑ ºÎºÐÀÔ´Ï´Ù.    ÇÏÁö¸¸ ÇÊÀÚÀÇ °æ¿ì ÀÌ ºÎºÐÀÌ Á¶±Ý ¼ÒȦÇÑ ¸éÀÌ ÀÖ½À´Ï´Ù.    µÚ ¼Ò½º ºÎºÐ¿¡¼­ È®ÀεǰÚÁö¸¸ ÀüÇô ¹®ÀÚ¿­°ú´Â °ü°è ¾ø´Â µí ¿­½ÉÈ÷ ½ºÅ©¸³Æ®¸¦ ¸¸µé¾ú½À´Ï´Ù.    ¿©·¯ºÐµéÀº ºÎµð ÀÌ ºÎºÐ¿¡ ½Å°æÀ» ¾²±â ¹Ù¶ø´Ï´Ù.    (Âü°í·Î ¹®ÀÚ¿­ ÇÔ¼ö¸¦ Ãß°¡ÇÏ°í ÀÛµ¿ÇÏ´Â °Í¿¡´Â ±×·¸°Ô ¾î·ÆÁö ¾Ê½À´Ï´Ù.    ¿©·¯ °æ¿ìÀÇ Á¶°ÇÀ» ÀÔ·Â ÇÏ·Á¸é ¹°·Ð ºñ½ÁÇÑ ¹®ÀÚ¿­ ÇÔ¼öµéÀ» ³ª¿­ Çؾ߸¸ ÇÏ°ÚÁÒ)

1. addslashes(string str)

    ÇØ´ç ¹®ÀÚ¿­ÀÌ ÀÛÀº, Å«Quote(µû¿ÈÇ¥) , ¿ª½½·¡½¬(\)¿Í °°Àº ¹®ÀÚ°¡ ÀÖÀ» °æ¿ì ÀÌ ¹®ÀÚ ¾Õ¿¡ ¿ª½½·¡½¬(\)¸¦

    Ãß°¡Çؼ­ ¸®ÅÏÇÕ´Ï´Ù.

              
2. bin2hex(string str)

    ÇØ´ç ¹®ÀÚ¿­À» 2Áø¿¡¼­ 16ÁøÀ¸·Î ¹Ù²ã ¸®ÅÏÇÕ´Ï´Ù.

                                 
3. chop(string str)

    ÇØ´ç ¹®ÀÚ¿­ÀÇ µÚ ÂÊ °ø¹éÀ» Á¦°ÅÇÕ´Ï´Ù.

                                            
4. chr(int ascii)

    ÇØ´ç ascii¸¦ Æ÷ÇÔÇϴ ƯÁ¤ ¹®ÀÚ¸¦ ¸®ÅÏÇÕ´Ï´Ù.


5. chunk_split(string string, int [chunklen] , string [end] )

    ÇØ´ç ¹®ÀÚ¿­À» ÀÛÀº Å©±â·Î ÂÉ°³¼­ ¸®ÅÏÇÕ´Ï´Ù.

                                                                          
6. convert_cyr_string(string str, string from, string to)

    ÇØ´ç ¹®ÀÚ¿­À» Cyrillic ¹®ÀÚ¿¡¼­ ¶Ç ´Ù¸¥ ¹®ÀÚ·Î ¹Ù²Ù¾î ¸®ÅÏÇÕ´Ï´Ù.

        k - koi8-r
        w - windows-1251
        i - iso8859-5
        a - x-cp866
        d - x-cp866
        m - x-mac-cyrillic


7. crypt(string str, string [salt])

    ÇØ´ç ¹®ÀÚ¿­À» encryption Çü½ÄÀ¸·Î º¯È¯Çؼ­ ¸®ÅÏÇÕ´Ï´Ù.

                                                                                                                                                     
8. echo(string arg1 , string [argn] ¡¦.)

    ÇØ´ç ÇÏ´Â ÀÎÀÚ¸¦ Ãâ·ÂÇØ ÁÝ´Ï´Ù.


9. explode(string separator, string string)

    ÇØ´ç ¹®ÀÚ¿­À» separator ¹®ÀÚ¿­À» ±âÁØÀ¸·Î ³ª´²¼­ ¹è¿­·Î ÀúÀåÇÕ´Ï´Ù.

                                                                                                                                                                                   
10. flush(void)

    output bufferÀ» flushÇÕ´Ï´Ù.

                                                                                                                                                                                                  
11. get_meta_tags(string filename, int [use_include_path])
        
    ÇØ´ç ÆÄÀÏÀÇ ¸ðµç ¸ÞŸ tagÀÇ content ¼Ó¼ºÀ» °¡Á®¿Í ¹è¿­ ÇüÅ·ΠÀúÀåÇÕ´Ï´Ù.


12. htmlspecialchars(string string)

    ÇØ´çÇϴ ƯÁ¤ ¹®ÀÚ¸¦ HTML entity·Î º¯È¯Çؼ­ ¸®ÅÏÇÕ´Ï´Ù.

                                                                                                                                                                                                                            
13. htmlentities(string string)

    ÇØ´ç ÇÏ´Â ¹®ÀÚ¿­ÀÇ ¸ðµç ¹®ÀÚµéÀ» HTML entity·Î º¯È¯Çؼ­ ¸®ÅÏÇÕ´Ï´Ù.

        ¡®&¡¯ -> ¡®&amp¡¯
        ¡®"¡¯ -> ¡®&quot¡¯
        ¡®<¡¯ -> ¡®&lt¡¯
        ¡®>¡¯ -> ¡®&gt¡¯


14. implode(string glue, array pieces)

    ÇØ´ç ÇÏ´Â ¹è¿­ÀÇ ¿ø¼ÒµéÀ» ƯÁ¤ ¹®ÀÚ¿­(glue)À» ÀÌ¿ëÇؼ­ ¿¬°áÇÏ°í »õ·Î¿î ¹®ÀÚ¿­À» ¸®ÅÏÇÕ´Ï´Ù.


15. join(string glue, array pieces)

    implodeÇÔ¼ö¿Í ±â´ÉÀÌ °°½À´Ï´Ù. ÇØ´ç ¹è¿­ÀÇ ¿ø¼Ò¸¦ ¹®ÀÚ¿­À» ÀÌ¿ëÇØ ¿¬°áÇÕ´Ï´Ù.


16. ltrim(string str)

    ÇØ´ç ¹®ÀÚ¿­ÀÇ ¾Õ °ø¹éÀ» Á¦°ÅÇÕ´Ï´Ù.


17. md5(string str)

    ÇØ´ç ¹®ÀÚ¿­ÀÇ md5 hash °ªÀ» °è»êÇؼ­ ¸®ÅÏÇÕ´Ï´Ù.
                

18. nl2br(string string)

    ÇØ´çÇÏ´Â ¹®ÀÚ¿­¿¡¼­ newlineÀ» <BR>·Î ¹Ù²ã ¸®ÅÏÇÕ´Ï´Ù.


19. ord(string string)

    ÇØ´çÇÏ´Â ¹®ÀÚ¿­ÀÇ ASCII °ªÀ» ¸®ÅÏÇÕ´Ï´Ù.


20. parse_str(string str)

    ÇØ´ç ¹®ÀÚ¿­À» º¯¼ö·Î Çؼ®ÇØ ÁÝ´Ï´Ù.

21. print(string arg)

    ÇØ´ç ¹®ÀÚ¿­À» Ãâ·ÂÇÕ´Ï´Ù.

         
22. printf(string format, mixed [args]...)

    ÇØ´ç format¿¡ µû¶ó ¹®ÀÚ¿­À» Ãâ·ÂÇÕ´Ï´Ù.

                    
23. quoted_printable_decode(string str)

    quoted_printable ¹®ÀÚ¿­À» 8bit ¹®ÀÚ¿­·Î ¹Ù²ã¼­ ¸®ÅÏÇÕ´Ï´Ù.

                                           
24. quotemeta(string str)

    ÇØ´ç ÇÏ´Â ¹®ÀÚ¿­¿¡¼­ meta ¹®ÀÚµéÀ» ¹é½½·¡½¬(\)°¡ ÷°¡µÈ ¹®ÀÚ·Î ¸®ÅÏÇÕ´Ï´Ù.

                                                          
25. rawurldecode(string str)

    URL encoded ¹®ÀÚ¿­À» µðÄÚµåÇؼ­ ¸®ÅÏÇÕ´Ï´Ù.

                                                                         
26. rawurlencode(string str)

    RFC1738À» µû¸£´Â URL encode¸¦ Çؼ­ ¸®ÅÏÇÕ´Ï´Ù.
                                                                                    

27. setlocale(string category, string locale)

    locale Á¤º¸¸¦ ¼³Á¤Çؼ­ ¸®ÅÏÇÕ´Ï´Ù.

                                                                                                   
28. similar_text(string first, string second, double [percent])

    µÎ ¹®ÀÚ¿­ÀÇ ºñ½ÁÇÑ Á¡À» ã°í ¸®ÅÏÇÕ´Ï´Ù.


29. soundex(string str)

    ÇØ´ç ¹®ÀÚ¿­ÀÇ soundex key¸¦ ¸®ÅÏÇÕ´Ï´Ù.

                                                                                                                                 
30. sprintf(string format , mixed [args]¡¦)

    ÇØ´çÇÏ´Â formatÀ¸·Î ¹®ÀÚ¿­À» ¸®ÅÏÇÕ´Ï´Ù.

    Format ¾ç½Ä¿¡´Â

        % - ÇØ´ç Æ÷¸ËÀÇ ¾Õ¿¡ ºÙÀÔ´Ï´Ù.
        b - 2Áø¼ö¸¦ Ç¥ÇöÇÕ´Ï´Ù.(integer)
        c - ASCII °ªÀ» Ç¥ÇöÇÕ´Ï´Ù.(integer)
        d - 10Áø¼ö¸¦ Ç¥ÇöÇÕ´Ï´Ù.(integer)
        f - ½Ç¼ö¸¦ Ç¥ÇöÇÕ´Ï´Ù.(double)
        o - 8Áø¼ö¸¦ Ç¥ÇöÇÕ´Ï´Ù.(integer)
        s - ¹®ÀÚ¿­À» Ç¥ÇöÇÕ´Ï´Ù.
        x - 16Áø¼ö¸¦ Ç¥ÇöÇÕ´Ï´Ù.(lowercase ¹®ÀÚµµ Æ÷ÇÔ)
        X - 16Áø¼ö¸¦ Ç¥ÇöÇÕ´Ï´Ù.(uppercase ¹®ÀÚµµ Æ÷ÇÔ)


31. strchr(string haystack, string needle)

    ÇØ´çÇÏ´Â ¹®ÀÚ°¡ óÀ½À¸·Î ³ªÅ¸³ª´Â ºÎºÐÀ» ã¾Æ ÁÝ´Ï´Ù.


32. strcmp(string str1, string str2)

    binary ¹æ½ÄÀ¸·Î ÇØ´ç ¹®ÀÚ¿­µéÀ» ºñ±³ÇÕ´Ï´Ù.


33. strcspn(string str1, string str2)

    mask¿Í ¸ÅĪµÇÁö ¾Ê´Â initial segmentÀÇ ±æÀ̸¦ ¸®ÅÏÇÕ´Ï´Ù.


34. strip_tags(string str)

    ÇØ´ç ¹®ÀÚ¿­¿¡¼­ HTML°ú PHP tag¸¦ Á¦°ÅÇÏ°í ¸®ÅÏÇÕ´Ï´Ù.


35. stripslashes(string str)

    addslashes·Î ¿ª½½·¡½¬µÈ ÇØ´ç ¹®ÀÚ¿­¿¡¼­ À̸¦ Á¦°ÅÇÏ°í ¸®ÅÏÇÕ´Ï´Ù.

    strlen(string str)
    ÇØ´ç ¹®ÀÚ¿­ÀÇ ±æÀ̸¦ ¸®ÅÏÇÕ´Ï´Ù.


36. strrpos(string haystack, char needle)

    ÇØ´ç ¹®ÀÚ¿­¿¡¼­ ãÀ» ¹®ÀÚ°¡ ³ªÅ¸³ª´Â ¸¶Áö¸· À§Ä¡¸¦ ¸®ÅÏÇÕ´Ï´Ù.


37. strpos(string haystack, string needle, int [offset])

    ÇØ´ç ¹®ÀÚ¿­ÀÌ ³ªÅ¸³ª´Â óÀ½ À§Ä¡¸¦ ¸®ÅÏÇÕ´Ï´Ù.


38. strrchr(string haystack, string needle)

    ÇØ´ç ¹®ÀÚ¿­ÀÌ ¸¶Áö¸·À¸·Î ³ªÅ¸³ª´Â À§Ä¡ ´ÙÀ½ÀÇ ¹®ÀÚ¿­À» ¸®ÅÏÇÕ´Ï´Ù.


39. strrev(string string)

    ÇØ´ç ¹®ÀÚ¿­À» reverse Çؼ­ ¸®ÅÏÇÕ´Ï´Ù.


40. strspn(string str1, string str2)

    ÇØ´ç mask¿Í ¸ÅĪ µÇ´Â initial segmentÀÇ ±æÀ̸¦ ¸®ÅÏÇÕ´Ï´Ù.


41. strstr(string haystack, string needle)

    ÇØ´ç ¹®ÀÚ¿­ÀÌ Ã³À½ ³ªÅ¸³ª´Â À§Ä¡ÀÇ ¹®ÀÚ¿­À» ¸®ÅÏÇÕ´Ï´Ù.


42. strtok(string arg1, string arg2)

    ÇØ´ç ¹®ÀÚ¿­À» tokenize Çؼ­ ¸®ÅÏÇÕ´Ï´Ù.


43. strtolower(string str)

    ÇØ´ç ¹®ÀÚ¿­À» ¼Ò¹®ÀÚ·Î ¸®ÅÏÇÕ´Ï´Ù.


44. strtoupper(string string)

    ÇØ´ç ¹®ÀÚ¿­À» ´ë¹®ÀÚ·Î ¸®ÅÏÇÕ´Ï´Ù.


45. str_replace(string needle, string str, string haystack)

    ÇØ´ç ¹®ÀÚ¿­¿¡¼­ ¿øÇÏ´Â ¹®ÀÚ¿­À» ¹Ù²Ù°í ½ÍÀº ¹®ÀÚ¿­·Î ´ëüÇؼ­ ¸®ÅÏÇÕ´Ï´Ù. 

    strtr(string str, string from, string to)

    ÇØ´ç ¹®ÀÚ¿­¿¡¼­ ¿øÇÏ´Â ¹®ÀÚ¸¦ ¹Ù²Ù°í ½ÍÀº ¹®ÀÚ·Î ´ëüÇؼ­ ¸®ÅÏÇÕ´Ï´Ù.


46. substr(string string, int start, int [length])

    ÇØ´ç ¹®ÀÚ¿­¿¡¼­ ƯÁ¤ ºÎºÐ¸¸ ¸®ÅÏÇÕ´Ï´Ù.


47. trim(string str)

    ÇØ´ç ¹®ÀÚ¿­ÀÇ ¾Õ°ú µÚ °ø¹éÀ» Á¦°ÅÇؼ­ ¸®ÅÏÇÕ´Ï´Ù.


48. ucfirst(string str)

    ÇØ´ç ¹®ÀÚ¿­ÀÇ Ã³À½ ¹®ÀÚ¸¦ ´ë¹®ÀÚ·Î ¸¸µé¾î ¸®ÅÏÇÕ´Ï´Ù.


49. ucwords(string str)

    ÇØ´ç ¹®ÀÚ¿­ÀÇ °¢ ´Ü¾îÀÇ Ã³À½ ¹®ÀÚ¸¦ ´ë¹®ÀÚ·Î ¸¸µé¾î ¸®ÅÏÇÕ´Ï´Ù.



¹®ÀÚ¿­ ÇÔ¼öÀÇ ¿¹ ¶ÇÇÑ Æû ¹®À» »ç¿ëÇؼ­ º¸¿© µå¸®°Ú½À´Ï´Ù.
ÀÌ°ÍÀº °£´ÜÈ÷ ¹®ÀÚ¿­À» ÀÔ·ÂÇØ º¸¸é ÇØ´ç ÇÔ¼öÀÇ °á°ú¸¦ È®ÀÎ ÇÒ ¼ö ÀÖ½À´Ï´Ù. 
¾Õ¿¡¼­ ¸»Çѹ٠ÀÖÁö¸¸ PHP ¹®ÀÚ¿­ ÇÔ¼ö ¿ª½Ã mysqlÀÇ ÇÔ¼ö¿Í À¯»çÇÑ ¿ªÇÒµéÀÌ ´ëºÎºÐ Á¸ÀçÇÕ´Ï´Ù.
ÀÌ°ÍÀº µÑÀÇ °°Àº ºÎºÐÀ» ´õ ½±°Ô ÀÍÈú ¼ö ÀÖ´Â ¸éÀ̱⵵ ÇÕ´Ï´Ù. ±×·³ ¸ÕÀú ¼Ò½º¸¦ È®ÀÎÇÏ°Ú½À´Ï´Ù.
¿©±â ÇÔ¼öÀÇ »ç¿ëÀº Á¤±ÔÇ¥Çö½ÄÀÌ »ç¿ëµÈ ºÎºÐµµ ÀÖÀ¸¸ç ±× ºÎºÐÀº ´ÙÀ½ Á¤±Ô Ç¥Çö½ÄÀ» º¸±â ¹Ù¶ø´Ï´Ù.


        <?php

            $array = array("$str","cry","crygood");
            //$strÀº Æû ¹®¿¡ ÀÔ·ÂÇÑ ¹®ÀÚ¿­ º¯¼öÀÔ´Ï´Ù.//

            $exp = explode("r",$str);

            $exp2 = implode("~",$array);

            $exp3 = split("[rR]{1}",$str);

            $exp4 = substr("$str",3,-1);

            $exp5 = strchr($str,"c");

            $exp6 = strrchr($str,"c");

            $exp7 = strpos($str,"c");

            $exp8 = strrpos($str,"c");

            $exp9 = strlen($str);

            $exp10 = strtolower($str);

            $exp11 = strtoupper($str);

            $exp12 = ucfirst($str);

            $exp13 = ucwords($str);

            $exp14 = strrev($str);

            $exp15 = strtr($str,"cry","byeju");

            $exp16 = str_replace("cry","hicry",$str);

            $exp17 = quotemeta($str);

            $exp18 = ord($str);

            $exp19 = chr($exp18);

            echo("<b>STRING_Test</b><br><br>");

            if($chanl == sub)

            {

               // ¸¸¾à ¹®ÀÚ¿­ º¯¼ö°¡ Àü´ÞµÇÁö ¾ÊÀ¸¸é ½ÇÇàµÇÁö ¸øÇÏ°Ô Çϱâ À§ÇÔÀÔ´Ï´Ù.//

               echo("explode[0] : $exp[0]<br>

                     explode[1] : $exp[1]<br>

                     implode : $exp2<br>

                     split[0]  : $exp3[0]<br>

                     split2[1] : $exp3[1]<br>

                     substr : $exp4<br>

                     strchr : $exp5<br>

                     strrchr : $exp6<br>

                     strpos : $exp7<br>

                     strrpos : $exp8<br>

                     strlen : $exp9<br>

                     strtolower :$exp10<br>

                     strtoupper : $exp11<br>

                     ucfirst : $exp12<br>

                     ucwords : $exp13<br>

                     strrev : $exp14<br>

                     strtr : $exp15<br>

                     str_replace : $exp16<br>

                     quotemeta : $exp17<br>

                     ord : $exp18<br>

                     chr : $exp19<br>

               ");

            }

            echo(" 

                <form method=post action=$PHP_SELF>
                    <input type=text size=44 name=str>
                    <input type=hidden name=chanl value=sub>
                    <input type=submit value=Sub>
                </form>
            ");

        ?>


À§ ¼Ò½º´Â ´Ü¼øÈ÷ ÇÔ¼öÀÇ ³ª¿­°ú Àü´ÞµÈ ¹®ÀÚ¿­À» ¹®ÀÚ¿­ ÇÔ¼ö¸¦ ÀÌ¿ëÇؼ­ È­¸é¿¡ »Ñ·ÁÁÖ´Â ¿ªÇÒ¸¸ ÇÒ»Ó ÀÔ´Ï´Ù.
´ÜÁö ÇÔ¼öÀÇ ÀÛµ¿À» È®ÀÎ Çϱâ À§ÇÑ ½ºÅ©¸³Æ® ÀÔ´Ï´Ù.
¿©·¯ °¡Áö¸¦ ÀÔ·ÂÇØ º¸°í ¹®Á¦Á¡°ú °¢°¢ÀÇ ÇÔ¼öµéÀÇ Æ¯Â¡µéÀ» ´Ù½Ã È®ÀÎÇϱ⠹ٶø´Ï´Ù.
¼Ò½º¿¡ °üÇÑ ¼³¸íÀº ÇÏÁö ¾Ê°Ú½À´Ï´Ù. ¿©·¯ºÐµéµµ ¾Æ½Ã´Ù½ÃÇÇ À§ ¼Ò½º´Â ´ÜÁö ÇÔ¼öÀÇ ³ª¿­ ÀÔ´Ï´Ù.
¾Æ·¡ °á°ú¿Í ºñ±³Çϸ鼭 ÀÍÈ÷±â ¹Ù¶ø´Ï´Ù.

±×¸² 8-108¿¡¼­ °¢°¢ÀÇ ÇÔ¼öµéÀÌ Ã³¸®ÇÏ´Â ¹®ÀÚ¿­ÀÇ °á°ú¸¦ È®ÀÎÇϼ¼¿ä.

Regular expression ÇÔ¼ö

¿©·¯ °¡Áö º¹ÀâÇÑ ¹®ÀÚ¿­ ´Ù·ç±â À§ÇØ PHP´Â Á¤±Ô Ç¥Çö ÇÔ¼ö°¡ ÀÖ½À´Ï´Ù.
¹®ÀÚ¿­ ó¸® ÇÔ¼ö·Î ÇØ°á µÉ ¼ö ¾ø´Â ºÎºÐÀ» Á¤±Ô Ç¥Çö ÇÔ¼ö¸¦ ÀÌ¿ë Çؼ­ °£´ÜÈ÷ ÇØ°áÇÕ´Ï´Ù.

 

1. ereg(string pattern, string string, array [regs])

    ÇØ´ç ¹®ÀÚ¿­¿¡¼­ ÁÖ¾îÁø Á¤±Ô Ç¥Çö½Ä ÆÐÅÏ°úÀÇ ÀÏÄ¡ µÇ´Â ¹®ÀÚ¿­À» °Ë»öÇÕ´Ï´Ù.

2. ereg_replace(string pattern, string replacement, string string)

    ÇØ´ç ¹®ÀÚ¿­¿¡¼­ ÁÖ¾îÁø Á¤±Ô Ç¥Çö½Ä ÆÐÅÏ°úÀÇ ÀÏÄ¡ µÇ´Â ¹®ÀÚ¿­À» °Ë»öÇÏ°í ¹Ù²Ü ¹®ÀÚ¿­·Î ´ëüÇÕ´Ï´Ù.


3. eregi(string pattern, string string, array [regs])

    ereg() ÇÔ¼ö¿Í µ¿ÀÏÇϳª °Ë»öÀ» ÇÒ ¶§ ´ë, ¼Ò ¹®ÀÚ¸¦ ±¸ºÐÇÏÁö ¾Ê½À´Ï´Ù.


4. eregi_replace(string pattern, string replacement, string string)

    ereg_replace()¿Í µ¿ÀÏÇϳª °Ë»öÀ» ÇÒ ¶§ ´ë, ¼Ò ¹®ÀÚ¸¦ ±¸ºÐÇÏÁö ¾Ê½À´Ï´Ù.

                                                         
5. split(string pattern, string string, int [limit])

    ÁöÁ¤ÇÑ ÆÐÅÏ°ú ÀÏÄ¡ÇÏ´Â ¹®ÀÚ¿­À» °æ°è·Î ÇØ´ç ¹®ÀÚ¿­À» ³ª´©°í ¹è¿­¿¡ ÀúÀåÇÕ´Ï´Ù.


   
Á¤±Ô Ç¥Çö½Ä ÆÐÅÏÀÇ Á¾·ù
                                                                          

Á¤±Ô Ç¥Çö½ÄÀº ÁÖ·Î °Ô½ÃÆÇÀÇ ÀÔ·Â »çÇ׿¡¼­ »ç¿ë µÇ¾î Áý´Ï´Ù. °¡·É ºñ¹Ð¹øÈ£³ª ±âŸ À̸§ µîÀ» ÀÔ·ÂÇÒ ¶§

ÁÖ¾îÁø Á¶°Ç¿¡ ¸Â°Ô ÀÔ·ÂÇÏ°Ô²û ÇÏ´Â °ÍÀÔ´Ï´Ù.

    " . " - ÀÌ Ç¥ÇöÀº c.yó·³ Ç¥ÇöÇϱ⵵ ÇÏ°í .cy·Î Çϱ⵵ ÇÕ´Ï´Ù.
              Áï, ÀüÀÚ´Â c·Î ½ÃÀÛ Çϸ鼭 y·Î ³¡³ª´Â ¹®ÀÚ¸¦ ³ªÅ¸³À´Ï´Ù.
              (cry , cay , cat) ¹°·Ð ¿©±â¼­ . Àº ÇÑ ¹®ÀÚ¸¸À» °¡¸®Å°´Â °ÍÀÔ´Ï´Ù.
              ÈÄÀÚ´Â ¹®ÀÚ¿­ÀÌ cy·Î ³¡³ª´Â ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù(xcy, xcy). À߸øµÈ Ç¥ÇöÀº ÀüÀÚÀÇ °æ¿ì
              csdy, cfgy , cyÀÔ´Ï´Ù. " . " Àº Çѹ®ÀÚ ¸¸À» ³ªÅ¸³À´Ï´Ù.

    " ? " - ?¾ÕÀÇ ¹®ÀÚ°¡ Àְųª ¾øÀ½À» ³ªÅ¸³À´Ï´Ù. Áï, sc?y ´Â sy , scy , scyf , frsy ¡¦¿Í ÀÏÄ¡ÇÕ´Ï´Ù.          

    " + " - +´Â ¾ÕÀÇ ¹®ÀÚ¸¦ °¡¸®Å°¸ç ÃÖ¼Ò Çϳª ÀÌ»óÀÇ ¹®ÀÚÀÓÀ» ³ªÅ¸³À´Ï´Ù.
              Áï, c+ry´Â cry, ccry, cccry, cryhj ¡¦ ¿Í ÀÏÄ¡ÇÕ´Ï´Ù.

    " * " - * ´Â ¾ÕÀÇ ¹®ÀÚ°¡ ¾ø°Å³ª Çϳª ÀÌ»óÀÇ ¹®ÀÚÀÓÀ» ³ªÅ¸³À´Ï´Ù.
              Áï, c*ry ´Â ry, cry, cccry ¡¦ °ú ÀÏÄ¡ÇÕ´Ï´Ù. ¶Ç cry* ´Â y°¡ ¾ø°Å³ª Çϳª ÀÌ»ó ¹®ÀÚÀÓÀ» ³ªÅ¸³À´Ï´Ù.
              cr, cry, cry, cryyy ¡¦. ¿Í ÀÏÄ¡ÇÕ´Ï´Ù.

    " $ " - $´Â ÇØ´ç ¹®ÀÚ¿­ÀÇ ¸¶Áö¸· ºÎºÐÀ» °¡¸®Åµ´Ï´Ù. Áï, c?ry$ ´Â ry·Î ³¡³ª´Â ¹®ÀÚ¿­¿¡¼­ ¾ÕÀÇ ¹®ÀÚ°¡ c°¡
              Àְųª ¾ø´Â ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù. 
              cry , ry , skycry ¡¦¿Í ÀÏÄ¡ÇÕ´Ï´Ù. c?r+$ ´Â ¾ÕÀÇ ¹®ÀÚ c °¡ Àְųª ¾ø´Â ¹®ÀÚÀ̸ç r·Î Àû¾îµµ ÇϳªÀÌ»ó
              ³¡³ª´Â ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù. r , cr , crr , crrr ¡¦ ¿Í ÀÏÄ¡ÇÕ´Ï´Ù.
                                                                                            
    " ^ " - ^ ´Â µÚ ¹®ÀÚ¿­·Î ½ÃÀ۵Ǵ ¸ðµç ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù.
              Áï, ^cry ´Â cry is good, cry is very good, crypdf ¡¦ ¿Í ÀÏÄ¡ÇÕ´Ï´Ù. 
              ¶Ç ^cry?df´Â y°¡ Àְųª ¾ø´Â crydf , crdf·Î ½ÃÀÛÇÏ´Â ¸ðµç ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù. 
              crydf is good, crdfgg ¡¦¿Í ÀÏÄ¡ÇÕ´Ï´Ù. 


    ÀÌ·¸°Ô ÀÌ ±âÈ£µéÀº »óÈ£ °°ÀÌ »ç¿ëÇؼ­ ¹®ÀÚ¿­À» Ç¥ÇöÇÕ´Ï´Ù.

                                                                                                 
    " [ ] " - [ ] ´Â ÀÌ ¾ÈÀÇ ¹®ÀÚ Áß¿¡ ÇϳªÀÇ ¹®ÀÚ¸¦ Ç¥ÇöÇÕ´Ï´Ù. ±×¸®°í [ ] ¾ÈÀÇ ¹®ÀÚÀÇ Ç¥ÇöÀº
             "-" ¸¦ »ç¿ëÇؼ­ ÇÕ´Ï´Ù. 
             Áï, [a-z] ´Â ¿µ¹®ÀÇ ¼Ò¹®ÀÚ ÇѱÛÀÚ¸¦ Æ÷ÇÔÇÏ´Â ¸ðµç ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù.
             A2sdr , skycry , cry , zzzz ¡¦. ¿Í ÀÏÄ¡ÇÕ´Ï´Ù. 
             ¶Ç [a-zA-Z0-9] ´Â ¿µ¹® ´ë,¼Ò¹®ÀÚ ¿Í ½ÊÁø¼ö ÇÑÀÚ¸¦ Æ÷ÇÔÇÏ´Â ¸ðµç ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù.
             a4df, Cry44 is passw , 4ded ¡¦ µî°ú ÀÏÄ¡ÇÕ´Ï´Ù.  
             [cC][yY] ´Â cy , cY , Cy , CY ¸¦ Æ÷ÇÔÇÏ´Â ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù. Cycap , Cyclub ¡¦ µî°ú ÀÏÄ¡ÇÕ´Ï´Ù. 
             ¸¸¾à ÇØ´çÇÏ´Â ¹®ÀÚ¸¦ Á¦¿ÜÇÑ ¹®ÀÚ¿­°úÀÇ ÀÏÄ¡¸¦ ³ªÅ¸³»·Á¸é ^±âÈ£¸¦ [] ¾È¿¡ »ç¿ëÇÕ´Ï´Ù. 
             [^a-z]´Â ¿µ¹® ¼Ò¹®ÀÚ¸¦ Á¦¿ÜÇÑ ÇѱÛÀÚ¸¦ Æ÷ÇÔÇÏ´Â ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù.
             Cry44, skycryGood, 444 is passw ¡¦ ¿Í ÀÏÄ¡ÇÕ´Ï´Ù. 
             ¹°·Ð ¿µ¹® ÀÚüÀÇ ÀÔ·ÂÀ» ÇÏÁö ¸øÇÏ°Ô ÇÏ·Á¸é [^a-zA-Z]·Î Ç¥ÇöÇÒ ¼ö ÀÖ½À´Ï´Ù.
             [ ] ´Â ÀÏÁ¤ÇÑ ¹®ÀÚÀÇ Ç¥ÇöÀº °£´ÜÇÏ°Ô Ç¥ÇöÇÒ ¼öµµ ÀÖ½À´Ï´Ù. Ŭ·¡½ºÈ­µÈ ¹æ¹ýÀ» »ç¿ëÇÕ´Ï´Ù. 
             Áï, [[:space:]]´Â °ø¹é ¹®ÀÚ¸¦ ³ªÅ¸³À´Ï´Ù ( ) ¿Í ÀÏÄ¡ÇÕ´Ï´Ù.
             [[:digit:]]´Â ¼ýÀÚ Çϳª¸¦ ³ªÅ¸³À´Ï´Ù. [0-9]¿Í ÀÏÄ¡ÇÕ´Ï´Ù.
             [[:alpha:]]´Â ¿µ¹® ¾ËÆĺª Çϳª¸¦ ³ªÅ¸³À´Ï´Ù. [a-zA-Z] , [a-Z]¿Í ÀÏÄ¡ÇÕ´Ï´Ù.
             [[:alnum:]]´Â ¿µ¹® ¾ËÆĺª ¹®ÀÚ¿Í ¼ýÀÚ Áß Çϳª¸¦ ³ªÅ¸³À´Ï´Ù. [a-zA-Z0-9]¿Í ÀÏÄ¡ÇÕ´Ï´Ù.

                                                                                                                                                  
    " { } " - { }´Â {¼ýÀÚ}·Î Ç¥ÇöÇϸç Áß°ýÈ£ ¾ÈÀÇ ¼ýÀÚ´Â ¾ÕÀÇ ¹®ÀÚÀÇ °³¼ö¸¦ ³ªÅ¸³À´Ï´Ù.
             C{4}ry´Â C°¡ ry ¾Õ¿¡ 4°³ Á¸ÀçÇÏ´Â ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù. 
             CCCCry¸¦ ³ªÅ¸³À´Ï´Ù. C{4,}ry´Â C°¡ ry ¾Õ¿¡ Àû¾îµµ 4°³ ÀÌ»óÀÎ ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù.
             CCCCry , CCCCCry , CCCCCCry ¡¦ ¿Í ÀÏÄ¡ÇÕ´Ï´Ù.
             C{1,4}ry ´Â C °¡ ry ¾Õ¿¡ 1 ~ 4°³ Á¸ÀçÇÏ´Â ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù.
             Cry , CCry , CCCry , CCCCry ¿Í ÀÏÄ¡ÇÕ´Ï´Ù.

    " ( ) " - ( ) ´Â ÀÌ ¾ÈÀÇ ¹®ÀÚ¸¦ ±×·ìÈ­ÇÕ´Ï´Ù.
             sky(cry)* ´Â sky µÚ¿¡ cry °¡ Çϳª ÀÌ»ó Àְųª ¾ø´Â ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù.
             sky , skycry is good , skycrycrydd ¡¦. ¿Í ÀÏÄ¡ÇÕ´Ï´Ù.

    " | " - | ´Â OR ¿¬»êÀ» ³ªÅ¸³» ÁÝ´Ï´Ù.
             sky|cry ´Â sky ³ª cry ¸¦ ³ªÅ¸³»´Â ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù. sky is good , cry is good..¿Í ÀÏÄ¡ÇÕ´Ï´Ù.
             sky(cry|g)* ´Â sky µÚ¿¡ cry ³ª g °¡ ¾ø°Å³ª Çϳª ÀÌ»ó Á¸ÀçÇÏ´Â ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù.
             sky , skycry , sky is good , skygjjh ¡¦ µî°ú ÀÏÄ¡ÇÕ´Ï´Ù.

                                        
    Ư¼ö ±âÈ£ ÆÐÅÏ¿¡ ºñ±³Çϱâ - 
             Ư¼ö ±âÈ£ " ^  .  [ ]  $  ( ) |  *  +  ?  { }  ¡¬ " ¾Õ¿¡ ¡¬¸¦ ºÙ¿© Ç¥ÇöÇÕ´Ï´Ù.
             ÇÏÁö¸¸ [ ] ¾È¿¡¼­ Ư¼ö ±âÈ£¸¦ »ç¿ëÇÒ °æ¿ì ¡¬¸¦ ºÙÀÌÁö ¾Ê°í ±×³É Ç¥ÇöÇÕ´Ï´Ù.
             ¡¬$+ ´Â ¹®ÀÚ¿­ ¾Õ¿¡ $ ±âÈ£°¡ Çϳª ÀÌ»ó Æ÷ÇÔµÈ ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù.
             $cry , $$$sky ¡¦ µî°ú ÀÏÄ¡ÇÕ´Ï´Ù.
             [^.[]?*{}/¡¬] ´Â ¹®ÀÚ¿­ Áß¿¡ "^" , " ." , " [" , " ]" , "? " , " * " , " { " ,
             " } " , "/ " , "¡¬"¹®ÀÚ°¡ Æ÷ÇÔµÈ ¹®ÀÚ¿­À» ³ªÅ¸³À´Ï´Ù. Hi? , {cry} , ¡¦ µî°ú ÀÏÄ¡ÇÕ´Ï´Ù.

Image ÇÔ¼ö

PHP´Â À̹ÌÁö ÇÔ¼ö¸¦ »ç¿ëÇؼ­ »õ·Î »ý¼ºÇϰųª ¿©·¯ ÇüÅ·Π¸¸µé ¼ö ÀÖ½À´Ï´Ù.    ÀÌ ÇÔ¼ö¸¦ »ç¿ëÇϱâ À§Çؼ­´Â GD ¶óÀ̺귯¸®¸¦ ¼³Ä¡ÇØ¾ß µÇ°í ÀÌ ¶óÀ̺귯¸® ¾øÀÌ »ç¿ë°¡´ÉÇÑ ÇÔ¼öµµ ÀÖ½À´Ï´Ù.    Áö¿øÇÏ´Â À̹ÌÁö È®ÀåÀÚ´Â jpeg , gif , png µîÀÌ ÀÖ½À´Ï´Ù.    GD¸¦ ±¸ÇÏ·Á¸é www.boutell.com/gd/ ¿¡¼­ ´Ù¿î ¹ÞÀ» ¼ö ÀÖ½À´Ï´Ù.    (GD 1.5¹öÀü ÀÌÇÏ¿¡¼­ GIF¸¦ Áö¿øÇÏ¸ç ±× ÀÌÈÄ ¹öÀü¿¡¼­´Â GIF¸¦ Áö¿øÇÏÁö ¾Ê½À´Ï´Ù.)

1. getimagesize(string filename, array [imageinfo]);

    jpeg , gif , png ÆÄÀÏÀÇ À̹ÌÁö Å©±â¸¦ ±¸Çؼ­ ¸®ÅÏÇÕ´Ï´Ù. 
    GD ¶óÀ̺귯¸® ¾øÀÌ »ç¿ë °¡´É Çϸç 4°³ÀÇ ¹è¿­ ÇüÅ·Π¸®ÅÏÇÕ´Ï´Ù.

        0 - ÇØ´ç À̹ÌÁö width(Çȼ¿ ´ÜÀ§)
        1- ÇØ´ç À̹ÌÁö height
        2- flag ( 1 - gif , 2 - jpg , 3 - index)
        3- ÇØ´ç À̹ÌÁöÀÇ width , height¸¦ ¹®ÀÚ·Î ¸®ÅÏ(width = 344 , height = 342)


2. imagecreate(int x_size , int y_size);

    ÇØ´ç x, y (°¡·Î , ¼¼·Î)Å©±âÀÇ »õ·Î¿î À̹ÌÁö¸¦ »ý¼ºÇÕ´Ï´Ù.(Çȼ¿ ´ÜÀ§)


3. imagecreatefromgif(string filename);

    ÇØ´ç ÆÄÀÏ À̸§À» °¡Áø À̹ÌÁö¸¦ °¡Áö°í ¿Í¼­ »õ·ÎÀÌ À̹ÌÁö¸¦ »ý¼ºÇϸç, ±âÁ¸ÀÇ À̹ÌÁö Å©±â´Â °°½À´Ï´Ù.
    (GD1.5 ÀÌÇÏ ¹öÀü¿¡¼­ »ç¿ë)


4. imagegif(int im , string filename);

    »õ·ÎÀÌ »ý¼ºÇÑ À̹ÌÁö¸¦ ºê¶ó¿ìÀú ¶Ç´Â ÆÄÀÏ·Î Ãâ·ÂÇÕ´Ï´Ù.(GD 1.5ÀÌÇÏ ¹öÀü¿¡¼­ »ç¿ë)


5. imagepng(int im , string filename);

    »õ·Ó°Ô »ý¼ºÇÑ À̹ÌÁö¸¦ ºê¶ó¿ìÀú³ª ÆÄÀÏ·Î Ãâ·ÂÇÕ´Ï´Ù.
    (GD 1.5 ÀÌÈÄ ¹öÀü¿¡¼­ GIF À̹ÌÁö ´ë½Å PNG¸¦ »ç¿ëÇÕ´Ï´Ù.)


6. imagedestroy(int im);

    imagecreate( ) ÇÔ¼ö·Î »ý¼ºµÈ À̹ÌÁö°¡ Á¡À¯ÇÏ´Â ¸Þ¸ð¸®¸¦ ÇØÁ¦ÇÕ´Ï´Ù.


7. imagecolorallocate(int im , int red , int green , int blue);

    ÇØ´ç À̹ÌÁö¿¡ RGB °ªÀ» ¸®ÅÏÇÕ´Ï´Ù.

        (192,192,192) - ȸ»ö
        (0,0,0) - °ËÁ¤
        (255,255,255) - Èò»ö
        (255,0,0) - Àû»ö

    ¼Ò½º 3Çà¿¡¼­ PNG À̹ÌÁö(100x100)¸¦ »ý¼ºÇÏ°í 4Çà¿¡¼­ ÇØ´ç À̹ÌÁöÀÇ ¹è°æÀ» red·Î ¼³Á¤ÇÕ´Ï´Ù.
    7Çà¿¡¼­ PNG À̹ÌÁö¸¦ ºê¶ó¿ìÀú¿¡ Ãâ·ÂÇÏ°í 8Çà¿¡¼­ ÇØ´ç À̹ÌÁö¸¦ ¸Þ¸ð¸®¿¡¼­ Á¦°ÅÇÕ´Ï´Ù.

 
8. imagerectangle(int im , int x1 , int y1 , int x2 , int y2 , int col);

    x, y 4°³ ÀÎÀÚ¸¦ ÁÂÇ¥·Î »ç°¢ÇüÀ» ÇØ´ç »öÀ¸·Î Ãâ·ÂÇÕ´Ï´Ù.
    (x1, y1Àº »ç°¢Çü ÁÂÃø ÁÂÇ¥ÀÌ°í x2 , y2´Â »ç°¢Çü ¿ìÃø ÁÂÇ¥ÀÔ´Ï´Ù.)
    col ÀÎÀÚ´Â imagecolorallocate( ) ÇÔ¼ö¸¦ »ç¿ëÇÑ º¯¼ö¸¦ Àû¾î »ç¿ëÇÕ´Ï´Ù.

    ¼Ò½º 4 , 5ÇàÀÇ °æ¿ì 4ÇàÀÌ ¿ì¼±Çؼ­ ÇØ´ç À̹ÌÁöÀÇ ¹è°æÀ» ÁöÁ¤ÇÕ´Ï´Ù.
    7 ~ 10ÇàÀÇ ÇÔ¼ö ¼öÇàÀ¸·Î Àû»ö »ç°¢ÇüÀÌ 4°³ ¸¸µé¾î Áý´Ï´Ù.

  
9. imagefilledrectangle(int im , int x1 , int y1 , int x2 , int y2 , int col);

    8¹ø ÇÔ¼ö¿Í ±â´ÉÀº ºñ½ÁÇÏÁö¸¸ ÀÌ ÇÔ¼ö´Â ÇØ´ç ÀÎÀڷκÎÅÍ ÁÂÇ¥¸¦ ¾ò°í, ÇØ´ç »ç°¢ÇüÀ» ¸¸µé¾î ÁöÁ¤ÇÑ
    »öÀ¸·Î »ç°¢ÇüÀ» »öÄ¥ÇÕ´Ï´Ù.

    ¼Ò½º 8 , 10ÇàÀÇ ¼öÇàÀ¸·Î ÇØ´ç »ç°¢ÇüÀÌ Àû»öÀ¸·Î Ä¥ÇØÁ® Ãâ·ÂµË´Ï´Ù.

 
10. imagepolygon(int im , array points , int num_points , int col);

    ÇØ´ç ¹è¿­ÀÇ Æ÷ÀÎÅÍ ¿Í ²ÀÁöÁ¡ÀÇ ¼ö·Î ´Ù°¢ÇüÀ» Ãâ·ÂÇÕ´Ï´Ù.
    ¹è¿­ÀÇ Æ÷ÀÎÅÍ´Â ¼ø¼­´ë·Î ²ÀÁöÁ¡ÀÇ x, y ÁÂÇ¥¸¦ ÁöÁ¤ÇÕ´Ï´Ù.

    ¼Ò½º 6ÇàÀÇ ¹è¿­À» ÀÌ¿ëÇØ 8ÇàÀÇ ´Ù°¢ÇüÀ» Ãâ·ÂÇÕ´Ï´Ù.


11. imagefilledpolygon(int im , array points , int num_points , int col);

    ÇØ´ç ´Ù°¢ÇüÀ» ÁöÁ¤ÇÑ »öÀ¸·Î Ä¥Çؼ­ Ãâ·ÂÇÕ´Ï´Ù.

    ¼Ò½º 8ÇàÀÇ ½ÇÇàÀ¸·Î ÇØ´ç ´Ù°¢ÇüÀÌ Àû»öÀ¸·Î Ä¥ÇØÁ® Ãâ·ÂµË´Ï´Ù.


12. imageline(int im , int x1 , int y1 , int x2 , int y2 , int col);

    ÇØ´ç À̹ÌÁö ¾È¿¡ ÁöÁ¤ÇÑ »öÀ¸·Î ¼±À» ±×¾î ÁÝ´Ï´Ù.

    ¼Ò½º 7, 8ÇàÀÇ °á°ú·Î x Ç¥ÀÇ ¼±À» Ãâ·ÂÇÕ´Ï´Ù.


13. imagedashedline(int im , int x1 , int y1 , int x2 , int y2 , int col);

    ÇØ´ç À̹ÌÁö¿¡ Àü¼±À» ±×¸³´Ï´Ù.

    ¼Ò½º 7 , 8ÇàÀÇ ½ÇÇàÀ¸·Î Á¡¼± x¸¦ Ãâ·ÂÇÕ´Ï´Ù.

 
14. imagesetpixel(int im , int x , int y , int col);

    x ,y ÀÎÀÚ¸¦ ÁÂÇ¥·Î ÇØ´ç À§Ä¡¿¡ ÁöÁ¤ÇÑ »öÀ¸·Î Á¡À» Âï½À´Ï´Ù.

    ¼Ò½º¿¡¼­ 13Çà for¹®ÀÇ ½ÇÇàÀ¸·Î ÇÔ¼ö °á°ú¿¡¼­ ÁøÇÏ°Ô Ç¥½ÃµÈ Á¡¼±ÀÌ Ãâ·Â µË´Ï´Ù.
    ÀÌ°ÍÀº Çȼ¿ÀÌ ÃÎÃÎÈ÷ ÀÖÀ» ¶§ ±×³É ¼±À» ±ß´Â °Í°ú °°ÀÌ º¸ÀÔ´Ï´Ù. 

    7~11ÇàÀÇ °æ¿ì´Â ÀÛÀº Çȼ¿·Î Ãâ·ÂµÇ´Â°É º¼¼ö ÀÖ½À´Ï´Ù.


15. imagestring(int im , int font , int x , int y , string , int col);

    ÇØ´ç x ,y À§Ä¡¿¡ ÁöÁ¤ÇÑ »öÀÇ ¹®ÀÚ¿­À» Ãâ·ÂÇÕ´Ï´Ù.

    7ÇàÀÇ fontÀÎÀÚ Å©±â ¸¸Å­ ÇØ´ç ¹®ÀÚ¿­ÀÌ Ãâ·ÂµË´Ï´Ù.

 
16. imagestringup(int im , int font , int x , int y , string , int col);

    15¹ø°ú °°À¸³ª ÇØ´ç ¹®ÀÚ¿­À» ¼¼·Î·Î Ãâ·ÂÇÕ´Ï´Ù.

    ¼Ò½º 7ÇàÀÇ ¼öÇàÀ¸·Î ¹®ÀÚ¿­ÀÌ ¼¼·Î·Î Ãâ·ÂµË´Ï´Ù.


17. imagechar(int im , int font , int x , int y , char , int col);

    15,16¹ø ÇÔ¼ö¿Í °°Áö¸¸ ¹®ÀÚ¿­ÀÌ ¾Æ´Ñ ¹®ÀÚ Çϳª¸¸À» Ãâ·ÂÇÕ´Ï´Ù.

    ¼Ò½º¿¡¼­ 7ÇàÀÇ ¹®ÀÚ¿­ÀÇ Ã³À½ ij¸¯Å͸¸ Ãâ·Â µÇ´Â°É º¼ ¼ö ÀÖ½À´Ï´Ù.

 
18. imagecharup(int im , int font , int x , int y , char , int col);

    ÇØ´ç ¹®ÀÚ¸¦ È­¸é¿¡ ÁöÁ¤ÇÑ »öÀ¸·Î ¼¼·Î·Î Ãâ·ÂÇÕ´Ï´Ù.

            
19. imagesx(int im);

    ÇØ´ç À̹ÌÁöÀÇ width¸¦ ±¸ÇØ ÁÝ´Ï´Ù.

                               
20. imagesy(int im);

    ÇØ´ç À̹ÌÁöÀÇ height¸¦ ±¸ÇØ ÁÝ´Ï´Ù.

                                                     
21. imagearc(int im , int cx , int cy , int w , int h , int s , int e ,int col);

    ÀÎÀڵ鿡 ÇØ´çÇϴ Ÿ¿øÀ» Ãâ·ÂÇÕ´Ï´Ù.

        cx,cy - Ÿ¿øÀÇ Á᫐ ÁÂÇ¥
        w - Ÿ¿øÀÇ ³Êºñ
        h - Ÿ¿øÀÇ ³ôÀÌ
        s- Ÿ¿øÀÇ ½ÃÀÛÁ¡(´ÜÀ§´Â °¢À¸·Î Ç¥½Ã)
        e- Ÿ¿øÀÇ ³¡Á¡

    ¼Ò½º 7~10ÇàÀÇ ½ÇÇàÀ¸·Î 4°³ÀÇ Å¸¿øÀÌ »ý¼ºµÇ°í È­¸é¿¡ Ãâ·ÂµË´Ï´Ù.

 
22. imagefill(int im , int x , int y , int col);

    ÁÂÇ¥°¡ Æ÷ÇԵǴ ¿µ¿ªÀ» ÁöÁ¤ÇÑ »öÀ¸·Î »öÄ¥ÇÕ´Ï´Ù.

    ¼Ò½º 9ÇàÀÇ ÁÂÇ¥¿¡ ÇØ´çÇÏ´Â ºÎºÐÀÌ Àû»öÀ¸·Î »öÄ¥µÇ¾î Ãâ·ÂµË´Ï´Ù.

 
23. imagecolortransparent(int im , int col);

    ÇØ´ç À̹ÌÁöÀÇ Åõ¸í ó¸® »ö±òÀ» ¼³Á¤ÇÕ´Ï´Ù.

    ¼Ò½º 14Çà¿¡ ÀÇÇØ Àû»ö ºÎºÐÀ» Åõ¸íÇÏ°Ô Ãâ·ÂÇÕ´Ï´Ù.


23. imagecopyresized(int dst_im, int src_im, int dst x, int dst y, 

    int src x, int src y, int dst w, int dst h, int src w, int src h);
    ¿øº» À̹ÌÁöÀÇ Æ¯Á¤ ºÎºÐÀ» ´ë»ó À̹ÌÁö·Î copyÇÕ´Ï´Ù.

        dst_im - ´ë»ó À̹ÌÁö
        src_im - ¿øº» À̹ÌÁö
        src x, y - ¿øº» À̹ÌÁö ÁÂÃø »ó´Ü ÁÂÇ¥
        src w,h - ¿øº» À̹ÌÁö °¡·Î¿Í ¼¼·Î Å©±â

                                                                                           
24. imageTTFText(int im, int size, int angle, int x, int y, int col, str fontfile, str text);

    Æ®·ç ŸÀÔ ÆùÆ®¸¦ »ç¿ëÇؼ­ À̹ÌÁö¿¡ ÇØ´ç ¹®ÀÚ¿­À» Ãâ·ÂÇÕ´Ï´Ù.
    (ÀÌ ÇÔ¼ö¸¦ »ç¿ëÇϱâ À§Çؼ­´Â FreeType ¶óÀ̺귯¸®¸¦ GD¿Í °°ÀÌ ¼³Ä¡ÇØ¾ß ÇÕ´Ï´Ù.) 


25. imageTTFBBox(int size, int angle, str fontfile, str text);

    ¹®ÀÚ¿­¿¡ ÇØ´çÇÏ´Â À§Ä¡¸¦ Çȼ¿ ´ÜÀ§¸¦ ´ãÀº ¹è¿­·Î ¸®ÅÏÇÕ´Ï´Ù.
    (FreeType ¶óÀ̺귯¸® ¼³Ä¡ ½Ã »ç¿ë °¡´É)

                                                                                                                                         
26. imagecolorat(int im , int x , int y);

    ÇØ´ç ÁÂÇ¥¿¡ À§Ä¡ÇÑ Çȼ¿ÀÌ °¡Áö°í ÀÖ´Â »öÀÇ À妽º¸¦ ¸®ÅÏÇÕ´Ï´Ù.
    À妽º °ª - GIFÀÇ °æ¿ì 0~255


27. imagecolorsforindex(int im , int index);

    ÇØ´ç À̹ÌÁöÀÇ Ä÷¯ À妽ºÀÇ RGB°ªÀ» ¹è¿­ ÇüÅ·Π¸®ÅÏÇÕ´Ï´Ù.

                                                                                                                                                                           
28. imagecolorexact(int im , int red , int green ,int blue);

    ƯÁ¤ »öÀÇ colorÀ妽º °ªÀ» ¸®ÅÏÇÕ´Ï´Ù.

                                                                                                                                                                                          
29. imagecolorclosest(int im , int red , int green , int blue);

    ÇØ´ç RGB¿Í Á¦ÀÏ ÀÏÄ¡ÇÏ´Â color À妽º °ªÀ» ¸®ÅÏÇÕ´Ï´Ù.


30. imagecolorset(int im , int index , int red , int green , int blue);

    ÇØ´ç color À妽º¿¡ ÇØ´çÇÏ´Â »öÀ» red , green , blue ÀÎÀÚ·Î ÁöÁ¤ÇÑ »öÀ¸·Î º¯È¯ÇÕ´Ï´Ù.

                                                                                                                                                                                                                    
31. imagecolorresolve(int im , int red , int green , int blue);

    ÇØ´ç ÀÎÀÚ·Î ÁöÁ¤ÇÑ Æ¯Á¤ »öÀÇ color À妽º¸¦ ¸®ÅÏÇÕ´Ï´Ù.

                                                                                                                                                                                                                                   
32. imagecolortotal(int im);

    ÇØ´ç À̹ÌÁö¿¡ »ç¿ë µÈ ÃÑ »öÀÇ ¼ö¸¦ ¸®ÅÏÇÕ´Ï´Ù.

                                                                                                                                                                                                                                                  
33. imageinterlace(int im , int [interlace]);

    ÇØ´ç À̹ÌÁöÀÇ interlace °ªÀ» ¼³Á¤ÇÕ´Ï´Ù.

        Interlace = 0  -  À̹ÌÁö°¡ ºê¶ó¿ìÀú¿¡ Ãâ·ÂµÉ ¶§ À§¿¡¼­ºÎÅÍ ÃµÃµÈ÷ Ãâ·ÂÇÕ´Ï´Ù.
        Interlace = 1  -  À̹ÌÁö°¡ ºê¶ó¿ìÀú¿¡ Ãâ·ÂµÉ ¶§ Àüü À̹ÌÁö°¡ ¼­¼­È÷ ³ªÅ¸³³´Ï´Ù.

±âŸÇÔ¼ö

1.exec(string command , string [array] , int [return_var]);

    ¿ÜºÎ ÇÁ·Î±×·¥À» ½ÇÇàÇÕ´Ï´Ù.
    µÎ ¹ø° ÀÎÀÚ¸¦ ¼³Á¤ÇÏ¸é ¸í·ÉÀÇ ¸ðµç ¶óÀÎÀ» ¸®ÅϹÞÀ» ¼ö ÀÖ°í µðÆúÆ®´Â °á°ú¸¸ ¸®ÅϹ޽À´Ï´Ù. 
    ¼¼ ¹ø° ÀÎÀÚ´Â ÇØ´ç ¸®ÅÏ °ªÀ» ÀúÀåÇÕ´Ï´Ù.

    ¼Ò½º¿¡¼­ 5ÇàÀÇ ½ÇÇàÀ¸·Î ÇØ´ç ¸í·ÉÀÇ °á°ú¸¦ ¹è¿­·Î ÀúÀåÇÕ´Ï´Ù.
    ÀÌ°ÍÀ» È­¸é¿¡ º¸¿© ÁÖ±â À§ÇØ 7ÇàÀÇ while¸¦ ½ÇÇàÇÕ´Ï´Ù.

 
2. system(string command , int [return_var]);

    ¿ÜºÎ ÇÁ·Î±×·¥À» ½ÇÇàÇÏ°í °á°ú¸¦ È­¸é¿¡ Ãâ·ÂÇÕ´Ï´Ù, µÎ ¹ø° ÀÎÀÚ´Â ½ÇÇà »óÅ °ªÀ» ÀúÀåÇÕ´Ï´Ù.

3. setcookie(string name , string value , int expire , string path , string domain , int secure);

    ÄíÅ° ¼³Á¤À» Çϵµ·Ï ºê¶ó¿ìÀú¿¡ º¸³À´Ï´Ù. ÄíÅ°ÀÇ ¼³Á¤Àº µ¥ÀÌÅÍÀÇ ¾î¶°ÇÑ °Íº¸´Ù ¿ì¼±Çؼ­ ½ÇÇàÇؼ­
    º¸³»¾ß µË´Ï´Ù.   ÀÌ°ÍÀº ½ºÅ©¸³Æ®¿¡¼­ Çì´õ º¸´Ùµµ ¿ì¼± ÇؾßÇÕ´Ï´Ù.
    ¼³Á¤µÈ ÄíÅ°¸¦ °­Á¦·Î Á¾·áÇÏ·Á¸é ÄíÅ°¸¦ Çѹø ´õ ½ÇÇàÇÏ¸é µË´Ï´Ù.
              
    ¿¹) setcookie("username",$user,time()+3600);
        
    ÀÌ°ÍÀº $userÀÇ ÄíÅ°¸¦ 1½Ã°£ µ¿¾È À¯ÁöÇÏ´Â ¼³Á¤ÀÔ´Ï´Ù.
    ½Ã°£ ¼³Á¤Àº ÃÊ´ÜÀ§ ÀÌ¸ç  0ÀÏ °æ¿ì ºê¶ó¿ìÀú¸¦ Á¾·áÇϸé ÄíÅ°°¡ Á¦°ÅµË´Ï´Ù.


4. session ÇÔ¼ö

    php4¿¡¼­ »õ·Ó°Ô µîÀåÇßÀ¸¸ç ÄíÅ°¿Í ÇÔ²² °°ÀÌ À¯¿ëÇÏ°Ô ¾²ÀÔ´Ï´Ù.
                                             
    ¿¹) ¼¼¼ÇÀÇ °æ¿ì PHP.INIÀÇ ¼³Á¤ ºÎºÐ¿¡ ½Ã°£°ú ³ª¸ÓÁö °ü·Ã ¼³Á¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.
    (PHP ¼³Ä¡ ºÎºÐ Âü°í)

        ¼¼¼Ç ½ÃÀÛ - session_start( );
        ¼¼¼Ç µî·Ï - session_register("ÇØ´ç ¼¼¼Ç °ª");
        ¼¼¼Ç Á¾·á - session_destroy("ÇØ´ç ¼¼¼Ç °ª");


5. connection_status(void);

    ¿¬°á »óŸ¦ bit´ÜÀ§·Î °ªÀ¸·Î ¸®ÅÏÇÕ´Ï´Ù.


6. connection_timeout(void);

    ½ºÅ©¸³Æ®°¡ ¼³Á¤ ½Ã°£À» ÃÊ°ú ÇØ time out µÇ¸é true¸¦ ¸®ÅÏÇÕ´Ï´Ù.

                                                                                                                    
7. connection_aborted(void);

    Ŭ¶óÀ̾ðÆ®°¡ Á¢¼ÓÀ» ²÷À» °æ¿ì true¸¦ ¸®ÅÏÇÕ´Ï´Ù.

                                                                                                                                 
8. die(string message);

    ÇØ´ç ¸Þ½ÃÁö¸¦ Ãâ·ÂÇÏ°í ½ºÅ©¸³Æ® ½ÇÇàÀ» ÁßÁöÇÕ´Ï´Ù.

                                                                                                                                          
9. sleep(int seconds);

    ½ºÅ©¸³Æ®ÀÇ ½ÇÇàÀ» ÁöÁ¤ÇÑ ÃÊ ¸¸Å­ Áö¿¬ÇÕ´Ï´Ù.

                                                                                                                                                   
10. exit(void);

    Áö±Ý ½ºÅ©¸³Æ®ÀÇ ½ÇÇàÀ» ÁßÁöÇÕ´Ï´Ù.

                                                                                                                                                            
11. ignore_user_abort(int [setting]);

    Ŭ¶óÀ̾ðÆ®ÀÇ Á¢¼ÓÀÌ ²÷°åÀ» °æ¿ì ÇØ´ç ½ºÅ©¸³Æ®ÀÇ ½ÇÇà ¿©ºÎ¸¦ ¼³Á¤ÇÕ´Ï´Ù.

                                                                                                                                                                         
12. register_shutdown_function(string func);

    ÇØ´ç ½ºÅ©¸³Æ®°¡ Á¾·á ¶§ ½ÇÇàµÉ ÇÔ¼ö¸¦ ¼³Á¤ÇÕ´Ï´Ù.

                                                                                                                                                                                  
13. usleep(int micro_sec);

    ½ºÅ©¸³Æ®ÀÇ ½ÇÇà ½Ã°£À» ¸¶ÀÌÅ©·Î ÃÊ´ÜÀ§·Î Áö¿¬½Ãŵ´Ï´Ù.



´ÙÀ½ Àå¿¡¼­´Â Mysql ±âº» ¹®¹ýÀ» ¼³¸íÇÏ°Ú½À´Ï´Ù.

9. MYSQL ±âº» ¹®¹ý

MysqlÀº ´ëÈ­½Ä dbÀÔ´Ï´Ù.    ÁÖ·Î ¼­¹ö¿¡ ¿¬°áÀ» ÇÏ°í Áú¹®À» ½ÇÇàÇÏ¸ç °á°ú¸¦ È­¸é¿¡ Ãâ·ÂÇØÁÖ´Â ÀÏÀ» ÇÕ´Ï´Ù.    ¹«¾ùº¸´Ù ¾ÆÆÄÄ¡¿Í php¸¦ ¿¬µ¿ÇßÀ» ¶§ ±× Áø°¡¸¦ ¹ßÈÖÇÕ´Ï´Ù.    ¿©±â¼­´Â ¸®´ª½º¿ë mysqlÀ» À§ÁÖ·Î ¼³¸íÇÒ °ÍÀÌ¸ç ´Ù¸¥ dbÀÇ ÇÔ¼öµµ ºñ±³ÇÏ°Ú½À´Ï´Ù.

9.1 MysqlÀ» ½ÃÀÛÇϱâ Àü¿¡

»ç¿ë °¡´ÉÇÑ À̸§

mysqlÀ» ÇÑ±Û Áö¿øÀ¸·Î ÄÄÆÄÀÏÇß´Ù¸é ÇÑ±Û À̸§À» Á൵ µÇÁö¸¸ ÀÌ°ÍÀº »ç¿ëÇÏÁö ¾Ê´Â ÆíÀÌ ÁÁ½À´Ï´Ù.
±×¸®°í À̸§¿£ "." ¹®ÀÚ¸¦ »ç¿ëÇÒ ¼ö ¾ø°í ù ±ÛÀÚ´Â ¿µ¹®À¸·Î »ç¿ëÇØ¾ß ÇÕ´Ï´Ù.
¶Ç, ÃÖ´ë 64ÀÚ±îÁö Áö¿øµÇ¸ç, º°¸íÀº ÃÖ´ë 256ÀÚ±îÁö Áö¿øµË´Ï´Ù.
À̸§ÀÇ ±¸¼ºÀº ¿µ¹®,¼ýÀÚ, "_" , "$"·Î ÀÌ·ç¾îÁ®¾ß ÇÕ´Ï´Ù. MysqlÀ» À¯´Ð½º³ª ¸®´ª½º
°è¿­¿¡¼­ »ç¿ëÇÑ´Ù¸é ±× ¿î¿µÃ¼Á¦ÀÇ È¯°æÀ» µû¸£±â ¶§¹®¿¡ ´ë¼Ò¹®ÀÚ¸¦ ±¸º°Çؼ­ µ¥ÀÌÅͺ£À̽º À̸§, table
À̸§ÀÌ ÀúÀåµË´Ï´Ù.
Win32°è¿­ÀÇ °æ¿ì´Â ´ë¼Ò¹®ÀÚ¸¦ ±¸ºÐÇÏÁö ¾ÊÁö¸¸ ÇϳªÀÇ ¹®¿¡¼­ ´ë¼Ò¹®ÀÚ¸¦ °°ÀÌ »ç¿ëÇÒ ¼ö´Â ¾ø½À´Ï´Ù.
ÇÏÁö¸¸ º°¸íÀº ´ë¼Ò¹®ÀÚ¸¦ ±¸ºÐÇØ ÁÝ´Ï´Ù.

9.2 ÁÖ¼®ÀÇ »ç¿ë

°¢ ¶óÀÎÀÇ ³¡¿¡ ¿À´Â "#"°ú ¿©·¯ ¶óÀÎÀ» »ç¿ëÇÒ ¼ö ÀÖ´Â "/*  */"°¡ ÀÖ½À´Ï´Ù.

9.3 Ä÷³ ŸÀÔ

mysqlÀÇ Ä÷³Àº Á¾·ù°¡ ´Ù¾çÇÕ´Ï´Ù. ±×·¡¼­ º¸±â ½±°Ô ¾Æ·¡ Ç¥¸¦ ¸¸µé¾î º¸¾Ò½À´Ï´Ù.


Type                     Option   (B)-ÃÖ´ëÇ¥½Ã, (F)-¼Ò¼öÁ¡ÀÌÇÏÀÚ¸´¼ö
---------------------------------------------------------------------------------------------------------------------
TINYINT                  Á¤¼öÇü(-128~127), (B), [UNSIGNED]-Á¤¼öÇü(0~255)
        
SMALLINT                 Á¤¼öÇü(-32768~32767), (B), [UNSIGNED]-Á¤¼öÇü(0~65535)
        
MEDIUMINT                Á¤¼öÇü(-8388606~8388607), (B), [UNSIGNED]-Á¤¼öÇü(0~16777215)
        
INT                      Á¤¼öÇü(-2147483648~2147483647), (B), [UNSIGNED]-Á¤¼öÇü(0~4294967295)
        
INTEGER                  INT¿Í µ¿ÀÏ
        
BIGINT                   Á¤¼öÇü(-9223372036854775808~9223372036854775807), (B),
                         [UNSIGNED]-Á¤¼öÇü(0~18446744073709551615)

FLOAT(Á¤¹Ðµµ)            ºÎµ¿¼Ò¼öÁ¡½Ç¼ö, (Á¤¹Ðµµ)-"(4,8)", (4)-´ÜÁ¤µµ
                         ºÎµ¿¼Ò¼öÁ¡½Ç¼ö, (8)-¹èÁ¤µµ ºÎµ¿¼Ò¼öÁ¡½Ç¼ö, ¹üÀ§´Â FLOAT, DOUBLE°ú °°½À´Ï´Ù.
                                                         
FLOAT(L, F)              ´ÜÁ¤µµ ºÎµ¿¼Ò¼öÁ¡ ½Ç¼ö, (B,F), (-3.402823466E+38 ~ 1.175494351E-38, 0,
                                                          1.175494351E-38 ~ 3.402823466E+38)
DOUBLE                   ¹èÁ¤µµ ºÎµ¿¼Ò¼öÁ¡ ½Ç¼ö, (B,F), (-1.7976931348623157E+308 ~ -2.2250738585072014E-308,0,
                                                          2.2250738585072014E-308 ~ 1.7976931348623157E+308)
        
DOUBLE PRECISION~REAL    PRECISION(B,F), REAL(B,F) DOUBLE¿Í µ¿ÀÏ
        
DECIMAL                  ºÎµ¿ ¼Ò¼öÁ¡ ½Ç¼ö CHAR ÇüÅ·Πµ¿ÀÛ, (B,F), F°¡ 0ÀÌ¸é ¼Ò¼öÁ¡ÀÌÇÏ´Â ÀúÀåµÇÁö ¾Ê½À´Ï´Ù.
                         ¹üÀ§´Â DOUBLE¿Í °°½À´Ï´Ù.
        
NUMERIC                  ECIMAL°ú µ¿ÀÏ
        
DATE                     ³¯Â¥Çü(1000-01-01 ~ 9999-12-31) 
                         ±âº»Å¸ÀÔ - YYYY-MM-DD
        
DATETIME                 ³¯Â¥¿Í ½Ã°£Çü(1000-01-01 00:00:00 ~ 9999-12-31 23:59:59)
                         ±âº»Å¸ÀÔ - YYYY-MM-DD HH:MM:SS 
        
TIMESTAMP                ŸÀÓ½ºÅÛÇÁÇü(1970-01-01 ~ 2037³â ÀÓÀÇ ½Ã°£),
                         (B) - (14,12,8,6) B °ªÀÌ ¾øÀ» °æ¿ì INSERT, UPDATE½Ã µ¿ÀÛµÈ ½Ã°£À¸·Î ÀÚµ¿ÀûÀ¸·Î ÀúÀåµË´Ï´Ù.
                         ±âº»Çü½Ä - YYYYMMDDHHMMSS, YYMMDDHHMMSS, YYYYMMDD,YYMMDD
        
TIME                     ½Ã°£Çü(-838:59:59 ~ 838:59:59) ±âº»Çü½Ä - HH:MM:SS
        
YEAR                     ³âµµÇü(1901 ~ 2155, 0000)
        
CHAR                     °íÁ¤Æø ¹®ÀÚ¿­, (B) - (1~255) B ¸¸Å­ ¿À¸¥ÂÊÀ¸·Î °ø¹é ä¿ö ÀúÀå Ãâ·Â ½Ã °ø¹éÀº Ãâ·Â¾ÈµÊ, 
                         [BINARY] - °Ë»ö ½Ã ´ë¼Ò¹®ÀÚ ±¸ºÐ
        
VARCHAR                  °¡º¯Æø ¹®ÀÚ¿­, (L) - (1 ~ 255) ¹®ÀÚ¿­ °ø¹éÀÌ Á¦°ÅµÈ ÈÄ ÀúÀå,
                         [BINARY] - °Ë»ö ½Ã ´ë¼Ò¹®ÀÚ ±¸ºÐ
        
TINYBLOB / TINYTEXT      BOLB, TEXTÇü, ÃÖ´ë±æÀÌ 255¹®ÀÚ  
        
BLOB / TEXT              BOLB, TEXTÇü, ÃÖ´ë±æÀÌ 65535¹®ÀÚ
        
MEDIUMBLOB / MEDIUMTEXT  BOLB, TEXTÇü, ÃÖ´ë±æÀÌ 16777215¹®ÀÚ
        
LONGBLOB / LONGTEXT      BOLB, TEXTÇü, ÃÖ´ë±æÀÌ 4294967295¹®ÀÚ
        
ENUM                     ¹®ÀÚ¿­ ¸ñ·ÏÇü, ÃÖ´ë 65535°³, ÀúÀåµÈ ¹®ÀÚ¿­ ¸ñ·Ï Áß¿¡ ¿ÀÁ÷ ÇÑ°¡Áö¸¸ ¾òÀ» ¼ö ÀÖ½À´Ï´Ù.
        
SET                      ¹®ÀÚ¿­ ¸ñ·ÏÇü, ÃÖ´ë 64°³, ÀúÀåµÈ ¹®ÀÚ¿­ ¸ñ·Ï Áß¿¡ 0, 1°³ ÀÌ»óÀ» ¾òÀ» ¼ö ÀÖ½À´Ï´Ù.
---------------------------------------------------------------------------------------------------------------------

9.4 Á¢¼Ó Çϱâ

./mysql -h È£½ºÆ®¸í -u À¯Àú -p   ("mysql>" ÇÁ·ÒÇÁÆ®°¡ ³ªÅ¸³ª°í Äõ¸®¸¦ ½ÇÇàÇÏ¸é µË´Ï´Ù.)
µðÆúÆ® ÀνºÅçÀ» Çß´Ù¸é "/usr/local/mysql/bin" µð·ºÅ丮¿¡¼­ Á¢¼Ó ¸í·ÉÀ» ½ÇÇàÇÕ´Ï´Ù.
¹°·Ð -p ¿É¼ÇÀº À¯Àú¿¡ ÇØ´çÇÏ´Â ºñ¹Ð ¹øÈ£ÀÔ´Ï´Ù.
À§ ¸í·ÉÀ» ½ÇÇàÇÏ°í ¿£Å͸¦ Ä¡¸é passw ÀÔ·Â ¶õÀÌ ¶ß°í °Å±â¿¡ passw¸¦ ÀÔ·ÂÇÏ¸é µË´Ï´Ù.

9.5 Á¢¼Ó ²÷±â

"mysql>"¿¡¼­ "quit" ¶Ç´Â " ctrl + d "¸¦ ´©¸£¸é µË´Ï´Ù.

¿©±â¼­ "quit" ¸í·ÉÀº " ; " ¾øÀÌ ½ÇÇàÇÕ´Ï´Ù. ("quit" , " use")

9.6 mysql ¹öÀü°ú Áö±Ý ³¯Â¥ ¾Ë¾Æº¸±â

mysql> select version( ), current_date( );

À§ ±×¸²¿¡¼­ 1 row´Â ÇϳªÀÇ Äõ¸® °á°ú¸¦ ¸»Çϸç (0.03 sec)´Â Äõ¸® ½Ã°£À» ¸»ÇÕ´Ï´Ù.

À§ ±×¸²¿¡¼­ °¢ ¸í·ÉÀÇ ¿¬°áÀº " , "·Î Çϸç select ½ÇÇà ¶§ ¸í·ÉÀÇ ¸¶Áö¸·À» " ; "·Î

Ç¥½ÃÇÕ´Ï´Ù.   " ; " ÀÌ ¾øÀ» °æ¿ì À§¿Í °°ÀÌ ¸í·ÉÀ» °è¼Ó ÀÔ·ÂÇÏ°Ô²û ÇÕ´Ï´Ù.

9.7 µ¥ÀÌÅͺ£À̽º ¸¸µé±â(database¿Í table ¸¸µé±â)

±×·³ ÀÌÁ¦ Á÷Á¢ database¸¦ ¸¸µé°í ¿©·¯ °¡Áö »ç¿ëÇÏ´Â ¹æ¹ýÀ» ¾Ë¾Æº¸°Ú½À´Ï´Ù.    ¸ÕÀú ¸¸µé±â Àü¿¡ ±âº»ÀûÀ¸·Î ¸¸µé¾îÁø database¸¦ È®ÀÎÇØ º¾´Ï´Ù.

µ¥ÀÌÅͺ£À̽º º¸±â

mysql>show databases ;

(ÇØ´ç µ¥ÀÌÅͺ£À̽ºÀÇ Å×À̺íÀ» È®ÀÎÇÏ·Á¸é "show tables;" ¸í·ÉÀ¸·Î È®ÀÎ °¡´ÉÇÕ´Ï´Ù.)
À§ ±×¸²À» º¸¸é ÇöÀç database Ç׸ñÀÌ ¿©·¯ °³ ³ª¿À´Â °ÍÀ» º¼ ¼ö Àִµ¥ µðÆúÆ® °ªÀº"mysql" °ú "test"
°ª¸¸ÀÌ ³ª¿Ã °ÍÀÔ´Ï´Ù.   »ç¿ëÀÚ¿¡ µû¶ó ´Ù¸£°Ô ³ª¿Ã ¼öµµ ÀÖ½À´Ï´Ù.

"mysql" db  -  »ç¿ëÀÚ Á¢±Ù±ÇÇÑ Á¤º¸¸¦ °¡Áö°í ÀÖ½À´Ï´Ù.
"test" db  -  ¸» ±×´ë·Î test¸¦ Çغ¼ ¼ö ÀÖ´Â db ÀÔ´Ï´Ù.

(Áö±ÝºÎÅÍ ÇÏ´Â ¸ðµç ¸í·ÉÀº root °èÁ¤À¸·Î ½ÇÇàÇÕ´Ï´Ù. µÞ ºÎºÐ¿¡ °èÁ¤ÀÇ ¼³Á¤°ú ±ÇÇÑ µîÀ» ¼³¸í ÇÏ°Ú½À´Ï´Ù.)

database ¼±ÅÃÇؼ­ »ç¿ëÇϱâ

mysql>use database¸í;
        
test¸¦ ¼±ÅÃÇÏ°í ½ÇÇàÇϸé test database¸¦ ¼±ÅÃÇÏ°í changed µÇ´Â °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.

ƯÁ¤ database·Î ¹Ù·Î Á¢¼ÓÇϱâ

"./mysql -h È£½ºÆ®¸í -u À¯Àú¸í -p µ¥ÀÌÅͺ£À̽º¸í" 

ÀÌÁ¦ database¸¦ ¸¸µé¾î º¸°Ú½À´Ï´Ù. ÀÏ´Ü ¸¸µé±â Àü¿¡ Áß¿äÇÑ ºÎºÐÀº ¼³°è¸¦ ÇغÁ¾ß ÇÑ´Ù´Â °ÍÀÔ´Ï´Ù.
ÀÌ µ¥ÀÌÅͺ£À̽º¸¦ ¾îµð¿¡ »ç¿ëÇÒ °ÍÀÌ¸ç ¾î¶² Ç׸ñµéÀ» ³Ö¾î¾ß Çϳª ¿©·¯ °¡Áö¸¦ ½ÃÇèÇÑ ÈÄ ÀÛ¼ºÇϴ°Ô
¾ÈÀüÇÕ´Ï´Ù.   ¹°·Ð ¸¸µé°í ³­ ÈÄ ¼öÁ¤ÇÒ ¼öµµ ÀÖ½À´Ï´Ù.
¸¸µé database¸íÀº "work"·Î ÀÓÀÇ·Î Á¤Çß½À´Ï´Ù. ÀÌ µ¥ÀÌÅͺ£À̽ºÀÇ ¿ªÇÒÀº ¾î´À ´©°¡ ¸ÃÀº ÀÏÀ»
¸î¹ø Çß³ª ¾Ë¾Æº¸´Â °£´ÜÇÑ databaseÀÔ´Ï´Ù.

µ¥ÀÌÅͺ£À̽º ¸¸µé±â

mysql>create database work ;

"show" ¸í·ÉÀ¸·Î È®ÀÎÇϸé work°¡ ¸¸µé¾îÁø °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.

work µ¥ÀÌÅͺ£À̽ºÀÇ »ç¿ëÀ» À§ÇØ use ¸í·ÉÀ» ½ÇÇàÇÏ°í ´ÙÀ½ Å×À̺íÀ» È®ÀÎÇÕ´Ï´Ù.
¹°·Ð »õ·Î ¸¸µç µ¥ÀÌÅͺ£À̽ºÀ̱⠶§¹®¿¡ Å×À̺íÀº ºñ¾ú´Ù°í ³ª¿É´Ï´Ù.
(ÀÚ! ±×·³ table¸¦ ¸¸µé¾î º¸°Ú½À´Ï´Ù. ´Ù¸¥ ¹æ¹ýµµ ÀÖÁö¸¸ ¿©±â¼± Á÷Á¢ÇÏ´Â ¹æ¹ýÀ» ÅÃÇß½À´Ï´Ù.
´Ù¸¥ ¹æ¹ýÀº txt ÆÄÀÏÀ» ¸¸µé¾î ÆÄÀÏÀ» ½ÇÇàÇÏ´Â ¹æ¹ýÀÔ´Ï´Ù. table¸íÀº "works"·Î ÇÏ°Ú½À´Ï´Ù.)

Å×ÀÌºí ¸¸µé±â

mysql>create table Å×À̺í¸í ( ¿­À̸§ ÀÚ·áÇü, ¿­À̸§ ÀÚ·áÇü, ... ) ;

Å×À̺íÀ» ¸¸µé ¶§ÀÇ ÀÚ·áÇüÀº ¾Õ ºÎºÐÀÇ Ç¥¸¦ È®ÀÎÇØ º¸±â ¹Ù¶ø´Ï´Ù.
ÀÚ·áÇüÀÇ ÇüÅ´ alter table¸¦ »ç¿ëÇؼ­ ¹Ù²Ù¾îÁÙ ¼ö ÀÖ½À´Ï´Ù. 
±×·³ Áö±Ý±îÁö ¸¸µç Å×À̺íÀÇ ÀÚ·áÇü°ú ¿­ÀÇ À̸§À» È®ÀÎÇÏ´Â ¹æ¹ýÀ» ¾Ë¾Æº¸°Ú½À´Ï´Ù.

Å×À̺í ÀÚ·áÇü ¾Ë¾Æ º¸±â

mysql>describe Å×À̺í¸í ;

(¿©±â¼­ nameÀº À̸§, hab´Â Ãë¹Ì, ownÀº ´ã´ç, sex´Â ¼º , work´Â ¸¶Áö¸· ÀÛ¾÷ÀÏ, no´Â ÀÛ¾÷ÇÒ È½¼ö·Î Ç¥ÇöÇß½À´Ï´Ù.)

9.8 Å×ÀÌºí¿¡ µ¥ÀÌÅÍ ÀÔ·ÂÇϱâ

ÀÌÁ¦ Å×ÀÌºí¿¡ µ¥ÀÌÅ͸¦ ÀÔ·ÂÇÒ Â÷·ÊÀÔ´Ï´Ù.    ÀÌ°Í ¶ÇÇÑ Á÷Á¢ Çϳª¾¿ ÀÔ·ÂÇÏ´Â ¹æ¹ý°ú ÆÄÀÏ·Î ÇѲ¨¹ø¿¡ ÀÔ·ÂÇÏ´Â ¹æ¹ýÀÌ ÀÖ½À´Ï´Ù.

Å×ÀÌºí¿¡ µ¥ÀÌÅÍ ÀÔ·ÂÇϱâ(Á÷Á¢)

mysql>insert into Å×À̺í¸í values(¡®ÀÚ·á¸í¡¯ , ¡® ..¡¯ , ¡®..¡¯) ;
ÀÌ°ÍÀº ÇØ´ç Å×À̺íÀ» »õ·Ó°Ô »ý¼ºÇßÀ» °æ¿ì óÀ½ ÀÔ·ÂÇÒ ¶§ ÁÖ·Î »ç¿ë ÇÕ´Ï´Ù.
ÀÚ·áÀÇ  ÀÔ·Â ¼ø¼­´Â °¢ ¿­¿¡ ÇØ´çÇÏ´Â ÀÎÀÚ ¼øÀ¸·Î ³ª¿­ÇÏ¸é µÇ°í, ¸¸¾à ÇØ´ç ¿­¿¡ ÀڷḦ ³ÖÁö  ¾ÊÀ¸·Á¸é
"null" À» »ç¿ëÇÕ´Ï´Ù.

Å×ÀÌºí¿¡ µ¥ÀÌÅÍ ÀÔ·ÂÇϱâ(ÆÄÀÏ)

mysql>load data local infile "ÆÄÀϸí" into table Å×À̺í¸í ;

¸ðµç ÀÚ·á ÀÔ·ÂÀº Å×ÀÌºí ¿­ÀÇ À̸§¼øÀ¸·Î ÇÏ¸é µË´Ï´Ù. ±×¸®°í Áß¿äÇÑ °ÍÀº ¿­°ú ¿­ »çÀÌ´Â tab Å°·Î Çؾß
ÇÏ´Â °ÍÀÔ´Ï´Ù.   ¾î¶°ÇÑ ¿¡µðÅ͸¦ »ç¿ëÇÏ°Ç È®ÀåÀÚ³ª À̸§Àº Áß¿äÇÏÁö ¾Ê½À´Ï´Ù. ¶Ç, ºó °ø°£ÀÌ ¾øÀÌ ÀÔ·ÂÀ»
ÇØ¾ß ÇÕ´Ï´Ù.   ¿­ÀÇ Ç׸ñÀ» ºñ¿ö µÎ·Á¸é " /n "À» »ç¿ëÇÏ¸é µË´Ï´Ù. 

À§ ÆÄÀÏÀ» º¸¸é °ø¹éÀÌ ¾ø´Â °ÍÀÌ È®ÀÎ µÉ °ÍÀÔ´Ï´Ù.
ÀÌ ÆÄÀÏÀº "works_table.sql"·Î ¸¸µé¾ú°í 2) ¹øÀÇ ¹æ¹ýÀ¸·Î ÇØ´ç Å×ÀÌºí¿¡ ÀÔ·ÂÇß½À´Ï´Ù.

À§ ±×¸²¿¡¼­ ÇØ´ç ÆÄÀÏÀÇ ³»¿ëÀ» Å×ÀÌºí¿¡ ÀÔ·ÂÇÏ°í Å×ÀÌºí ³»¿ëÀ» ´Ù½Ã È®ÀÎÇß½À´Ï´Ù.

9.9 Å×ÀÌºí¿¡¼­ Á¤º¸ °Ë»öÇϱâ

select¹®À» »ç¿ëÇؼ­ ´Ù¾çÇÑ ¹æ¹ýÀ¸·Î °Ë»öÀ» ÇÒ ¼ö ÀÖ½À´Ï´Ù.

±âº» Çü½Ä

mysql>select °Ë»ö¸í from Å×À̺í¸í where °Ë»öÁ¶°Ç; 

°Ë»ö¸íÀº ¿©·¯ °³ ³ª¿­ÇÒ ¼öµµ ÀÖ½À´Ï´Ù. °¡·É name,work, ¡¦  ÀÌ·± ½ÄÀ¸·Î ","¸¦ »ç¿ëÇÕ´Ï´Ù.
"*"¸¦ »ç¿ëÇؼ­ ÀüºÎ¸¦ °Ë»öÇÒ ¼öµµ ÀÖ½À´Ï´Ù. 
±×¸®°í °Ë»öÁ¶°ÇÀº »ç¿ëÇÏÁö ¾Ê¾Æµµ ¹«°ü ÇÕ´Ï´Ù. 
±×·³ whereÀÇ ¿©·¯ °¡Áö ÇüŸ¦ º¸±â·Î ÇÏ°Ú½À´Ï´Ù.

where °Ë»ö Á¶°Ç

mysql>select °Ë»ö¸í from Å×À̺í¸í where °Ë»öÁ¶°Ç(and , or, like , regexp)  

(´Ù¸¥ ºÎºÐÀº µÞ ºÎºÐ ÁÖ¿äÇÔ¼ö ºÎºÐ¿¡¼­ ´Ù·ç°Ú½À´Ï´Ù.)

where and »ç¿ëÇϱâ

mysql>select * from works where (no = "4" and sex = "f");

andÀÏ °æ¿ì (µÑ ´Ù ÂüÀ̾î¾ß ÇÕ´Ï´Ù.) 

À§ ±×¸²Àº ¿©ÀÚ Áß¿¡ ÀÏÀ» 4¹ø ÇÑ »ç¶÷À» ã´Â °ÍÀÔ´Ï´Ù.

 
mysql>select * from works where (own = "û¼Ò" and hab = "ÀáÀÚ±â");

where ( own = "û¼Ò" and hab = "ÀáÀÚ±â" ) ÀÌ°ÍÀº ¸ÃÀº ÀÏÀÌ Ã»¼ÒÀ̸鼭 Ãë¹Ì°¡ ÀáÀÚ±âÀÎ
»ç¶÷À» ã´Â °ÍÀÔ´Ï´Ù.   ¿©±â±îÁö´Â °Ë»ö¸íÀ» "*"·Î »ç¿ëÇ߱⠶§¹®¿¡ ¿­ ÀüºÎ¸¦ º¸¿© ÁÖ¾ú½À´Ï´Ù.
ƯÁ¤ÇÑ ¿­¸¸ º¸·Á¸é ±× ¿­ÀÇ À̸§À» Àû¾îÁÖ¸é µË´Ï´Ù.

where or »ç¿ë Çϱâ

mysql>select * from works where (own = "û¼Ò" or hab = "³ó±¸");

orÀÏ °æ¿ì´Â (µÑ Áß Àû¾îµµ Çϳª´Â ÂüÀ̾î¾ß ÇÕ´Ï´Ù)

±×¸®°í À§ ¹æ¹ý ¸»°íµµ and¿Í orÀ» °°ÀÌ »ç¿ëÇÏ´Â ¹æ¹ý°ú ÇÑ °³ ÀÌ»óÀ» »ç¿ëÇÏ´Â ¹æ¹ý ¿©·¯ °¡Áö°¡ ÀÖ½À´Ï´Ù.

where and, or »ç¿ëÇϱâ

mysql>select * from works where (sex = "m" and work >= "2000-01-20") or
                                (sex= "m" and hab= "ÀáÀÚ±â");

±×¸²À» º¸¸é "where( ¹®Àå and ¹®Àå ) or ( ¹®Àå and ¹®Àå )" »ç¿ëÇÑ°É º¼ ¼ö ÀÖ½À´Ï´Ù. 

  

ÀÚ, ±×·³ ÀÌÁ¦ ƯÁ¤ÇÑ ¹®ÀÚÀÇ ÆÐÅÏ ÀÏÄ¡¸¦ ºñ±³Çؼ­ °Ë»çÇÏ´Â ¹æ¹ýÀ» »ìÆ캸°Ú½À´Ï´Ù.
µÎ °¡Áö ¹æ¹ýÀÌ Àִµ¥ like¿Í regexp ÀÔ´Ï´Ù. °¢°¢ÀÇ ÆÐÅÏÀ» °Ë»çÇÏ´Â ¹æ½ÄÀ» »ìÆ캸°Ú½À´Ï´Ù.

where like »ç¿ëÇϱâ

mysql>select * from work where ¿­¸í like "ãÀ»¹®ÀÚ%", "%ãÀ»¹®ÀÚ", "%ãÀ»¹®ÀÚ%", "____" ;

¿©±â¼­ like ´ÙÀ½ ³ª¿À´Â Çü½ÄÀº Â÷·Ê·Î ãÀ» ¹®ÀÚ·Î ½ÃÀÛÇÏ´Â ´Ü¾î, ãÀ» ¹®ÀÚ·Î ³¡³ª´Â ´Ü¾î, ãÀ» ¹®ÀÚ¸¦
Áß°£¿¡ Æ÷ÇÔÇÑ ´Ü¾î, 4°³·Î ÀÌ·ç¾îÁø ¹®ÀÚ ½ÄÀ¸·Î Çؼ®ÇÏ¸é µË´Ï´Ù.
ÀÌ ¸í·ÉÀº ÁÖ·Î °Ô½ÃÆÇÀÇ °Ë»ö¿¡ »ç¿ëÇϸé ÆíÇÕ´Ï´Ù. µÚ¿¡ °Ô½ÃÆÇ ±¸Çö¿¡¼­ Àß »ìÆì º¸±â ¹Ù¶ø´Ï´Ù.

where regexp »ç¿ëÇϱâ

mysql>select * from work where ¿­¸í regexp "^[jJ]" , "^.{5}" ;

regexp Çü½ÄÀ» º¸¸é Á» »ý¼ÒÇÑ ±âÈ£°¡ ÀÖÀ» °ÍÀÔ´Ï´Ù. ÀÌ ±âÈ£´Â ÀÌ Ç¥Çö½Ä(Á¤±Ô Ç¥Çö½Ä)¿¡ »ç¿ëÇÏ´Â ¸î°¡Áö
±âÈ£ÀÔ´Ï´Ù.   ±×¸®°í, regexp Ç¥ÇöÀº ´ë¼Ò¹®ÀÚ¸¦ °¡¸®±â ¶§¹®¿¡ °Ë»ö Á¶°ÇÀ» ÀÔ·ÂÇÒ ¶§ ÁÖÀǸ¦ ¿äÇÕ´Ï´Ù.
À§ Çü½ÄÀº Â÷·Ê·Î ¹®ÀÚ Ã³À½ÀÌ ¼Ò¹®ÀÚ j ´ë¹®ÀÚ J·Î ½ÃÀÛÇÏ´Â Á¶°ÇÀ» °Ë»ö, 5°³ÀÇ ¹®ÀÚ·Î ÀÌ·ç¾îÁø ´Ü¾î
°Ë»öÀ» ÀǹÌÇÕ´Ï´Ù.

 

Regexp ±âÈ£

    . - ¹®ÀÚ Çϳª¸¦ ³ªÅ¸³À´Ï´Ù.
    *   - ¾Õ¿¡ ³ª¿Â ¹®ÀÚÀÇ 0°³ ÀÌ»ó ¹Ýº¹ÇÕ´Ï´Ù.
    ^   - ¹®ÀÚ¿­ÀÇ Ã³À½À» ³ªÅ¸³À´Ï´Ù.
    $   - ¹®ÀÚ¿­ÀÇ ³¡À» ³ªÅ¸³À´Ï´Ù.
    [,] - °ýÈ£ ¾ÈÀÇ ¹®ÀÚ¿­ ÀÏÄ¡¸¦ È®ÀÎÇÕ´Ï´Ù.
    {,} - ¹Ýº¹À» ³ªÅ¸³À´Ï´Ù.

À§ ±×¸²Àº works Å×ÀÌºí¿¡¼­ Çʵ尡 nameÀÎ Ç׸ñ Áß ¾ËÆĺª b·Î ½ÃÀÛÇÏ´Â »ç¶÷À» ã¾Æ ÁÝ´Ï´Ù.

order by »ç¿ëÇϱâ

mysql>select ¿­¸í from Å×À̺í¸í order by ¿­¸í;

order by´Â ÀÎÀÚ ¼øÀ¸·Î ¿­¸í¿¡ ÇØ´çÇÏ´Â ÀڷḦ Á¤·ÄÇØ ÁÖ´Â ¸í·ÉÀÔ´Ï´Ù. ÀڷḦ ¼ø¼­´ë·Î º¸±âÀ§ÇÑ ÁÁÀº
¹æ¹ýÀÔ´Ï´Ù.   °Ô½ÃÆÇÀ» ¸¸µé °æ¿ì ÀÌ ¸í·ÉÀ» ²À ÇѹøÀº »ç¿ëÇØ¾ß ÇÒ °ÍÀÔ´Ï´Ù. 

À§ ±×¸²À» º¸¸é, work ¼øÀ¸·Î Â÷·Ê·Î Á¤·ÄÇÑ ¸ð½ÀÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.
        
Á¦ÀÏ Ã³À½ ÀÏÀ» ±×¸¸ µÐ »ç¶÷À» À§ ¸í·ÉÀ¸·Î ½±°Ô ãÀ» ¼ö ÀÖ½À´Ï´Ù.

order by DESC »ç¿ëÇϱâ

mysql>select ¿­¸í from Å×À̺í¸í order by ¿­¸í desc ;

desc ¿É¼ÇÀ» »ç¿ëÇϸé ÇØ´ç ¿­¸íÀ» ¿ª¼øÀ¸·Î Á¤·ÄÇØ ÁÝ´Ï´Ù. µÚ °æ¸Å °Ô½ÃÆÇ¿¡¼­µµ º¼ ¼ö ÀÖÁö¸¸ ÀÌ ¿É¼ÇÀº
À¯¿ëÇÏ°Ô ¾²ÀÔ´Ï´Ù.   °Ô½ÃÆÇÀÇ °æ¿ì »ç¶÷µéÀº ¼ø¼­´ë·Î º¸´Ù ¿ª¼øÀ¸·Î ºÁ¾ßÁö¸¸ Á¦ÀÏ ÃÖ±Ù ÀڷḦ º¼¼ö ÀÖ´Â
°ÍÀÔ´Ï´Ù.   ÀÌ ¸í·ÉÀº Á¦ÀÏ ÃÖ±Ù±îÁö ÀÏÇß´ø »ç¶÷À» ¿ª¼øÀ¸·Î Á¦ÀÏ À§¿¡ ¿À°Ô Ãâ·ÂÇØ ÁÝ´Ï´Ù.
mysqlÀÇ °æ¿ì ÀÌ ¸í·ÉÀÌ ¼øÂ÷ÀûÀÎ °Íº¸´Ù Á¶±Ý ´À¸®°Ô Ãâ·ÂµÉ °æ¿ìµµ ÀÖ½À´Ï´Ù. ¹°·Ð ÀÚ·á°¡ ¸¹À» °æ¿ìÀÔ´Ï´Ù.
ÇÏÁö¸¸ Çѹø ½ÇÇàÇÏ°í ³­ µÚ´Â °ÅÀÇ ¼Óµµ Â÷ÀÌ°¡ ¾ø´Ù°í º¸¸é µË´Ï´Ù. 
¿©±â¼­ ÁÖÀÇ ÇÒ ºÎºÐÀº desc ÀÎÀÚ ¾ÕÀÇ ¿­¸í¸¸ Àû¿ëÀÌ µÈ´Ù´Â °ÍÀÔ´Ï´Ù.
±× ¾Õ¿¡ ´Ù¸¥ ¿­¸íÀ» Àû¾î Á൵ ¿ª¼øÀ¸·Î Á¤·ÄµÇÁö ¾Ê½À´Ï´Ù.

À§¿¡¼­ º¼ ¼ö ÀÖµíÀÌ desc ÀÎÀÚÀÇ ¿ªÇÒÀº µÇÁö ¾Ê°í ÀÖ½À´Ï´Ù.

·¹ÄÚµå ¼ö º¸±â

mysql>select count(*) from work ;

ÃÑ ·¹ÄÚµå ¼ö¸¦ °è»êÇØ ÁÝ´Ï´Ù. 

À§ ¸í·É°ú group by ¸í·ÉÀ» °°ÀÌ »ç¿ëÇÒ °æ¿ì ´õ °­·ÂÇÑ ±â´ÉÀ» ÇÕ´Ï´Ù.

group by »ç¿ëÇϱâ

mysql>select ¿­¸í,count(*) from Å×À̺í¸í group by ¿­¸í ;

ÇØ´ç ±×·ìÀÇ ·¹Äڵ忡 °üÇØ ¼ýÀÚ¸¦ ÆľÇÇؼ­ Ãâ·ÂÇØÁÖ´Â ¿ªÇÒÀ» ÇÕ´Ï´Ù. (count(*)¿Í °°ÀÌ »ç¿ëÇÒ °æ¿ì)

Ãâ·ÂÀÇ °á°ú¸¦ º¸¸é ÀÏÀÇ Á¾·ù¿¡ µû¶ó ¹èÄ¡µÈ »ç¶÷ÀÇ ¼ö¸¦ ÆľÇÇÒ ¼ö ÀÖ½À´Ï´Ù.

À§ ±×¸²À» º¸¸é junÀÌ ¹°Áֱ⠿ªÇÒÀ» µÎ°³³ª ¹Þ¾Ò´Ù´Â °É ¾Ë ¼ö ÀÖ½À´Ï´Ù. ¶Ç, ÃÑ ¸ÃÀº ÀÏÀ» º¼ ¼öµµ ÀÖ½À´Ï´Ù. 
ÀÌ·¸°Ô ¿©·¯ °¡Áö¸¦ ±×·ìÀ¸·Î Ãâ·ÂÇØ ÁÖ´Â ¸í·ÉÀº À¯¿ëÇÏ°Ô ¾²ÀÏ ¼ö ÀÖ½À´Ï´Ù.

9.10 Å×À̺í Áö¿ì±â¿Í ¼öÁ¤

¸¸µé¾îÁø Å×À̺íÀ» Áö¿ì°Å³ª ´Ù½Ã ¼öÁ¤ÇÏ´Â ¹æ¹ýÀº ¸î °¡Áö°¡ ÀÖ½À´Ï´Ù. °Ô½ÃÆÇÀÇ »ç¿ë ½Ã¿¡ ÀÌ ºÎºÐÀº ²À µé¾î°©´Ï´Ù.    µ¥ÀÌÅÍÀÇ »èÁ¦¿Í Ãß°¡ µî¿¡ »ç¿ëµË´Ï´Ù.

Å×À̺í Áö¿ì±â

mysql>delete from Å×À̺í¸í ; 

ÇØ´ç Å×À̺íÀ» »èÁ¦ÇÕ´Ï´Ù.

Å×ÀÌºí¿¡ Çʵå(¿­) Ãß°¡Çϱâ

mysql>alter table Å×À̺í¸í add ¿­¸í ÀÚ·áÇüÅ ;

Å×ÀÌºí¿¡ ´Ù¸¥ ¿­À» Ãß°¡½Ãŵ´Ï´Ù.
¸¸¾à °Ô½ÃÆÇÀÇ admin ÅøÀ» ¸¸µç´Ù¸é ÀÌ ¹æ¹ýÀ» Àû¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. Áö±Ý±îÁö ¸»ÇÑ ¸ðµç ¼³¸íµéÀº µ¥ÀÌÅͺ£À̽º
admin ÅøÀ» ¸¸µé ¶§ »ç¿ëÇÏ´Â Áß¿äÇÑ ±âº» ÁúÀǵéÀÔ´Ï´Ù.

À§ ±×¸²¿¡¼­ tel Çʵ尡 »õ·Ó°Ô Ãß°¡µÈ °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.

Å×À̺íÀÇ Æ¯Á¤ Çʵå(¿­) »èÁ¦Çϱâ

mysql>alter table Å×À̺í¸í drop ¿­¸í ;

ÇØ´ç Å×À̺íÀÇ Æ¯Á¤ Çʵå(¿­)¸¦ »èÁ¦ÇÕ´Ï´Ù.

À§ ±×¸²¿¡¼­ tel Ç׸ñÀÌ »èÁ¦µÈ °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.

Å×À̺í ƯÁ¤ ·¹ÄÚµå »èÁ¦Çϱâ

mysql>delete from Å×À̺í¸í where ¿­¸í = ¡®·¹ÄÚµå¸í¡¯(µ¥ÀÌÅ͸í);

ÇØ´ç Å×ÀÌºí¿¡¼­ ƯÁ¤ÇÑ ·¹Äڵ常 »èÁ¦ÇÕ´Ï´Ù.

À§ ±×¸²¿¡¼­ nameÀÌ glee¶ó´Â ·¹Äڵ常 Áö¿öÁø °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.

Å×À̺í ƯÁ¤ ·¹ÄÚµå ¼öÁ¤Çϱâ

mysql>update Å×À̺í¸í set ¿­¸í= ¡®·¹ÄÚµå¸í¡¯(µ¥ÀÌÅ͸í) where ¿­¸í= ¡®·¹ÄÚµå¸í¡¯;

ÀÌ ¹æ¹ýÀº ÇØ´ç Å×À̺íÀÇ Æ¯Á¤ ·¹ÄÚµåÀÇ ³»¿ë¸¸ ¼öÁ¤ÇÒ ¶§ »ç¿ëÇÕ´Ï´Ù.

À§ ±×¸²¿¡¼­ name°¡ bianÀÎ ·¹ÄÚµå Áß hab°¡ "?" ¿¡¼­ ÄÄ°íÄ¡±â·Î °íÃÄÁø °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.

9.11 mysql Á¢±Ù°ú ±ÇÇѼ³Á¤

ÀÌÁ¦ mysql¿¡ ´ëÇÑ Á¢±ÙÇÏ´Â ¹æ¹ýÀº Àͼ÷Çϸ®¶ó »ý°¢ÇÕ´Ï´Ù.    ±×·¯¸é ÀÌÁ¦ °¢ µ¥ÀÌÅͺ£À̽º º° Á¢±Ù°ú ±ÇÇÑ¿¡ °üÇÑ ¼³Á¤µéÀ» ¾Ë¾Æ º¸°Ú½À´Ï´Ù.    µÚÀÇ °Ô½ÃÆÇ µîÀÇ ¼Ò½º¿¡´Â ±×³É root ±ÇÇÑÀ¸·Î ¼³Á¤ÇßÁö¸¸ ¿©·¯ºÐµéÀÌ ÀÌ ºÎºÐÀ» ¼öÁ¤ÇÏ°í ¿©·¯ °¡Áö ´Ù¸¥ ¹æ¹ýÀ¸·Î µ¥ÀÌÅͺ£À̽º Á¢±ÙÀ» Çϵµ·Ï ¸¸µé ¼ö ÀÖ½À´Ï´Ù.

mysql ±ÇÇÑÀ» ¼³Á¤Çϱâ Àü¿¡

¸ÕÀú mysql Ŭ¶óÀ̾ðÆ®¿¡ Á¢¼ÓÀ» ÇÕ´Ï´Ù. ±×¸®°í µðÆúÆ®·Î ¼³Ä¡µÈ mysqlÀÇ µ¥ÀÌÅͺ£À̽º Ç׸ñÀ» »ìÆì º¸°Ú½À´Ï´Ù.

À§ ±×¸²Àº ¾ÆÁ÷ µ¥ÀÌÅͺ£À̽º¸¦ Ãß°¡·Î ¸¸µéÁö ¾ÊÀº ¿©·¯ºÐµé°ú´Â Á¶±Ý ´Ù¸¨´Ï´Ù.
µðÆúÆ®´Â mysql°ú test µ¥ÀÌÅͺ£À̽º¸¸ ÀÖ½À´Ï´Ù.
±×·³ mysqlÀÇ Àü¹ÝÀûÀÎ ¼³Á¤µéÀÌ µé¾î ÀÖ´Â mysql µ¥ÀÌÅͺ£À̽º¸¦ ¼±ÅÃÇÏ°Ú½À´Ï´Ù.

À§ ±×¸²¿¡¼­ ³ª¿­µÈ Å×À̺í Áß db¿Í userÀ» »ìÆì º¸°Ú½À´Ï´Ù. 

db Å×À̺í - °¢ µ¥ÀÌÅͺ£À̽ºÀÇ À̸§°ú È£½ºÆ®, »ç¿ëÀÚ µîÀÇ ±ÇÇÑÀ» ¼³Á¤ÇÕ´Ï´Ù.
user Å×À̺í - mysqlÀ» »ç¿ëÇÒ ¼ö ÀÖ´Â À¯Àú¿Í ÇØ´ç À¯ÀúÀÇ ±ÇÇÑÀ» ¼³Á¤ÇÕ´Ï´Ù.

À§ ±×¸²Àº db Å×À̺íÀÇ ¼Ó¼ºµéÀÔ´Ï´Ù. ÀÌ Å×ÀÌºí¿¡ ÇØ´ç À¯ÀúµéÀÌ »ç¿ëÇÒ µ¥ÀÌÅͺ£À̽º¸¦ ¼³Á¤ÇÏ°í ±ÇÇÑÀ» ÁÝ´Ï´Ù.

µ¥ÀÌÅͺ£À̽º »ç¿ë user µî·ÏÇϱâ

¿©±â¼­´Â test µ¥ÀÌÅͺ£À̽ºÀÇ »ç¿ëÀÚ(cry)¸¦ µî·ÏÇØ º¸°Ú½À´Ï´Ù.

À§ ±×¸²¿¡¼­ º¼ ¼ö ÀÖµíÀÌ db Å×À̺íÀº µ¥ÀÌÅͺ£À̽ºÀÇ ¼ÒÀ¯ÀÚ¸¦ µî·ÏÇÏ´Â °÷ÀÔ´Ï´Ù.
(Test µ¥ÀÌÅͺ£À̽ºÀÇ ¼ÒÀ¯ÀÚ´Â Áö±Ý ¾Æ¹«µµ ¼³Á¤µÇÁö ¾Ê¾Ò½À´Ï´Ù.)
±×¸®°í user Å×À̺íÀº µ¥ÀÌÅͺ£À̽º¸¦ »ç¿ëÇÏ´Â userÀ» µî·ÏÇÏ´Â °÷ÀÔ´Ï´Ù. Áï, db Å×ÀÌºí¿¡ ¼ÒÀ¯ÀÚ°¡ µî·ÏµÇ¾î
ÀÖ´õ¶óµµ user Å×ÀÌºí¿¡ ±× ¼ÒÀ¯ÀÚ(»ç¿ëÀÚ)°¡ Á¸ÀçÇÏÁö ¾ÊÀ¸¸é ¾ÈµË´Ï´Ù.
óÀ½ mysqlÀÇ ¼³Á¤¿¡¼­ root¸¦ ¼³Á¤Çß½À´Ï´Ù. ÀÌ root °èÁ¤Àº ¹¹µçÁö ´Ù ÇÒ ¼ö ÀÖ´Â °èÁ¤À̹ǷΠµ¥ÀÌÅͺ£À̽ºº°·Î
°ü¸®¸¦ ÇÒ ¼ö ÀÖ°í ¸ðµç ±ÇÇÑÀÌ ¾ø´Â ÇØ´ç µ¥ÀÌÅͺ£À̽º¸¸ °ü¸® ÇÏ´Â °èÁ¤ÀÌ ÇÊ¿ä·Î ÇÑ °ÍÀÔ´Ï´Ù. 
db Å×À̺íÀÇ ¼Ó¼ºÀ» º¸¸é ¿©·¯ °¡Áö µ¥ÀÌÅͺ£À̽º¿¡¼­ ÁúÀÇÇÏ´Â ¼Ó¼º µéÀ» º¼ ¼ö ÀÖÀ» °ÍÀÔ´Ï´Ù.
±× Áß »ç¿ëÇÏ°Ô ÇÒ ÁúÀÇ µéÀº ¡®y¡¯ ±×·¸Áö ¸øÇÏ°Ô ÇÒ °æ¿ì´Â ¡®n¡¯ µîÀ» ÁÜÀ¸·Î Çؼ­ µ¥ÀÌÅͺ£À̽º °ü¸®ÀÚÀÇ ±ÇÇÑÀ»
Á¤ÇÒ ¼ö ÀÖ½À´Ï´Ù. ÇØ´ç ÁúÀÇ ±ÇÇÑÀ» ¼³Á¤ÇÏ´Â ºÎºÐÀº ÃÑ 10°³ Ç׸ñÀÌ ÀÖ½À´Ï´Ù.
¾Õ¿¡¼­ insert ¹®°ú update ¹®À» º¸¾Ò±â ¶§¹®¿¡ Å×À̺íÀ» ´Ù·ç´Â ¹æ¹ýÀº ÀÌÁ¦ ½ÀµæÇßÀ» ÁÙ ¾Ð´Ï´Ù.
¿©±â¼­´Â ±âÁ¸¿¡ Á¸ÀçÇÏ´Â test Å×À̺íÀ» ¼öÁ¤ÇÏ´Â °ÍÀ̱⠶§¹®¿¡ update¹®À» »ç¿ë Çß½À´Ï´Ù.
¸¸¾à »õ·Î¿î µ¥ÀÌÅͺ£À̽º¸¦ db Å×ÀÌºí¿¡ Ãß°¡ÇÒ °æ¿ì´Â ´ç¿¬È÷ insert ¹®À» ÀÌ¿ëÇÏ¸é µÇ°Ú½À´Ï´Ù.

insert into ¹®À» ÀÌ¿ëÇÑ »õ·Î¿î µ¥ÀÌÅͺ£À̽º µî·Ï ¿ª½Ã ´ÙÀ½°ú °°Àº ½ÄÀ¸·Î ÇØÁÖ¸é µË´Ï´Ù.

 
insert into db values("ÇØ´ç ¿­" , "ÇØ´ç ¿­" ¡¦¡¦.);

Update ¹æ¹ýÀº ±âÁ¸¿¡ ÀÖ´ø ÇàÀ» ¸» ±×´ë·Î ¾÷µ¥ÀÌÆ® ÇÑ °Í ÀÔ´Ï´Ù.
ÇÊÀÚÀÇ °æ¿ì update°¡ Á¶±Ý Çê°¥¸®´Â °æ¿ì°¡ ÀÖ¾î ¿©·¯ºÐµéµµ Ȥ ±×·± ºÐÀÌ ÀÖÀ» °Å °°¾Æ insert ´ë½Å
update¹®À» »ç¿ëÇØ ºÃ½À´Ï´Ù.

  
±×·³, ÇØ´ç Ç׸ñµéÀÌ ¾÷µ¥ÀÌÆ® µÇ¾ú´ÂÁö¸¦ select ¹®À» ÀÌ¿ëÇØ È®ÀÎÇØ º¸°Ú½À´Ï´Ù.

   
select Host,Db, User from db ;

Mysql »ç¿ëÀÚ µî·ÏÇϱâ

user Å×À̺íÀÇ(mysql µ¥ÀÌÅͺ£À̽º¿¡¼­) test µ¥ÀÌÅͺ£À̽º¸¦ »ç¿ëÇÒ cry »ç¿ëÀÚ¸¦ µî·ÏÇØ º¸°Ú½À´Ï´Ù.
¿ì¼± user Å×À̺íÀÇ ¼Ó¼ºµéÀ» È®ÀÎÇÕ´Ï´Ù. 
user Å×ÀÌºí ¿ª½Ã ÇØ´ç ÁúÀÇ¿¡ °üÇÑ ±ÇÇÑÀÌ ÀÖ½À´Ï´Ù. ÃÑ 14°³ Ç׸ñÀÌ Á¸ÀçÇÕ´Ï´Ù.
¿©±â¼­´Â insert into ¹®À» »ç¿ëÇؼ­ Ãß°¡¸¦ ÇÏ°Ú½À´Ï´Ù.

À§ ±×¸²¿¡¼­ À¯Àú¸¦ µî·ÏÇϱâ Àü¿¡ »ó±â ÇÒ ºÎºÐÀº °¢°¢ÀÇ ÁúÀÇ¿¡ °üÇÑ ±ÇÇÑ ¼³Á¤À» ¸íÈ®È÷ Á¤ÇÑ ´ÙÀ½
µî·ÏÇÏ´Â °ÍÀÔ´Ï´Ù.   cry¶ó´Â »ç¿ëÀÚ°¡ test µ¥ÀÌÅͺ£À̽º ¸¸À» °ü¸®ÇÏ´Â °ÍÀ̶ó¸é ÁúÀÇ ¸ðµÎ "n"À¸·Î
ÇØ¾ß µÉ °ÍÀÔ´Ï´Ù.   ÇÏÁö¸¸ cry°¡ ´Ù¸¥ µ¥ÀÌÅͺ£À̽ºµµ °ü¸®ÇÏ±æ ¿øÇÑ´Ù¸é ÁúÀÇ Áß ÇÊ¿äÇÑ Ç׸ñ¸¸ "y"·Î
¼±ÅÃÇÏ¸é µË´Ï´Ù.

±×·³  ´ÙÀ½À» ÀÔ·ÂÇؼ­ user Å×À̺íÀÇ µî·Ï »óŸ¦ È®ÀÎÇØ º¸µµ·Ï ÇÏ°Ú½À´Ï´Ù.

select Host, User, Password from user ;

À§ ±×¸²¿¡¼­ Password Ç׸ñÀ» º¸¸é ¾Ë ¼ö ¾ø´Â ¼ýÀÚ¿Í ¾ËÆĺªÀ¸·Î µÇ¾îÁø °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.
ÀÌ°ÍÀº mysqlÀÌ passwdÀ» ÀúÀåÇÒ ¶§ ¾ÏȣȭÇؼ­ ÀúÀåÇϱ⠶§¹®ÀÔ´Ï´Ù. 
±×·± ÀÌÀ¯·Î insert into ¹®À¸·Î ¾ÏÈ£ ¿­À» ÀÔ·ÂÇÒ ¶§´Â password() ÇÔ¼ö¸¦ »ç¿ëÇؼ­ ÀÔ·ÂÇØ¾ß ÇÕ´Ï´Ù.

insert into user (Host,User,Password) values("192.168.0.1", "cry", password("cry98"));
  
ÀÌ·¸°Ô ½ÇÇàÇÏ¸é µË´Ï´Ù.(passwd ºÎºÐÀº ¿©·¯ºÐµéÀÌ Á¤ÇÏ´Â °÷ÀÔ´Ï´Ù.)
¿©±â¼­´Â Host, User, Password Ç׸ñ¸¸ Ãß°¡Çß½À´Ï´Ù. ±×°ÍÀº ³ª¸ÓÁö ¿­ÀÇ ÁúÀÇ ±ÇÇÑ Ç׸ñÀº µðÆúÆ®°¡ "n"À̱â 
¶§¹®¿¡ ÀÔ·ÂÇÏÁö ¾Ê¾Æµµ µË´Ï´Ù.

À§ ±×¸²¿¡¼­ 192.168.0.1ÀÇ Host¿Í cry À¯Àú ±×¸®°í ¾ÏÈ£°¡ µî·ÏµÈ°É È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.
ÀÌ ¼³Á¤µéÀº mysqlÀ» Àç½Ãµ¿ÇÏ°í ´Ù½Ã Á¢¼ÓÇÒ ¶§ºÎÅÍ Àû¿ëµË´Ï´Ù.

mysql »ç¿ëÀÚ Å×½ºÆ®

cry °èÁ¤À¸·Î 192.168.0.1 È£½ºÆ®·Î Á¢¼ÓÇØ º¸°Ú½À´Ï´Ù.

¹°·Ð ¾Õ¿¡¼­ ¼³Á¤ÇÑ "cry98" ¾ÏÈ£·Î Á¢¼ÓÇØ¾ß µË´Ï´Ù.

À§ ±×¸²¿¡¼­ cry °èÁ¤ÀÇ Ã³À½ ±ÇÇÑ ¼³Á¤¿¡ ÀÇÇØ test µ¥ÀÌÅͺ£À̽º¸¸ »ç¿ë °¡´ÉÇÔÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.
 

¿©±â±îÁö ´ë·«ÀûÀÎ mysqlÀÇ »ç¿ëÀÚ ±ÇÇÑ ¼³Á¤°ú Ãß°¡¿¡ ´ëÇØ »ìÆì º¸¾Ò½À´Ï´Ù.
ÀÌ·¯ÇÑ ¹æ¹ýµéÀ» ÀÌ¿ëÇؼ­ ³ªÁß¿¡ °Ô½ÃÆÇ¿¡ Àû¿ëÇÏ¸é ¸¹Àº µµ¿òÀÌ µÉ °ÍÀÔ´Ï´Ù.
Âü°í·Î, µÞ ÀåÀÇ °Ô½ÃÆÇ ºÎºÐ°ú ³ª¸ÓÁö ¼Ò½ºµéÀÇ mysql ¿¬µ¿Àº root ±ÇÇÑÀ¸·Î ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù. 
ÇÏÁö¸¸ ¿©·¯ºÐµéÀÌ ¿øÇÏ´Â °èÁ¤À» Ãß°¡ÇÑ ´ÙÀ½ ÀÔ ¸À¿¡ ¸Â°Ô ¾ó¸¶µçÁö ¼öÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù. 

9.12 mysql µ¥ÀÌÅÍÀÇ º¹±¸¿Í backup

µ¥ÀÌÅÍÀÇ ¹é¾÷Àº Á¤¸»·Î Áß¿äÇÑ ÀÏ Áß¿¡ ÇϳªÀÔ´Ï´Ù.    ÇÊÀÚ´Â ÄÄÇ»Å͸¦ Åë°·Î ³¯¸° ÀûÀÌ Àֱ⠶§¹®¿¡ ´õ¿í ¹é¾÷¿¡ ¿­À» ¿Ã¸³´Ï´Ù.    Mysql »Ó¾Æ´Ï¶ó php ¿ª½Ã tar·Î ¹Ýµå½Ã ¹é¾÷ÇÏ´Â ½À°üÀ» °¡Á®¾ß ÇÕ´Ï´Ù.    ¿äÁòÀÇ ¿¡µðÅ͵éÀº ´ëºÎºÐ ÀÛ¾÷ÇÏ´Ù°¡ Á¾·áÇÑ ÆÄÀÏ¿¡ ´ëÇØ ÀÚµ¿ÀûÀ¸·Î ¹é¾÷ ÆÄÀÏÀ» »ý¼ºÇØ ÀúÀåÇÕ´Ï´Ù.    ±× ´öºÐ¿¡ ÇÊÀÚ°¡ ÀÌ·¸°Ô ¼Ò½º¸¦ ¿©·¯ºÐµé¿¡°Ô º¸¿© ÁÙ ¼ö ÀÖ¾ú´ø °Í °°½À´Ï´Ù.    ÇÏÁö¸¸ ¹æ½ÉÀº ±Ý¹°À̵í ÇÏ·ç¶óµµ ¹é¾÷ÇÏÁö ¾ÊÀ¸¸é ¼Õ°¡¶ôÀÌ ¸¶ºñµÉ Á¤µµ·Î ¹é¾÷Çصµ ÈÄȸ´Â ¾È ÇÒ °ÍÀÔ´Ï´Ù.    MysqlÀÇ º¹±¸´Â /usr/local/mysql/bin µð·ºÅ丮¿¡ Á¸ÀçÇÏ´Â isamchk¸¦ ÀÌ¿ëÇؼ­ ÇÕ´Ï´Ù.    isamchkÀÇ °æ¿ì »ó´çÈ÷ ¼¼¹ÐÇÑ ¹æ¹ýÀ¸·Î µ¥ÀÌÅͺ£À̽ºÀÇ ÆÄ¼Õ ¿©ºÎ¸¦ Á¡°ËÇÏ°í º¹±¸ÇÕ´Ï´Ù.

isamchk »ç¿ëÇϱâ

#isamchk ¿É¼Ç Å×À̺í¸í 

 
MysqlÀÇ °æ¿ì ´ëºÎºÐ isamchk¸¦ µ¹¸± Á¤µµÀÇ ¿¡·¯ ¹ß»ýÀº ÀûÀº ÆíÀÔ´Ï´Ù. ÇÏÁö¸¸, ±â°è´Â ¾ó¸¶µçÁö ¿¹°í¾øÀÌ

Á¤ÁöÇϰųª ¸»½é ÀÏÀ¸Å³ ¼ÒÁö¸¦ °¡Áö°í Àֱ⠶§¹®¿¡ ²À ÇÊ¿äÇÑ À¯Æ¿¸®Æ¼ÀÔ´Ï´Ù.

  
isamchk ¿É¼Ç

    #isamchk --help·Î ´Ù¾çÇÑ ¿É¼ÇÀ» È®ÀÎÇϱ⠹ٶø´Ï´Ù.
    #isamchk Å×À̺í¸í - ÇØ´ç Å×À̺íÀÇ ¿¡·¯¸¦ Á¡°ËÇÕ´Ï´Ù. »ó´çÇÑ ºÎºÐ±îÁö ¿¡·¯¸¦ Á¡°ËÇØ ÁÝ´Ï´Ù.
    #isamchk -e Å×À̺í¸í - ÇØ´ç Å×À̺íÀÇ ¸ðµç µ¥ÀÌÅ͸¦ Á¡°ËÇØ ÁÝ´Ï´Ù.  -i ¿É¼ÇÀ» Ãß°¡ÇÒ°æ¿ì Åë°èµµ º¸¿© ÁÝ´Ï´Ù.
    #isamchk -r -q Å×À̺í¸í - ÇØ´ç Å×À̺íÀÇ ¿¡·¯¸¦ ½±°í ºü¸£°Ô º¹±¸ÇØ ÁÝ´Ï´Ù.


ÀÌ °°ÀÌ isamchk¸¦ »ç¿ëÇÔÀ¸·Î½á ¾ÈÀüÇÏ°Ô º¹±¸ÇÒ ¼ö ÀÖ½À´Ï´Ù. ´õ »ó¼¼ÇÑ ¹æ¹ýÀº --help¸¦ »ç¿ëÇؼ­ È®ÀÎÇϱ⠹ٶø´Ï´Ù.

mysqlÀÇ ¹é¾÷Çϱâ

#mysqldump -h È£½ºÆ®¸í -u À¯Àú¸í -p µ¥ÀÌÅͺ£À̽º¸í > ¹é¾÷µÇ¾îÁú ÆÄÀϸí

Mysql ¹é¾÷ÀÇ °æ¿ì /usr/local/mysql/bin µð·ºÅ丮¿¡ Á¸ÀçÇÏ´Â mysqldump¸¦ ÀÌ¿ëÇÏ´Â ¹æ¹ýÀÔ´Ï´Ù.

    À§ÀÇ test µ¥ÀÌÅͺ£À̽º¸¦ test_bak.sql ÆÄÀÏ·Î ÀúÀåÇß½À´Ï´Ù. ¹°·Ð ÀúÀåµÈ ÆÄÀÏÀº /bin µð·ºÅ丮¿¡ »ý¼ºµË´Ï´Ù.

ÀúÀåµÈ ÆÄÀÏ º¹±¸Çϱâ

#mysql -h È£½ºÆ®¸í -u À¯Àú¸í -p µ¥ÀÌÅͺ£À̽º¸í < ¹é¾÷µÈ ÆÄÀϸí
 
ÇØ´ç ¹é¾÷ ÆÄÀÏÀ» ´Ù½Ã ¿ø»ó º¹±¸ ½Ãŵ´Ï´Ù.


Âü°í·Î mysqlÀÇ µ¥ÀÌÅͺ£À̽º¸¦ »èÁ¦ÇÏ´Â ¹æ¹ýÀº ´ÙÀ½°ú °°½À´Ï´Ù.

drop database µ¥ÀÌÅͺ£À̽º ¸í;

°£È¤ Å×À̺í Áö¿ì´Â ¸í·ÉÀº ¾Æ´Âµ¥ µ¥ÀÌÅͺ£À̽º Áö¿ì´Â ¸í·ÉÀ» ¸ð¸£´Â ºÐµéÀÌ ¸¹´õ±º¿ä. 

         
´ÙÀ½ Àå¿¡¼­´Â Mysql ÇÔ¼ö¸¦ ¼³¸íÇÏ°Ú½À´Ï´Ù.

10. MYSQL ÁÖ¿äÇÔ¼ö

¿©±â¼­´Â mysql¿¡ »ç¿ëµÇ´Â Áß¿äÇÑ ¸î °¡Áö ±âº» ÇÔ¼öµéÀ» ¼Ò°³ÇÏ°Ú½À´Ï´Ù.    ´ëºÎºÐÀÇ ÇÔ¼ö°¡ php¿Í ¿¬°üÇÏ¿© ºñ½ÁÇÑ °ÍµéÀÌ ¸¹ÀÌ ÀÖ½À´Ï´Ù.    php¿¡¼­ ¸¸¾à ÀÌ ÇÔ¼ö¸¦ »ç¿ëÇÏ·Á¸é mysql query ¹®À» ÀÌ¿ëÇÏ´Â ¹æ¹ýµµ ÀÖ½À´Ï´Ù.    (¿©±â¼­ÀÇ ¼³¸íÀº Á÷Á¢ local¿¡¼­ Á¢¼ÓÇؼ­ ÇÏ´Â °Íº¸´Ù Ŭ¶óÀ̾ðÆ®¿¡¼­ telnetÀ¸·Î Á¢¼ÓÇؼ­ »ç¿ëÇÑ ¿¹¸¦ ´õ ¸¹ÀÌ µé¾ú½À´Ï´Ù.)

10.1 ¿¬»êÀÚ

¿¬»êÀÚÀÇ °æ¿ì ÀϹÝÀûÀ¸·Î »ç¿ëÇÏ´Â ¿¬»êÀÚµéÀ» »ç¿ëÇÕ´Ï´Ù.    "+" , "-" , "*" , "/" µî ÀÔ´Ï´Ù.    ±×·³ °¢°¢ÀÇ ¼öÇà °á°ú¸¦ È®ÀÎ ÇÏ°Ú½À´Ï´Ù.

À§¿¡¼­ "( )" »ç¿ë¾øÀÌ ¿¬»êÀ» Ç߱⠶§¹®¿¡ ¿ì¼± ¼øÀ§°¡ À§ÀÎ ¿¬»êÀÚºÎÅÍ ¿¬»êÀÌ ÀÌ·ç¾î Á³½À´Ï´Ù.
        
¸¸¾à, (1+4)*4·Î Çß´Ù¸é °á°ú´Â 20ÀÌ µÉ °ÍÀÔ´Ï´Ù.

    À§¿Í ´Ù¸£°Ô (4-2) °¡ (4-4)ÀÏ °æ¿ì "null" À» Ãâ·ÂÇÕ´Ï´Ù.

10.2 ºñ±³ ¿¬»êÀÚ

ºñ±³ ¿¬»êÀÚ´Â °á°ú°¡ Âü(1) °ú °ÅÁþ(0)À¸·Î °á°ú¸¦ Ãâ·ÂÇÕ´Ï´Ù.

±×¸®°í ºñ±³ ¿¬»êÀÚÀÇ °æ¿ì ¸î °¡Áö ±ÔÄ¢ÀÌ ÀÖ½À´Ï´Ù.

    ~ Àμö°¡ ¸ðµÎ ¹®ÀÚ¿­ÀÌ¸é ¹®ÀÚ¿­·Î ºñ±³µË´Ï´Ù.
    ~ Àμö°¡ ¸ðµÎ Á¤¼ö¸é Á¤¼ö·Î ºñ±³µË´Ï´Ù.
    ~ Àμö°¡ ¸ðµÎ "null" ÀÌ¸é ¿¬»êÀÇ °á°úµµ "null"ÀÌ µË´Ï´Ù.
    ~ ÇÑÂÊÀÇ Àμö°¡ "timestamp" ÀÌ¸é ³ª¸ÓÁöµµ °°ÀÌ º¯È¯µÇ¾î ºñ±³µË´Ï´Ù.
    ~ ÇÑÂÊÀÇ Àμö°¡ "datetime" ÀÌ¸é ³ª¸ÓÁöµµ °°ÀÌ º¯È¯µÇ¾î ºñ±³µË´Ï´Ù.
    ~ ³ª¸ÓÁöÀÇ °æ¿ì´Â ºÎµ¿¼Ò¼öÁ¡ ½Ç¼ö·Î ºñ±³µË´Ï´Ù.

±âÈ£·Î´Â 

    "=" - °°´Ù 
    "!= ,<>" - °°Áö ¾Ê´Ù  
    "<=" - À۰ųª °°´Ù 
    "<" - ÀÛ´Ù  
    ">=" - Å©°Å³ª °°´Ù 
    ">" - Å©´Ù
    "<=>" - µÑ Áß ÇÑÂÊÀÌ "null" ÀÏ °æ¿ì 0À» Ãâ·Â

    ÀÎÀÚ between (ÃÖ¼Ò°ª) and (ÃÖ´ë°ª) - ÀÎÀÚ°¡ ÃÖ¼Ò°ª°ú ÃÖ´ë°ª »çÀÌ¿¡ Á¸Àç Çϸé "1"À» ±×·¸Áö
    ¾ÊÀ» °æ¿ì "0"À» Ãâ·ÂÇÕ´Ï´Ù.

    ÀÎÀÚ in (°ª, °ª, ¡¦) - ÀÎÀÚ°¡ ( ) ¾È¿¡ Á¸ÀçÇϸé "1"À» ±×·¸Áö ¾ÊÀ¸¸é "0"À» Ãâ·ÂÇÕ´Ï´Ù.

À§ ±×¸²Àº °á°ú°¡ °ÅÁþ À̹ǷΠ"0"À» Ãâ·Â ÇÕ´Ï´Ù.

±×¸². 13-5ÀÇ °á°ú´Â ÂüÀ̹ǷΠ"1"À» ¸®ÅÏÇÕ´Ï´Ù.

"jun" Ç׸ñ ¾È¿¡ ¾ø±â ¶§¹®¿¡ °ÅÁþÀ̹ǷΠ"0"À» ¸®ÅÏÇÕ´Ï´Ù.

10.3 ³¯Â¥¿Í ½Ã°£ °ü·Ã ÇÔ¼ö

³¯Â¥¿Í ½Ã°£ °ü·Ã ÇÔ¼ö´Â ¿©·¯¸ð·Î »ç¿ëÇÏ´Â °÷ÀÌ ¸¹Àº ºÎºÐÀÔ´Ï´Ù.    ´ëºÎºÐÀÇ Ç¥Çö¿¡¼­ ³¯Â¥¿Í ½Ã°£Àº ²À µé¾î°¡±â ¶§¹®¿¡ ÀÌ ºÎºÐÀ» ¸ÕÀú ´Ù·çµµ·Ï ÇÏ°Ú½À´Ï´Ù.

MONTHNAME("³¯Â¥") - ÇØ´çÇÏ´Â ³¯Â¥ÀÇ ¿ùÀ» ¿µ¾î·Î ¸®ÅÏÇÕ´Ï´Ù.

QUARTER("³¯Â¥") - ÇØ´çÇÏ´Â ³¯Â¥ÀÇ ºÐ±â¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

YEAR("³¯Â¥") - ÇØ´ç ³¯Â¥ÀÇ ³âµµ¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

HOUR("½Ã°£") - ÇØ´çÇÏ´Â ½Ã°£À» ¸®ÅÏÇÕ´Ï´Ù.

MINUTE("½Ã°£") - ÇØ´ç ½Ã°£ÀÇ ºÐÀ» ¸®ÅÏÇÕ´Ï´Ù.

SECOND("½Ã°£") - ÇØ´ç ½Ã°£ÀÇ Ãʸ¦ ¸®ÅÏÇÕ´Ï´Ù.

PERIOD_ADD(³¯Â¥, N) - ÇØ´çÇÏ´Â ³¯Â¥¿¡ÀÇ °³¿ù¿¡ "N"°³¿ùÀ» ´õ ÇÕ´Ï´Ù.
                     (³¯Â¥´Â YYMM, YYYYMMÇü½ÄÀ¸·Î ÁÖ¾îÁö¸é YYYYMM Çü½ÄÀ¸·Î ¸®ÅÏÇÕ´Ï´Ù.)

CURDARE( ) - ¿À´Ã ³¯Â¥¸¦ YYYY-MM-DD ¶Ç´Â YYYYMMDD Çü½ÄÀ¸·Î ¸®ÅÏÇØ ÁÝ´Ï´Ù.
             ÇÔ¼ö°¡ ¹®ÀÚ¿­ ¶Ç´Â ¼ýÀÚ·Î »ç¿ëµÊ¿¡ µû¶ó ¸®ÅÏ °ªÀº ´Þ¶ó Áý´Ï´Ù.

CURTIME( ) - ÇöÀç ½Ã°£À» HH:MM:SS ¶Ç´Â HHMMSS Çü½ÄÀ¸·Î ¸®ÅÏÇØ ÁÝ´Ï´Ù.
             ÀÌ ÇÔ¼ö ¿ª½Ã ÇÔ¼ö°¡ ¹®ÀÚ¿­ ¶Ç´Â ¼ýÀÚ·Î »ç¿ëµÊ¿¡ µû¶ó ¸®ÅÏ °ªÀÌ ´Þ¶ó Áý´Ï´Ù.

NOW( ) - ÇöÀçÀÇ ³¯Â¥¿Í ½Ã°£À» ¸®ÅÏÇÕ´Ï´Ù.

UNIX_TIMESTAMP( ) - À¯´Ð½º ŸÀÓ½ºÅÆÇÁ¸¦ ¸®ÅÏÇÕ´Ï´Ù.
                    ³¯Â¥ ÀÎÀÚ°¡ ÀÖÀ» °æ¿ì ÇØ´ç ³¯Â¥ÀÇ À¯´Ð½º ŸÀÓ½ºÅÆÇÁ¸¦ ¸®ÅÏÇÏ°í, ÀÎÀÚ°¡ ¾øÀ» °æ¿ì
                    ÇöÀçÀÇ À¯´Ð½º ŸÀÓ½ºÅÆÇÁ¸¦ ¸®ÅÏÇÕ´Ï´Ù.(ÃÊ ´ÜÀ§·Î ³ªÅ¸³À´Ï´Ù.)

FROM_UNIXTIME (À¯´Ð½º ŸÀÓ½ºÅÆÇÁ) - À¯´Ð½º ŸÀÓ½ºÅÆÇÁ ³¯Â¥¿¡¼­ ÀÏ¹Ý Çü½ÄÀÇ ³¯Â¥¿Í ½Ã°£À¸·Î ¸®ÅÏÇÕ´Ï´Ù.
                                    ÀÌ ÇÔ¼ö¸¦ ÀÌ¿ëÇؼ­ ¿øÇÏ´Â µ¥ÀÌÅÍ ÇüÅ·εµ Ãâ·ÂÀÌ °¡´ÉÇÕ´Ï´Ù.
                                   (DATE_FORMAT( ) ÇÔ¼ö´Â ³¯Â¥¿Í ½Ã°£À» ¿©·¯ °¡Áö ÇüÅ·ΠǥÇö °¡´ÉÇÏ°Ô
                                    ÇÕ´Ï´Ù. ´ÙÀ½ ÇÔ¼ö¸¦ Âü°í Çϼ¼¿ä.)

DATE_FORMAT(³¯Â¥, ÇüÅÂ) - ÇüÅÂÀÇ Á¾·ù¿¡ ¸Â°Ô ¿©·¯ °¡Áö ¾ç½ÄÀ¸·Î ³¯Â¥¿Í ½Ã°£À» ¸®ÅÏÇØ ÁÝ´Ï´Ù.
                          ƯÈ÷ ÀÌ ÇÔ¼ö´Â ÀÚÁÖ »ç¿ë µÇ¹Ç·Î °ü½ÉÀÖ°Ô º¸±â ¹Ù¶ø´Ï´Ù.

 
ÇüÅÂÀÇ Á¾·ù´Â¡¦.


    %M - ¿ù À̸§À» ¿µ¾î·Î ¸®ÅÏÇÕ´Ï´Ù.(January)
    %D - Á¢¹Ì»ç¸¦ »ç¿ëÇØ ¿µ¾î·Î ÀÏÀ» ¸®ÅÏÇÕ´Ï´Ù.(1st , 2nd ..) 
    %W - ¿äÀÏÀ» ¿µ¾î·Î ¸®ÅÏÇÕ´Ï´Ù. (Monday)
    %y - 2ÀÚ¸® ¿¬µµ¸¦ ¸®ÅÏÇÕ´Ï´Ù.
    %m - ¿ùÀ» ¼ýÀÚ·Î ¸®ÅÏÇÕ´Ï´Ù.(01 , 02 , 03)
    %d - ÀÏÀ» ¼ýÀÚ·Î ¸®ÅÏÇÕ´Ï´Ù. (00 , 01 ,02 )
    %a - ¿äÀÏÀ» ªÀº ¿µ¾î·Î ¸®ÅÏÇÕ´Ï´Ù. (Mon)
    %e - ÀÏÀ» ¼ýÀÚ·Î ¸®ÅÏÇÕ´Ï´Ù.(0 , 1 , 2)
    %c - ¿ùÀ» ¼ýÀÚ·Î ¸®ÅÏÇÕ´Ï´Ù. (1 , 2 , 3)
    %j - ÇÑÇØÀÇ ¸î ¹ø° ¿äÀÏÀÎÁö ¸®ÅÏÇÕ´Ï´Ù. (001 ~ 366)
    %b - ¿ùÀ» ªÀº ¿µ¾î·Î ¸®ÅÏÇÕ´Ï´Ù. (Jan)
    %H - 24½Ã°£ Çü½ÄÀÇ ½Ã°£À» ¸®ÅÏÇÕ´Ï´Ù. (00 ~ 23 )
    %h - 12½Ã°£ Çü½ÄÀÇ ½Ã°£À» ¸®ÅÏÇÕ´Ï´Ù. (01 ~ 12)
    %k - 24½Ã°£ Çü½ÄÀÇ ½Ã°£À» ¸®ÅÏÇÕ´Ï´Ù. (1 ~ 23)
    %l - ½Ã°£À» ¸®ÅÏÇÕ´Ï´Ù. (1 ~ 12)
    %i - ºÐÀ» ¸®ÅÏÇÕ´Ï´Ù. (00 ~ 59)
    %T - ½ÃºÐÃÊÀÇ 24½Ã°£ Çü½ÄÀ» ¸®ÅÏÇÕ´Ï´Ù. (hh:mm:ss)
    %r - ½ÃºÐÃÊÀÇ 12½Ã°£ Çü½ÄÀ» ¸®ÅÏÇÕ´Ï´Ù. (hh:mm:ss)
    %s - Ãʸ¦ ¸®ÅÏÇÕ´Ï´Ù. (00 ~ 59)
    %p - AM , PMÀ» ¸®ÅÏÇÕ´Ï´Ù.
    %w - ÀÏÁÖÀÏ Áß ¸î ¹ø° ¿äÀÏÀÎÁö ¸®ÅÏÇÕ´Ï´Ù.(0 - ÀÏ¿äÀÏ)
    %U - ÇÑÇØ Áß ¸î ¹ø° ÁÖÀÎÁö ¸®ÅÏÇÕ´Ï´Ù.(ÀÏ¿äÀÏÀÌ ½ÃÀÛ)
    %u - ÇÑÇØ Áß ¸î ¹ø° ÁÖÀÎÁö ¸®ÅÏÇÕ´Ï´Ù.(¿ù¿äÀÏÀÌ ½ÃÀÛ)

  
±×·³ ¿©·¯ °¡Áö ÇüÅÂÀÇ µ¥ÀÌÅÍ Ãâ·ÂÀ» º¸°Ú½À´Ï´Ù.

TO_DAYS(³¯Â¥) - ÇØ´ç ³¯Â¥¸¦ "0000" ºÎÅÍ Àϼö·Î ¸®ÅÏÇØ ÁÝ´Ï´Ù.

FROM_DAYS(Àϼö) - ÇØ´ç Àϼö·ÎºÎÅÍ ³¯Â¥¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

DATE_ADD(³¯Â¥,INTERVAL,Ãß°¡ºÐ) - ÇØ´ç ³¯Â¥¿Í ½Ã°£¿¡ ƯÁ¤ ³¯Â¥¿Í ½Ã°£À» ´õÇØÁÝ´Ï´Ù.

À§ ±×¸²À» º¸¸é ÇÏ·ç°¡ Ãß°¡µÈ °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.

 
¿©±â¿¡¼­ Ãß°¡ºÐÀÇ Á¾·ù¿¡ ´ëÇØ ¾Ë¾Æ º¸°í °è¼Ó ¿¹¸¦ º¸¿© µå¸®°Ú½À´Ï´Ù.

    second - Ãʸ¦ Ãß°¡ ÇÕ´Ï´Ù(interval 1 second)
    minute - ºÐÀ» Ãß°¡ ÇÕ´Ï´Ù.(interval 1 minute)
    hour - ½Ã°£À» Ãß°¡ ÇÕ´Ï´Ù.(interval 1 hour)
    day - ÀÏÀ» Ãß°¡ ÇÕ´Ï´Ù.(interval 1 day)
    month - ´ÞÀ» Ãß°¡ ÇÕ´Ï´Ù. .(interval 1 month)
    year - ³âÀ» Ãß°¡ ÇÕ´Ï´Ù. .(interval 1 year)
    minute_second - ºÐ°ú Ãʸ¦ Ãß°¡ ÇÕ´Ï´Ù. (interval "1:1" minute_second)
    hour_minute - ½Ã°£°ú ºÐÀ» Ãß°¡ ÇÕ´Ï´Ù. (interval "1:1" hour_minute)
    day_hour - ÀÏ°ú ½Ã°£À» Ãß°¡ ÇÕ´Ï´Ù. (interval "1 1" day_hour)
    year_month - ³â°ú ¿ùÀ» Ãß°¡ ÇÕ´Ï´Ù. (interval "1-1" year_month)
    hour_second - ½Ã°£°ú ºÐ, Ãʸ¦ Ãß°¡ ÇÕ´Ï´Ù. (interval "1:1:1" hour_second)
    day_minute - ÀÏ°ú ½Ã°£, ºÐÀ» Ãß°¡ ÇÕ´Ï´Ù.(interval "1 1:1" day_minute)
    day_second - ÀÏ°ú ½Ã°£, ºÐ, Ãʸ¦ Ãß°¡ ÇÕ´Ï´Ù.(interval "1 1:1:1" day_second)

¸¸¾à ³¯Â¥¿Í ½Ã°£À» »©±â¸¦ ¿øÇÑ´Ù¸é " - "¸¦ »ç¿ëÇÏ¸é µË´Ï´Ù. ¶Ç ´Ù¸¥ ¹æ¹ýÀº DATE_SUB( ) ÇÔ¼ö¸¦
»ç¿ëÇÏ´Â °ÍÀÔ´Ï´Ù.

PERIOD_DIFF(³¯Â¥1, ³¯Â¥2) - ³¯Â¥1 °ú ³¯Â¥2 »çÀÌÀÇ °³¿ù ¼ö¸¦ ¸®ÅÏÇÕ´Ï´Ù.

10.4 ¹®ÀÚ¿­ °ü·Ã ÇÔ¼ö

php ½ºÅ©¸³Æ® ÇÁ·Î±×·¡¹ÖÀ» Çϸ鼭 php¿¡¼­ Áö¿øÇÏ´Â ÇÔ¼ö¸¦ ÀÌ¿ëÇÑ ¹æ¹ýÀ¸·Î ¸¹Àº ¹®ÀÚ¿­ ó¸®ÇÏ°Ô µÉ °ÍÀÔ´Ï´Ù.    Mysql ¿ª½Ã ¹®ÀÚ¿­À» ó¸®ÇÏ´Â ¿©·¯ °¡Áö ÇÔ¼ö°¡ ÀÖ½À´Ï´Ù.    ¿©·¯ºÐµéÀº µ¥ÀÌÅ͸¦ µ¥ÀÌÅͺ£À̽º¿¡ ÀúÀåÇÒ ¶§ php ÇÔ¼ö¿¡¼­ Áö¿øÇÏ´Â ÇÔ¼ö¸¦ »ç¿ëÇÒ ¼öµµ ÀÖÁö¸¸ ¿©±â¼­ ¼³¸íÇÒ mysql ÇÔ¼ö¸¦ »ç¿ëÇصµ µË´Ï´Ù.    (¹®ÀÚ¿­ ÇÔ¼ö´Â °á°ú °ªÀÌ Á¤ÀÇµÈ ±æÀ̺¸´Ù Ŭ °æ¿ì NULLÀ» ¸®ÅÏÇÕ´Ï´Ù.)

HEX(n) - ÇØ´ç 10Áø¼ö¸¦ 16Áø¼ö·Î ¸®ÅÏÇØ ÁÝ´Ï´Ù. (NULLÀº NULL·Î ¸®ÅÏ)

OCT(n) - ÇØ´ç 10Áø¼ö¸¦ 8Áø¼ö·Î ¸®ÅÏÇØ ÁÝ´Ï´Ù.(NULL -> NULL·Î ¸®ÅÏ)

BIN(n) - ÇØ´ç 10Áø¼ö¸¦ 2Áø¼ö·Î ¸®ÅÏÇÕ´Ï´Ù. (NULL -> NULL·Î ¸®ÅÏ)

CONV(n , a , b) - ÇØ´ç ¼ýÀÚ¸¦ a Çü½ÄÀÇ Áø¼ö¿¡¼­ b Çü½ÄÀÇ Áø¼ö·Î º¯È¯Çؼ­ ¸®ÅÏÇÕ´Ï´Ù. 
                  ¾Õ¿¡¼­ ¼³¸íÇÑ °¢ Áø¼öº° º¯È¯ ¹æ¹ýÀÇ ±â´ÉÀ» ´Ù °¡Áö°í ÀÖ´Â ÇÔ¼öÀÔ´Ï´Ù.
                 (ÀÎÀÚÁß NULLÀÌ ÀÖÀ¸¸é NULLÀ» ¸®ÅÏÇÕ´Ï´Ù. 2 ~36Áø±îÁö °¡´É)

ASCII(¹®ÀÚ¿­) - ÇØ´ç ¹®ÀÚ¿­ÀÇ Ã³À½ À§Ä¡ÀÇ ASCII Äڵ带 ¸®ÅÏÇÕ´Ï´Ù.(NULL -> NULL·Î ¸®ÅÏ ÇÕ´Ï´Ù.)

    FIELD(Nstring , string , ¡¦) - Nstring¿¡ ÇØ´çÇÏ´Â ¹®ÀÚ¿­ÀÌ ¸î ¹ø° ÀÎÁö ¸®ÅÏÇÕ´Ï´Ù.

LOWER(¹®ÀÚ¿­) - ÇØ´ç ¹®ÀÚ¿­À» ¼Ò¹®ÀÚ·Î º¯È¯Çؼ­ ¸®ÅÏÇÕ´Ï´Ù.(ÄÄÆÄÀÏ ½Ã ¼±ÅÃÇÑ ¹®ÀÚ ¼³Á¤)

UPPER(¹®ÀÚ¿­) - ÇØ´ç ¹®ÀÚ¿­À» ´ë¹®ÀÚ·Î º¯È¯Çؼ­ ¸®ÅÏÇÕ´Ï´Ù.
               (ÄÄÆÄÀÏ ½Ã ¼±ÅÃÇÑ ¹®ÀÚ ¼³Á¤)

LOAD_FILE(ÆÄÀϸí) - 64kb º¸´Ù ÀÛÀº ³»¿ëÀÇ ÆÄÀÏÀ» ÀÐ¾î µé¿© ¹®ÀÚ¿­·Î ¸®ÅÏÇÕ´Ï´Ù.
                   (64kbº¸´Ù Ŭ °æ¿ì NULLÀ» ¸®ÅÏÇÕ´Ï´Ù.)

SPACE(n) - ÇØ´ç ÀÎÀÚÀÇ ¼ö ¸¸Å­ °ø¹éÀ» ¸®ÅÏÇÕ´Ï´Ù.

REVERSE(¹®ÀÚ¿­) - ÇØ´ç ¹®ÀÚ¿­ÀÇ ¼ø¼­¸¦ ¹Ù²Ù¾î ¸®ÅÏÇÕ´Ï´Ù.

INSERT(¹®ÀÚ¿­, a , b , ¹®ÀÚ¿­1) - ÇØ´ç ¹®ÀÚ¿­À» a À§Ä¡ºÎÅÍ b Å©±â ¸¸Å­ ¹®ÀÚ¿­1À» ³Ö¾î ¸®ÅÏÇÕ´Ï´Ù.

SUBSTRING_INDEX(¹®ÀÚ¿­, a , count ) - ÇØ´ç ¹®ÀÚ¿­À»  a·Î ±¸ºÐÇؼ­ ¹è¿­·Î ¸¸µé°í count ¼ö¸¸Å­ ¸®ÅÏÇØ
                                      ÁÝ´Ï´Ù.   ¿À¸¥ÂʺÎÅÍ Ãâ·ÂÇÏ±æ ¿øÇϸé À½¼ö¸¦ ÀûÀ¸¸é µË´Ï´Ù.

REPEAT(¹®ÀÚ¿­ , c ) - ÇØ´ç ¹®ÀÚ¿­À»  c ¸¸Å­ ¹Ýº¹Çؼ­ ¸®ÅÏÇÕ´Ï´Ù.

LTRIM(¹®ÀÚ¿­) - ÇØ´ç ¹®ÀÚ¿­ÀÇ ¿ÞÂÊ °ø¹éÀ» Á¦°ÅÇÕ´Ï´Ù.

RTRIM(¹®ÀÚ¿­) - ÇØ´ç ¹®ÀÚ¿­ÀÇ ¿À¸¥ÂÊ °ø¹éÀ» Á¦°ÅÇÏ°í ¸®ÅÏÇÕ´Ï´Ù.

TRIM(¿É¼Ç a FROM ¹®ÀÚ¿­) - ÁÖ¾îÁø ¿É¼Ç¿¡ µû¶ó a ¹®ÀÚ¸¦ Á¦°ÅÇÏ°í ¸®ÅÏÇÕ´Ï´Ù.
                           ¿É¼Ç¿¡´Â LEADING | TRAILING | BOTH µîÀÌ ÀÖÀ¸¸ç °¢°¢ ¾ÕÂÊ °ø¹éÁ¦°Å | µÚÂÊ °ø¹é Á¦°Å 
                           | ¾ÕµÚ °ø¹é Á¦°ÅÀÔ´Ï´Ù. 

CONCAT(¹®ÀÚ¿­, ¹®ÀÚ¿­ ¡¦..) - ÇØ´ç ¹®ÀÚ¿­À» À̾î ÁÝ´Ï´Ù.
                              ÀÌ ÇÔ¼ö´Â phpÀÇ " . "À» ÀÌ¿ëÇÑ ¹®ÀÚ¿­ ¿¬°á ¹æ¹ý°ú À¯»ç ÇÕ´Ï´Ù.
                             (NULL -> NULL·Î ¸®ÅÏÇÕ´Ï´Ù.)

LEFT(¹®ÀÚ¿­,n) - n ¸¸Å­ ÇØ´ç ¹®ÀÚ¿­À» ¿ÞÂʺÎÅÍ ¸®ÅÏÇÕ´Ï´Ù. 

RIGHT(¹®ÀÚ¿­, n) - n¸¸Å­ ÇØ´ç ¹®ÀÚ¿­À» ¿À¸¥ÂʺÎÅÍ ¸®ÅÏÇÕ´Ï´Ù.

LOCATE(a , b) - a(¹®ÀÚ¿­)°¡ b(¹®ÀÚ¿­)¿¡¼­ óÀ½ºÎÅÍ ¸î ¹ø° À§Ä¡ÀÎÁö ¸®ÅÏÇÕ´Ï´Ù.

LPAD(¹®ÀÚ¿­ , a , b) - ÇØ´ç ¹®ÀÚ¿­¿¡ a ±æÀÌ ¸¸Å­ b ¹®ÀÚ¸¦ ¿ÞÂʺÎÅÍ ³Ö¾î ¸®ÅÏÇÕ´Ï´Ù.

RPAD(¹®ÀÚ¿­, a , b) - ÇØ´ç ¹®ÀÚ¿­¿¡ a ±æÀ̸¸Å­ b ¹®ÀÚ¸¦ ¿À¸¥ÂÊ¿¡ ³Ö¾î ¸®ÅÏÇÕ´Ï´Ù.

¿©±â±îÁö ¹®ÀÚ¿­ ÇÔ¼öÀÇ ´ëºÎºÐÀ» ¼³¸íÇß½À´Ï´Ù.
        
¸î °¡Áö ºüÁø ÇÔ¼öµéµµ ÀÖÁö¸¸ ¿©±â ÀÖ´Â °Í¸¸À¸·Îµµ ´ëºÎºÐÀ» Ç¥ÇöÇϱâ´Â ÃæºÐÇÕ´Ï´Ù.

10.5 ±âŸ ÇÔ¼öµé

mysqlÀÇ ¼öÇÐ ÇÔ¼ö´Â ¿©±â¼­ ´Ù·çÁö ¾Êµµ·Ï ÇÏ°Ú½À´Ï´Ù.    ´ëºÎºÐÀÇ °æ¿ì php ÇÔ¼ö°¡ ´ë½Å ÇÒ ¼ö Àֱ⠶§¹®¿¡ ±¸Áö mysql ÇÔ¼ö¸¦ ÀÌ¿ëÇØ ¼öÇכּêÀ» ÇÒ ÇÊ¿ä´Â ¾ø½À´Ï´Ù.    ÇÏÁö¸¸ ¾î´À °æ¿ìµç ²À »ç¿ëÇؾ߸¸ ÇÒ °æ¿ì´Â mysql ¸Å´º¾óÀ» º¸½Ã±â ¹Ù¶ø´Ï´Ù.    ÂªÀº ¿µ¾î ½Ç·ÂÀ¸·Îµµ ÃæºÐÈ÷ º¸½Ç ¼ö ÀÖ´Â ¸Å´º¾óÀ̱⠶§¹®¿¡ °ÆÁ¤Àº ÇÊ¿ä ¾ø½À´Ï´Ù.    ±×·³, ¿©±â¼­´Â ÀÚÁÖ »ç¿ëµÇ´Â ³ª¸ÓÁö ÇÔ¼öµéÀ» ¼³¸íÇÏ°Ú½À´Ï´Ù.

USER() - ÇöÀç mysql¿¡ Á¢¼Ó ÁßÀÎ »ç¿ëÀÚ À̸§À» ¸®ÅÏÇÕ´Ï´Ù.
VERSION( ) - mysqlÀÇ ¹öÀüÀ» ¸®ÅÏÇØ ÁÝ´Ï´Ù.

PASSWORD(¹®ÀÚ¿­) - ÀÌ ÇÔ¼ö´Â mysqlÀÇ µ¥ÀÌÅÍ º£À̽º¿¡ ¹®ÀÚ¿­À» ¾Ïȣȭ Çؼ­ ÀúÀåÇØ ÁÝ´Ï´Ù.
                   ´ëºÎºÐÀÇ °æ¿ì »ç¿ëÀÚ ÀÎÁõ¿¡ ÀÌ¿ëÇÕ´Ï´Ù.   Áï, ¾ÏȣȭµÈ ¹®ÀÚ¿­³¢¸® ºñ±³ÇÔÀ¸·Î Çؼ­ 
                   ÀÎÁõÀ» ÇÏ´Â °ÍÀÔ´Ï´Ù.
                   µÚ¿¡ ¼³¸íÇÒ admin toolÀÇ »ç¿ëÀÚ ÀÎÁõ ¿ª½Ã ÀÌ ¹æ¹ýÀ» ÀÌ¿ëÇß½À´Ï´Ù.

ÀÌ·¸°Ô Áß¿äÇÏ°Ô »ç¿ëµÇ´Â ¸î °¡Áö ÇÔ¼öµéÀ» ºÃ½À´Ï´Ù.
´ëºÎºÐÀÇ ÇÁ·Î±×·¥°ú ½ºÅ©¸³Æ®µéÀº °ÅÀÇ ºñ½ÁÇÑ ¾ç½ÄÀÇ ÇÔ¼ö¸¦ °¡Áö°í ÀÖ½À´Ï´Ù. 
±×·¡¼­ ´Ù¸¥ °÷¿¡¼­ ºñ½ÁÇÑ ÇÔ¼ö¸¦ º¸¸é ±× ±â´ÉÀÌ ¹«¾ùÀÎÁö´Â ¾î´ÀÁ¤µµ ¿¹»óÇÒ ¼ö ÀÖ½À´Ï´Ù.
²À ÇÊ¿äÇÑ °ÍÀ» È®½ÇÈ÷ ÀÌÇØÇÏ´Â °Íµµ Áß¿äÇÕ´Ï´Ù.
¿©·¯ °¡Áö¸¦ µÎ¼­ ¾øÀÌ ¹è¿ì¸é È¥¶õ½º·¯¿ö¼­ ±×¸¸Å­ ¼ÕÇØ º¸´Â ºÎºÐµµ ÀÖ½À´Ï´Ù.
¾Æ¹«ÂÉ·Ï ÀÌ Ã¥¿¡ ³ª¿­µÈ ÇÔ¼ö¿¡¸¸ ±¹ÇѵÇÁö ¸»±â¸¦ ¹Ù¶ø´Ï´Ù.

  
´ÙÀ½ Àå¿¡¼­´Â ¼Ò½º ºÎºÐÀÇ °¢ È­¸éÀ» ¼³¸íÇÏ°Ú½À´Ï´Ù.


Âü°í. 11ÀåÀº ¿ø·¡ ¾ÕÀ¸·Î ¸¸µé¾îº¼ »çÀÌÆ®ÀÇ °¢ È­¸éÀ» ¼³¸íÇÑ ºÎºÐ ÀÔ´Ï´Ù.
      º» ³»¿ë°ú Á¶±Ý ´Ù¸¦ ¼ö ÀÖÀ¸¸ç ¸¸µé¾îº¼ ¼Ò½º´Â Áö±ÝÀº ¾ÆÁÖ Ãʺ¸ÀûÀÎ °ÍÀ̸ç ÄíÅ°¿Í ¼¼¼Ç »ç¿ëµî¿¡¼­
      À߸øµÈ Á¡ÀÌ ÀÖ½À´Ï´Ù.   ÀÌ ºÎºÐÀº °øºÎÇØ º¸±â ¹Ù¶ø´Ï´Ù. Á¤¸»·Î phpÇÁ·Î±×·¡¹ÖÀ» ÇÏ·Á¸é ¸ðµç html
      ű״ ¾ó¸¶ º¸¿©ÁöÁö ¾Ê½À´Ï´Ù.
      ±×°ÍÀº <td> ÅÂÅ© °ú ¿©Å¸ ÅÂ±× Çϳª ±îÁö ¾ð¾î·Î ¸¸µé¾î ¹ö¸®±â ¶§¹®ÀÔ´Ï´Ù.
      ÇÏÁö¸¸ ¿©±â¼­ ¼Ò°³ÇÏ´Â ¼Ò½º´Â Á¤¸» ÇãÁ¢ÇÑ °ÍÀ̸ç óÀ½ Á¢ÇÏ´Â ÀÌ¿¡°Ô´Â À̺¸´Ù ÁÁÀº ¼Ò½º´Â ¾øÀ»
      µí ÇÕ´Ï´Ù.   ¸ðµç°Ô htmlÅÂ±×¸ç ºÎºÐ ºÎºÐ ¾ð¾î°¡ µé¾î °©´Ï´Ù. 

      ÀÌ ¸ðµç°É ÀÌÇØ Çß´Ù¸é ÀÌÁ¦ ¿©·¯ºÐµéÀº class ¹æ½ÄÀ¸·Î ¸ðµç°É ÇÁ·Î±×·¡¹Ö Çغ¸±â ¹Ù¶ø´Ï´Ù. 
          
      ±×¸®°í ÁøÁ¤ÇÑ ¾ð¾î(C,C++,java)¸¦ ½ÃÀÛÇϼ¼¿ä¡¦

11. »çÀÌÆ® µÑ·¯º¸±â

ÀÌ Àå¿¡¼­´Â ¿©·¯ºÐµéÀÌ ¸¸µé¾îº¼ ½ºÅ©¸³Æ®ÀÇ ÇüŸ¦ ±×¸²À¸·Î È®ÀÎ ÇÒ ¼ö ÀÖ°Ô Çß½À´Ï´Ù.    ¸ÕÀú »ç¿ëÀÚÀÇ ·Î±×Àΰú ·Î±×¾Æ¿ô , °¢ °Ô½ÃÆÇÀÇ Á¤º¸¸¦ º¸¿© ÁÖ´Â »çÀÌÆ® ¸ÞÀÎ È­¸é°ú °£´ÜÇÑ ÆÄÀÏÀ» °øÀ¯ÇÏ´Â ÀÚ·á½Ç ±×¸®°í, °³ÀÎÀÇ ¹°°ÇÀ» »ç°í ÆÄ´Â °æ¸Å °Ô½ÃÆÇ, ¶Ç ´Ù¾çÇÑ »óÇ°À» Áø¿­Çؼ­ ±¸ÀÔ ÇÒ ¼ö ÀÖ´Â ¼îÇÎ ¸ô ¸¶Áö¸·À¸·Î »çÀÌÆ® Àü¹Ý¿¡ °ÉÄ£ °ü¸®¸¦ ÇÏ´Â admin¿µ¿ª µîÀ» »ìÆì º¸°Ú½À´Ï´Ù.

11.1 ¸ÞÀÎ È­¸é

»çÀÌÆ®ÀÇ ¸ÞÀÎ È­¸éÀº ´ëºÎºÐÀÇ »ó¾÷ÀûÀÎ »çÀÌÆ®ÀÇ °æ¿ì ±¤°í¿Í °£´ÜÇÑ ´º½º¿Í Á¤º¸¸¦ Á¦°ø ÇÕ´Ï´Ù.    ¿ì¸®°¡ ¸¸µé¾îº¼ ¸ÞÀÎ È­¸éÀº »ç¿ëÀÚÀÇ ·Î±×Àΰú ·Î±×¾Æ¿ô , °¢ °Ô½ÃÆÇÀÇ TOP±Û µîÀ» Ãâ·Â ÇÕ´Ï´Ù.    ÀÌ°ÍÀº ´Ù¼Ò »ó¾÷ÀûÀÎ »çÀÌÆ®º¸´Ù´Â ¹Ì¾à ÇÏÁö¸¸ Á¶±ÝÀÇ ¼öÁ¤¸¸À¸·Îµµ ÃæºÐÈ÷ »ó¾÷ÀûÀÎ »çÀÌÆ®·Î º¯¸ðÇÒ ¼ö ÀÖ½À´Ï´Ù.

¸ÞÀÎÈ­¸é

»çÀÌÆ®¿¡ óÀ½ Á¢¼Ó ÇßÀ» ¶§ È­¸é ÀÔ´Ï´Ù. ¸ÕÀú µî·ÏµÈ ¾ÆÀ̵𳪠guest·Î ·Î±×ÀÎÀÌ °¡´É ÇÏ°í, ·Î±×ÀÎ ÇßÀ»
°æ¿ì È­¸é¿¡ ·Î±×ÀÎ ID¸¦ Ãâ·ÂÇÕ´Ï´Ù.   ·Î±×ÀÎÀ» ¾ÈÇßÀ» °æ¿ì³ª guest·Î ·Î±×ÀÎ ÇßÀ» °æ¿ì´Â ȸ¿ø°¡ÀÔ ¸µÅ©
¸¦ »ý¼ºÇÏ¸ç µî·ÏµÈ ID , guest ¸ðµÎ äÆÃÀº °¡´ÉÇÕ´Ï´Ù. 
´ÙÀ½ Â÷·Ê·Î ÀÚ·á½Ç , °æ¸Å , ¼îÇÎ ¸ô ÀÇ ¸µÅ©¸¦ »ý¼º ÇÏ°í, ÀÚ·á½Ç°ú °æ¸ÅÀÇ TOP ±ÛÀ» Ãâ·Â ÇÕ´Ï´Ù.
¸ÞÀÎ È­¸éÀÇ ¸¶Áö¸· ºÎºÐÀº admin¿µ¿ª¿¡¼­ »ý¼ºÇÑ ÀÚ·á½Ç°ú °æ¸Å °Ô½ÃÆÇÀÇ ³ª¸ÓÁö¸¦ ¸ðµÎ Ãâ·Â ÇÕ´Ï´Ù.

ȸ¿ø °¡ÀÔ

¸ÞÀÎ È­¸é¿¡¼­ ȸ¿ø °¡ÀÔÀ» Ŭ¸¯ ÇÏ¸é º¸¿©ÁÖ´Â È­¸é ÀÔ´Ï´Ù.

äÆà ¸ðµå

µî·ÏµÈ ID³ª guest·Î ·Î±×ÀÎ ÇßÀ» °æ¿ì äÆÃÀ» ÇÏ´Â ¸ðµå ÀÔ´Ï´Ù.
ÀÌ Ã¤Æà ¸ðµå´Â °£´ÜÈ÷ ÇØ´ç »çÀÌÆ®¿¡ Á¢¼ÓÇÑ »ç¶÷ ³¢¸® ±ÛÀ» ÁÖ°í ¹ÞÀ» ¼ö ÀÖ´Â ±â´É ÀÌ¸ç ¸ÞŸ Åױ׸¦ ÀÌ¿ëÇØ
ÆÄÀÏÀ» ÀÏÁ¤ ÁÖ±â·Î ÀÐ¾î µéÀÌ´Â ¹æ¹ýÀ» ÅÃÇß½À´Ï´Ù. ÀÌ°ÍÀº »ç¶÷ÀÌ ¸¹À» °æ¿ì ºÎÇÏ°¡ »ý±â´Â ´ÜÁ¡ÀÌ ÀÖ½À´Ï´Ù.

11.2 ÀÚ·á½Ç

ÀÚ·á½ÇÀº guestÀÇ °æ¿ì ÀÚ·áÀÇ ´Ù¿î¸¸ °¡´É ÇÏ¸ç µî·ÏÀÚÀÇ °æ¿ì ÆÄÀÏÀÇ µî·Ï°ú ´Ù¿î ¸ðµÎ °¡´É ÇÕ´Ï´Ù.    °£´ÜÇÑ ÆÄÀÏÀ» ÁÖ°í ¹Þ´Â±â´ÉÀ» °¡Áö¸ç ÀÚ·á½ÇÀÇ °ø°³¸¦ ¸ñÀûÀ¸·Î ÇÕ´Ï´Ù.    ÀÚ·á½Ç ¸ÞÀÎ È­¸éÀº µî·Ï ÀڷḦ °Ô½ÃÆÇ Çü½ÄÀ¸·Î º¸¿© ÁÖ¸ç ÀÚ·áÀÇ ¼³¸íÀ» º¼ ¼ö ÀÖ°í, µî·ÏÀÏ , µî·ÏÀÚ , µî·ÏÀÏ , ÀÚ·áÀÇ »èÁ¦ , ÀÚ·áÀÇ µî·Ï , ÀÚ·á ÀÀ´ä ±Û , ÀÚ·áÀÇ °Ë»ö ±â´ÉÀÌ ÀÖ½À´Ï´Ù.

ÀÚ·á ¼³¸í º¸±â

ƯÁ¤ ÀÚ·á Á¦¸ñÀ» Ŭ¸¯ Çϸé ÇØ´ç ÀÚ·á¿¡ ´ëÇÑ ¼³¸í°ú ÀÀ´ä ±ÛÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.

ÀÀ´ä ±Û ¿Ã¸®±â

ƯÁ¤ ÀÚ·á¿¡ ´ëÇÑ ÀÀ´ä ±ÛÀ» ¿Ã¸®´Â È­¸é ÀÔ´Ï´Ù.

ÀÚ·á ¼öÁ¤ Çϱâ

µî·ÏµÈ ÀÚ·áÀÇ ÆÄÀÏÀ» Á¦¿ÜÇÑ ºÎºÐÀ» ¼öÁ¤ ÇÕ´Ï´Ù.

ÀÚ·á »èÁ¦ Çϱâ

µî·ÏÇÑ ÀڷḦ »èÁ¦ÇÏ´Â ºÎºÐÀÌ¸ç µî·ÏÀÚÀÇ Æнº¿öµå¸¦ ÀÔ·ÂÇØ¾ß ÇÕ´Ï´Ù.

ÀÚ·á µî·ÏÇϱâ

ÀÚ·á½Ç¿¡ »õ·Î¿î ÀڷḦ µî·Ï ÇÏ´Â È­¸é ÀÔ´Ï´Ù.

11.3 °æ¸Å °Ô½ÃÆÇ

°æ¸Å °Ô½ÃÆÇÀº ¸ÕÀú ȸ¿ø °¡ÀÔÀ» ÇÑ ÈÄ »ç¿ëÀÌ °¡´É ÇÕ´Ï´Ù.    ¹°·Ð guest·Î´Â È­¸é¸¸ º¼ ¼ö ÀÖÀ¸¸ç ³ª¸ÓÁö °æ¸Å ±â´ÉÀº »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.    µî·ÏÀÚÀÎ °æ¿ì °æ¸Å¸¦ µî·Ï ÇÏ°í ÇØ´ç °æ¸ÅÀÇ ±ÛÀ» ¼öÁ¤ , »èÁ¦ ÇÒ ¼ö ÀÖ½À´Ï´Ù.    °æ¸Å´Â ¸¶°¨ ³¯Â¥¿¡ Á¾·á µÇ¸ç ´Ù½Ã Àç°³ Çϱâ À§Çؼ­´Â µî·ÏÀÚ°¡ ³¯Â¥¸¦ ¼öÁ¤ ÇÏ¸é µË´Ï´Ù.    ¸¶°¨ ³¯Â¥¿¡ ÇØ´ç °æ¸Å°¡ ÀÚµ¿ »èÁ¦ µÇ´Â ±â´ÉÀº ¾ø½À´Ï´Ù.    ´ÜÁö °æ¸ÅÀÇ Á¾·á¸¦ ¾Ë¸®´Â ¸ÞÀÏÀÌ ¸ÅµµÀÚ¿Í ³«ÂûÀÚ¿¡°Ô ¹è´ÞµË´Ï´Ù.    °³¼±ÇÒ ºÎºÐÀº º¸´Ù »ç¿ëÀÚ Áß½ÉÀÇ ¸ÞÀÏ Àü¼Û°ú ÀÚµ¿ »èÁ¦ ±â´ÉÀÇ Ãß°¡ ÀÔ´Ï´Ù.

°æ¸Å ³»¿ë º¸±â

¸ÞÀÎ È­¸é¿¡¼­ ƯÁ¤ °æ¸Å Á¦¸ñÀ» Ŭ¸¯ ÇÏ¸é º¸¿©ÁÖ´Â ºÎºÐÀÔ´Ï´Ù.
°æ¸Å µî·ÏÀÚÀÇ ½Å»ó°ú ÀÔÂû , °æ¸Å ¼öÁ¤ , »èÁ¦ , ÀÔÂû »èÁ¦ µîÀÇ ±â´ÉÀÌ ÀÖ½À´Ï´Ù.

ÀÔÂû Çϱâ

ÇØ´ç °æ¸Å¿¡ ´ëÇÑ ÀÔÂûÀ» ÇÏ´Â ±â´É ÀÔ´Ï´Ù. ±âº» ±Ý¾× ÀÌÇÏÀÏ °æ¿ì ÀÔÂûÀ» ÇÒ ¼ö °¡ ¾ø°í,ÀÔÂûÀº Çѹø¸¸
°¡´ÉÇÕ´Ï´Ù.   ¸¸¾à ´Ù½Ã ÀÔÂûÀ» ÇÒ ¶§´Â ±âÁ¸ÀÇ ÀÔÂûÀ» »èÁ¦ ÇØ¾ß ÇÕ´Ï´Ù.

°æ¸Å ¼öÁ¤ Çϱâ

µî·ÏÇÑ °æ¸ÅÀÇ ³»¿ëÀ» ¼öÁ¤ ÇÏ´Â ±â´É ÀÔ´Ï´Ù.
ÀÌ°ÍÀº ±âÁ¸ÀÇ ÀÔÂû°ú ´Þ¸® ¸ÅµµÀÚ°¡ ÀÓÀÇ·Î °¡°ÝÀ» Á¶Á¤Çϰųª ³»¿ëÀ» ¼öÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.

°æ¸Å Áö¿ì±â

µî·ÏÇÑ °æ¸Å¸¦ »èÁ¦ ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù. 
¿©·¯ °¡Áö ÀÌÀ¯·Î °æ¸Å ÁøÇàÀ» ¸øÇÒ °æ¿ì µî·ÏÀÚ°¡ °æ¸Å¸¦ »èÁ¦ ÇÒ ¼ö ÀÖ½À´Ï´Ù.

°æ¸Å ¸¶°¨ ¾Ë¸®±â

ÇØ´ç °æ¸Å°¡ ¼³Á¤ÇÑ ¸¶°¨ ³¯Â¥ÀÏ °æ¿ì °æ¸Å °Ô½ÃÆÇ ¸ÞÀÎ È­¸é¿¡ "¸¶°¨" Ç¥½Ã¸¦ Çϸç Á¦¸ñÀ» Ŭ¸¯ÇßÀ»
°æ¿ì º¸¿©ÁÖ´Â È­¸é ÀÔ´Ï´Ù.

11.4 ¼îÇÎ ¸ô

¼îÇÎ ¸ôÀº »çÀÌÆ®ÀÇ ¸ÞÀÎ È­¸é¿¡¼­ °¢ »óÇ°ÀÇ Á¾¸ñÀ» ¼±Åà ÇÏ¸é ¿©·¯ »óÇ°µéÀ» ±¸¸Å ÇÏ´Â È­¸éÀ» Ãâ·Â ÇÕ´Ï´Ù.    ±¸¸ÅÀÚ°¡ ¼±ÅÃÇÑ »óÇ°Àº ¹Ù±¸´Ï Ç׸ñ¿¡ ÀúÀå µÇ¸ç ¹Ù±¸´Ï È­¸é¿¡¼­´Â ¼±ÅÃÇÑ ¹°°ÇÀ» ´Ù½Ã ºñ¿ï ¼ö ÀÖ½À´Ï´Ù.    ¹Ù±¸´Ï¿¡ ´ãÀº »óÇ°À» ÁÖ¹®ÇÒ °æ¿ì ÁÖ¹®¼­ ÀÛ¼º È­¸éÀ¸·Î À̵¿Çϸç ÁÖ¹®ÇÑ »óÇ°À» È®ÀÎ ÇÒ ¼ö ÀÖ°í ´Ù½Ã ÁÖ¹® Ãë¼Ò¸¦ ÇÒ ¼ö ÀÖ½À´Ï´Ù.

¼îÇÎ ¸ô ¸ÞÀÎ È­¸é

¿©·¯ Á¾¸ñÀÇ »óÇ°ÀÌ ÀÖ°ÚÁö¸¸ ¿©±â¼­´Â °¡ÀüÁ¦Ç° Ç׸ñÀ» º¸°Ú½À´Ï´Ù.

¹Ù±¸´Ï º¸±â

±¸¸ÅÀÚ°¡ ¼±ÅÃÇÑ »óÇ°À» º¸¿©ÁÖ´Â Ç׸ñ ÀÔ´Ï´Ù.
        
¹Ù±¸´Ï´Â ¼±ÅÃÇÑ »óÇ°À» º¸¿©ÁÖ°í ÁÖ¹®À» ÇÒ ¼ö ÀÖÀ¸¸ç ¼±ÅÃÇÑ »óÇ°À» »èÁ¦ ÇÒ ¼ö ÀÖ½À´Ï´Ù. 

ÁÖ¹® Çϱâ

¹Ù±¸´ÏÀÇ »óÇ°À» ÁÖ¹®ÇÏ´Â Ç׸ñ ÀÔ´Ï´Ù.  ·Î±×ÀÎÇÑ ID ¼¼¼ÇÀ» ÀÌ¿ëÇؼ­ ±¸¸ÅÀÚÀÇ Á¤º¸¸¦ Ãâ·ÂÇØ ÁÖ¸ç ¹ÞÀ»
ÁÖ¼Ò¿Í ±¸¸ÅÀÚ À̸§ , »óÇ° µµÂø ³¯Â¥ , ÀÔ±Ý ÀºÇàÀ» ÀÔ·Â ÇÏ´Â Ç׸ñÀÌ ÀÖ½À´Ï´Ù.

ÁÖ¹®¼­ È®ÀÎ(°è»ê¼­)

½ÅûÇÑ »óÇ°ÀÇ Ç׸ñÀ» È®ÀÎ ÇÒ ¼ö ÀÖ½À´Ï´Ù.

ÁÖ¹®Ãë¼Ò

»óÇ° ½ÅûÀ» Ãë¼ÒÇÏ´Â Ç׸ñ ÀÔ´Ï´Ù. À§ °è»ê¼­ Ç׸ñ¿¡¼­ ÁÖ¹® Ãë¼Ò¸¦ ¼±ÅÃÇÒ °æ¿ì ½ÅûÇÑ »óÇ°ÀÌ ¸ðµÎ »èÁ¦
µË´Ï´Ù.   ¼îÇÎ ¸ôÀÇ ¸ÞÀÎ È­¸é¿¡¼­ "ÁÖ¹® ³»¿ª/Ãë¼Ò"  Ç׸ñÀ» ¼±ÅÃÇÒ °æ¿ì À§ °è»ê¼­ Ç׸ñÀ¸·Î À̵¿µÇ¸ç
ÁÖ¹®ÇÑ »óÇ°ÀÌ ¾øÀ» °æ¿ì ¿¡·¯ Ç׸ñÀ» Ãâ·ÂÇÕ´Ï´Ù.

11.5 Admin ¿µ¿ª

ÀÚ·á½Ç , °æ¸Å , ¼îÇÎ ¸ô , µ¥ÀÌÅÍ º£À̽º¿¡ °üÇÑ Àü¹ÝÀûÀÎ Ç׸ñÀ» °ü¸®ÇÏ´Â ºÎºÐÀÌ¸ç °¢ È­¸é¿¡ adimin ¿µ¿ªÀÇ ¸µÅ©°¡ ÀÖ½À´Ï´Ù.   ¹°·Ð Á¢¼ÓÀ» À§Çؼ­´Â µ¥ÀÌÅÍ º£À̽º¿¡ ¼³Á¤ÇÑ È£½ºÆ® À̸§ , °èÁ¤ , Æнº¿öµå¸¦ ÀÔ·ÂÇØ¾ß ÇÕ´Ï´Ù.

admin ·Î±×ÀÎ È­¸é

ÀÚ·á½Ç admin ¸ÞÀÎ È­¸é

admin ¿µ¿ª¿¡ Á¢¼ÓÀ» Çϸé Ãâ·Â µÇ´Â È­¸é ÀÌ¸ç °æ¸Å , µ¥ÀÌÅÍ º£À̽º , ȸ¿ø , ¼îÇÎ ¸ô admin ¿µ¿ªÀ¸·ÎÀÇ
¸µÅ©°¡ Á¸Àç ÇÏ°í »õ·Î¿î ÀÚ·á½ÇÀÇ »ý¼º , ±âÁ¸ÀÇ ÀÚ·á½Ç »èÁ¦ µîÀÇ ±â´ÉÀÌ ÀÖ½À´Ï´Ù.
ÀÚ·á½ÇÀ» »èÁ¦ÇÒ ¶§´Â üũ(¶óµð¿À ¹öÆ°)¸¦ ÇÑ ´ÙÀ½ "Del" ¹öÆ°À» Ŭ¸¯ ÇϸéµË´Ï´Ù. 
ÇϳªÀÇ ÀÚ·á½Ç¸¸ »èÁ¦ °¡´É Çϸç ȸ¿ø °ü¸® adminÀÇ °æ¿ì üũ(üũ ¹öÆ°) Ç׸ñÀ» ¿©·¯ °³ ¼³Á¤ ÇÒ ¼ö ÀÖ½À´Ï´Ù.

ÀÚ·á½Ç ¸¸µé±â

"Creat ÀÚ·á½Ç" À» Ŭ¸¯ Çϸé ÀÚ·á½ÇÀ» »ý¼ºÇÒ Å×À̺í°ú ÀÚ·á½Ç À̸§À» ÀÔ·ÂÇÏ´Â Ç׸ñÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù.

°æ¸Å °Ô½ÃÆÇ admin ¸ÞÀÎ È­¸é

ÀÚ·á½Ç admin¿µ¿ª°ú °°À¸¸ç °¢ admin ¿µ¿ªÀ¸·ÎÀÇ ¸µÅ©°¡ Á¸Àç ÇÕ´Ï´Ù.

µ¥ÀÌÅÍ º£À̽º admin ¸ÞÀÎ È­¸é

ÆäÀÌÁö ´ÜÀ§·Î Mysql¿¡ Á¸ÀçÇÏ´Â ¸ðµç µ¥ÀÌÅÍ º£À̽º¸¦ º¸¿© ÁÝ´Ï´Ù.
µ¥ÀÌÅÍ º£À̽º »ý¼º Ç׸ñÀÌ Á¸Àç ÇÕ´Ï´Ù.

µ¥ÀÌÅÍ º£À̽º »õ·Î ¸¸µé±â

"New"¸¦ Ŭ¸¯ÇÏ¸é »õ·Î¿î µ¥ÀÌÅͺ£À̽º¸¦ »ý¼ºÇϱâ À§ÇØ µ¥ÀÌÅͺ£À̽º À̸§À» ÀÔ·ÂÇÏ´Â È­¸éÀ» Ãâ·ÂÇÕ´Ï´Ù.

Å×À̺í Ç׸ñ â

µ¥ÀÌÅÍ º£À̽º ¸ÞÀÎ È­¸é¿¡¼­ ÇØ´ç µ¥ÀÌÅÍ º£À̽º¸¦ Ŭ¸¯ Çϸé Á¸ÀçÇÏ´Â Å×À̺íÀ» Ãâ·Â ÇÏ¸ç »õ·Î¿î Å×À̺í
»ý¼º Ç׸ñ°ú µ¥ÀÌÅÍ º£À̽º »èÁ¦ Ç׸ñÀÌ Á¸Àç ÇÕ´Ï´Ù. 

»õ·Î¿î Å×ÀÌºí »ý¼º

Å×À̺í È­¸é¿¡¼­ "New" È­¸éÀ» Ŭ¸¯ÇÏ¸é »õ·Î »ý¼ºÇÒ Å×À̺í À̸§°ú Çʵå¼Ó¼º ÀÔ·ÂÇ׸ñÀÌ º¸¿©Áý´Ï´Ù. 
ÇÊµå ¼Ó¼ºÀÇ °æ¿ì ¿øÇÏ´Â ÇÊµå ¸í°ú ¼Ó¼ºÀ» ³ª¿­ÇÏ¸é µË´Ï´Ù.

Å×ÀÌºí ¼Ó¼º º¸±â

Å×ÀÌºí ¸ñ·Ï È­¸é¿¡¼­ ƯÁ¤ Å×À̺í À̸§À» ¼±ÅÃÇϸé ÇØ´ç Å×À̺íÀÇ Çʵå Á¤º¸¸¦ º¼ ¼ö ÀÖ½À´Ï´Ù.
ÇØ´ç Å×À̺íÀÇ »èÁ¦ , ÇÊµå ¼Ó¼º Ãß°¡ ¹× »èÁ¦°¡ °¡´É ÇÕ´Ï´Ù.
ÇÊµå ¼Ó¼ºÀ» »èÁ¦ Ãß°¡ Çϱâ À§Çؼ­´Â Å×ÀÌºí ¼Ó¼º È­¸é ÇÏ´ÜÀÇ select Ç׸ñ(Add ,Del)À» ¼±Åà ÇÏ°í ÇØ´ç Çʵ带
Àû¾î ÁÖ¸é µË´Ï´Ù.

¼îÇÎ ¸ô admin ¸ÞÀÎ È­¸é

¼îÇÎ ¸ôÀÇ adminÈ­¸éÀº ÀüÀÚÁ¦Ç° admin ºÎºÐÀ» º¸°Ú½À´Ï´Ù.
°¢ Á¦Ç°ÀÇ Á¦¸ñÀ» Ŭ¸¯ Çϸé ÇØ´ç Á¦Ç°¿¡ °ü·ÃµÈ Á¤º¸¸¦ ¼öÁ¤ ÇÒ ¼ö ÀÖ½À´Ï´Ù. 
üũ ¹Ú½º¸¦ ÀÌ¿ëÇØ »óÇ°À» »èÁ¦ ÇÒ ¼ö ÀÖÀ¸¸ç "Up shop" ¸¦ ÀÌ¿ëÇؼ­ »óÇ°À» Ãß°¡ ÇÒ ¼ö ÀÖ½À´Ï´Ù.

»óÇ° ¼öÁ¤ Çϱâ

»óÇ°ÀÇ °¡°Ý, À̸§, À̹ÌÁö, ¼³¸í µîÀ» ¼öÁ¤ÇÒ ¼ö ÀÖÀ¸¸ç À̹ÌÁö¸¦ ¼öÁ¤ÇÒ °æ¿ì üũ¹Ú½º(¼öÁ¤ , ±×¸²¼öÁ¤)À»
¼±ÅÃÇØ¾ß ÇÕ´Ï´Ù.   À̹ÌÁö ÀÌ¿ÜÀÇ ºÎºÐÀ» ¼öÁ¤ÇÒ °æ¿ì´Â ¼öÁ¤¸¸ üũÇÏ¸é µË´Ï´Ù.

»õ »óÇ° Ãß°¡ Çϱâ

»õ·Î¿î »óÇ°À» Ãß°¡ ÇÏ´Â Ç׸ñÀÌ¸ç ¼îÇÎ ¸ô admin ¸ÞÀÎ È­¸é¿¡¼­ "Up shop" ¸¦ Ŭ¸¯ ÇÏ¸é µË´Ï´Ù. 
Á¦Ç° °¡°Ý , »óÇ° Á¾¸ñ , À̸§ , À̹ÌÁö , ¼³¸íÀ» ÀÔ·ÂÇÏ°í "shopup" ¹öÆ°À» Ŭ¸¯Çϸé ÇØ´çÁ¾¸ñ¿¡
»õ»óÇ°ÀÌ µî·ÏµË´Ï´Ù.

ȸ¿ø admin ¸ÞÀÎ È­¸é

»çÀÌÆ®¿¡ °¡ÀÔÇÑ À¯ÀúÀÇ °ü¸®¸¦ ÇÏ´Â Ç׸ñÀÔ´Ï´Ù.
°¢ ȸ¿øµéÀÇ Á¤º¸¸¦ ÆäÀÌÁö ´ÜÀ§·Î ³ª¿­Çϸç ȸ¿øÀÇ »èÁ¦´Â üũ¹Ú½º¸¦ ÀÌ¿ëÇØ ¿øÇϴ ȸ¿ø¸¸ »èÁ¦°¡´É ÇÕ´Ï´Ù.
"Creat user" ¹öÆ°À» ÀÌ¿ëÇؼ­ »õ·Î¿î ȸ¿øÀ» Ãß°¡ ÇÒ ¼ö ÀÖÀ¸¸ç ƯÁ¤ ȸ¿øÀÇ Á¤º¸¸¦ ¼öÁ¤ÇÏ·Á¸é ȸ¿øÀÇ

À̸§À» Ŭ¸¯ÇÏ¸é µË´Ï´Ù. 

ȸ¿ø Ãß°¡ Çϱâ

ȸ¿ø admin ¸ÞÀÎ È­¸é¿¡¼­ "Creat user" ¸¦ Ŭ¸¯ Çϸé Ãß°¡ ÇÒ ¼ö ÀÖ½À´Ï´Ù.

ȸ¿ø Á¤º¸ ¼öÁ¤

ȸ¿ø admin ¸ÞÀÎ È­¸é¿¡¼­ ¼öÁ¤ÇÒ À¯ÀúÀÇ À̸§À» Ŭ¸¯ ÇÏ¸é ¼öÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.



´ÙÀ½ Àå¿¡¼­´Â ¸ÞÀÎ ÆäÀÌÁö ¸¸µé±â¸¦ ¼³¸í ÇÏ°Ú½À´Ï´Ù.
 

12. »çÀÌÆ® ¸ÞÀÎ ÆäÀÌÁö ¸¸µé±â

»çÀÌÆ®ÀÇ ¸ÞÀÎ È­¸éÀº ÇÊÀÚÀÇ ÀÓÀÇ·Î ¸¸µé¾î ºÃ½À´Ï´Ù.    ¸ÕÀú ¸ÞÀÎ È­¸éÀÇ °æ¿ì ±× »çÀÌÆ®ÀÇ ¾ó±¼À̸ç Á¦°øÇÏ´Â ¸ðµç Á¤º¸¸¦ ÇÑ´«º¼ ¼ö ÀÖ¾î¾ß ÇÕ´Ï´Ù.    ±×¸®°í ȸ¿øÁ¦ »çÀÌÆ®ÀÏ °æ¿ì ·Î±×Àΰú ·Î±×¾Æ¿ô ±â´ÉÀÌ Á¸ÀçÇØ¾ß ÇÕ´Ï´Ù. ±× °úÁ¤À» Çϳª¾¿ »ìÆ캸°Ú½À´Ï´Ù.

12.1 ȸ¿ø Å×ÀÌºí ¸¸µé±â

±×·³ ¿©±â¼­ ¿ì¸®°¡ ¸¸µé »çÀÌÆ®ÀÇ ¸ÞÀÎ È­¸éÀ» ¸ÕÀú »ìÆ캸°Ú½À´Ï´Ù.

ȸ¿øÁ¦ »çÀÌÆ®ÀÇ °æ¿ì °¢ ȸ¿øÀÇ ·Î±×ÀÎ ¸Þ´º¿Í ȸ¿øÀÌ ¾Æ´Ò °æ¿ì °¡ÀÔÇÏ´Â ºÎºÐÀÌ Á¸ÀçÇÕ´Ï´Ù.
ÀÌ ºÎºÐÀ» ±¸ÇöÇϱâ À§Çؼ­´Â °¢ ȸ¿øÀÇ Á¤º¸¸¦ ÀúÀåÇÒ °ø°£ÀÌ ÇÊ¿äÇÕ´Ï´Ù.
¿ì¼± ±âÁ¸¿¡ ¸¸µé¾îÁø µ¥ÀÌÅͺ£À̽º¿¡ ȸ¿øÀÇ Å×À̺íÀ» »ý¼ºÇصµ µÇÁö¸¸ ¿©±â¼­´Â »õ·Î¿î µ¥ÀÌÅͺ£À̽º¸¦
¸¸µé°í °Å±â¿¡ ȸ¿øµéÀÇ Á¤º¸¸¦ ´ãÀ» Å×À̺íÀ» »ý¼ºÇÏ°Ú½À´Ï´Ù.

µ¥ÀÌÅͺ£À̽º ¸¸µé±â

mysql>create databases selectuser ;

Å×À̺íÀ» »ý¼ºÇÒ µ¥ÀÌÅͺ£À̽º¸¦ ¸¸µé¾î ÁÝ´Ï´Ù.
¿©±â »ç¿ëÇÒ µ¥ÀÌÅͺ£À̽º ¸íÀº selectuserÀÌ°í ¿©·¯ºÐÀÌ ¼öÁ¤Çؼ­ »ç¿ëÇصµ µË´Ï´Ù.

Å×ÀÌºí ¸¸µé±â

./mysql -u root -p userin < userin.sql 

CD¿¡ ÀÖ´Â userin.sql ÆÄÀÏÀ» ÀÌ¿ëÇؼ­ userin Å×À̺íÀ» ÇÑ ¹ø¿¡ ¼³Ä¡ÇÏ´Â ¹æ¹ýÀÔ´Ï´Ù.
¸¸¾à »õ·Î¿î ÇʵåÀÇ Ãß°¡³ª ¼Ó¼ºÀ» º¯°æÇÒ °æ¿ì mysql ºÎºÐÀ» Âü°íÇϼ¼¿ä.
ÀÏÀÏÀÌ insert ¹®À» ÀÌ¿ëÇؼ­ ÀÔ·ÂÇÏ´Â ¹æ¹ýµµ ÀÖÁö¸¸ userin.sql ÆÄÀÏÀ» ¼öÁ¤Çؼ­ »ç¿ëÇÏ¸é ´õ ÆíÇÕ´Ï´Ù.

Å×À̺íÀÇ ÀÎÀÚµé

ȸ¿ø Å×À̺í(userin)À» ¸¸¾à »õ·Ó°Ô ¸¸µç ´Ù¸é ¿©·¯ºÐµéÀº Å×ÀÌºí¿¡ »ç¿ëÇÒ °¢ ÀÎÀڵ鿡 ´ëÇÑ »çÀüÀÇ °èȹÀÌ
ÀÖ¾î¾ß ÇÕ´Ï´Ù.   ȸ¿øµéÀÇ Á¤º¸ Áß ¾î´À ºÎºÐÀ» ÀúÀå ÇÒ °ÍÀÎÁö ¸íÈ®È÷ °áÁ¤ÇÑ ÈÄ ÀÛ¾÷À» ÇØ¾ß ÇÕ´Ï´Ù.
¿©±â¿¡ »ç¿ëÇÑ ºÎºÐµéÀº ±âº»ÀûÀÎ ºÎºÐÀÌ¸ç ¿©·¯ °¡Áö »õ·Î¿î ÀÎÀÚµéÀ» »ç¿ëÇØ ¸¸µé¾î º¸±â ¹Ù¶ø´Ï´Ù.
        
    name - ȸ¿ø À̸§ 
    id - ȸ¿ø °íÀ¯ ¾ÆÀ̵ð
    passwd - ȸ¿ø ¾ÏÈ£
    resident - ȸ¿ø ÁֹΠ¹øÈ£
    email - ȸ¿ø ¸ÞÀÏ ÁÖ¼Ò
    homepage - ȸ¿ø ȨÆäÀÌÁö ÁÖ¼Ò
    address - ȸ¿ø ÁÖ¼Ò
    wdate - ȸ¿ø °¡ÀÔÀÏ
    uno - ȸ¿ø ¿ìÆí¹øÈ£
    tel1 - ȸ¿ø ÈÞ´ëÆù ¹øÈ£
    tel2 - ȸ¿ø Áý ÀüÈ­¹øÈ£

12.2 ¼Ò½º ¸¸µé±â

¸ÞÀÎ È­¸éÀÇ ¼Ò½º´Â ÃÑ µÎ°³ÀÇ ÆÄÀÏ·Î ±¸¼º µË´Ï´Ù.    È­¸éÀ» Ãâ·ÂÇÏ´Â ÆÄÀÏ(userin.php)°ú °¢ È­¸éµéÀ» ÇÔ¼ö ÇüÅ·ΠÀúÀåÇÑ ÆÄÀÏ(userin_func.php)ÀÔ´Ï´Ù.    ÇϳªÀÇ ÆÄÀÏ·Î ¸¸µé¾î »ç¿ëÇÒ ¼öµµ ÀÖÀ¸¸ç °¢ ºÎºÐº°·Î °¢°¢ÀÇ ÆÄÀÏ·Î ¸¸µé ¼öµµ ÀÖ½À´Ï´Ù.

userin_func.php Àüü ÄÚµå

    <?php

    $connect = mysql_connect('localhost','root','gksmf444');
    mysql_select_db('selectuser',$connect);
    /*----------  mysql Á¢¼Ó ----------------*/


    function main_userin($sel) {
        echo("
        <html>
        <title>userin_view html</title>
        <body bgcolor=black>
        <center>
        <img src=skyt1.jpg border=0><br>

        <form method=post action=userin.php>

        <input type=hidden name=chanl value=checkid>

        <table border=0 cellspacing=2 cellpadding=2 width=700 >
                                                                                                                                                                                                        
        <font style='font-size:13px;font-style:italic;color:#fffff0>
        (*´Â Çʼö ÀÔ·Â ºÎºÐÀÔ´Ï´Ù.)</font>
                                                                                                                                                                                                                                                        
        <tr>
          <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0>
          <input type=submit value=IDÁߺ¹È®ÀÎ></font></td>
          <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0>
          <input type=text name=id size=9 maxlength=8>(* 4~8ÀÚÀÇ ¿µ¼ýÀÚ Á¶ÇÕ)</font></td>
        </tr>
        </form>

        <form method=post action=userin.php>

        <input type=hidden name=chanl value=in>
        <input type=hidden name=sel value=$sel>

        <tr>
          <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0>
          <b>~ID</b></fontZ></td>
          <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0>
          <input type=text name=id size=9 maxlength=8>(* 4~8ÀÚÀÇ ¿µ¼ýÀÚ Á¶ÇÕ)</font>*lt;/td>
        </tr>
                
        <tr>
          <td width=90 bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0>
          <b>~Name</b></font></td>
          <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0>
          <input type=text name=name size=9>(* ÇÑ±Û À̸§)</font></td>
        </tr>
                
        <tr>
          <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0>
          <b>~Passwd</b></font></td>
          <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0>
          <input type=password name=passwda size=9 maxlength=8>
          (* ¿µ¼ýÀÚ Á¶ÇÕ 4~8)</font></td>
        </tr>
                
        <tr>
          <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0>
          <b>~PasswdRE</b></font></td>
          <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0>
          <input type=password name=passwdb size=9 maxlength=8>*</font></td>
        </tr>
                
        <tr>
          <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0>
          <b>~Email</b></font></td>
          <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0>
          <input type=text name=emaila size=8>@
          <input type=text name=emailb size=15>(* sss@sss.sss.ss)
          </font></td>
        </tr>
                
        <tr>
          <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0>
          <b>~HomePG</b></font></td>
          <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0>HTTP://
          <input type=text name=home size=20>
          </font></td>
        </tr>
                
        <tr>
          <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0>
          <b>~Resident</b></font></td>
          <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0>
          <input type=text name=rsda size=7>-
          <input type=text name=rsdb size=8>(* 1111-11111)
          </font></td>
        </tr>
                
        <tr>
          <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0>
          <b>~Tel1</b></font></td>
          <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0>
          <select name=tela>
            <option value=017 selected>017
            <option value=018>018
            <option value=019>019
            <option value=011>011
            <option value=016>016
          </select>-
          <input type=text name=telb size=5>-
          <input type=text name=telc size=5>(* ÈÞ´ëÆù ¹øÈ£)
          </font></td>
        </tr>
                
        <tr>
          <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0>
          <b>~Tel2</b></font></td>
          <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0>
          <input type=text name=tel2a size=4>-
          <input type=text name=tel2a size=4>-
          <input type=text name=tel2b size=5>-
          <input type=text name=tel2c size=5>
          </font></td>
        </tr>
                
        <tr>
          <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0>
          <b>~¿ìÆí¹øÈ£</b></font></td>
          <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0>
          <input type=text name=uno size=4>-
          <input type=text name=uno2 size=4>*
          </font></td>
        </tr>
                
        <tr>
          <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0>
          <b>~Address</b></font></td>
          <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0>
          <input type=text name=address size=54>* </font></td>
        </tr>
                
        <tr>
          <td bgcolor=black align=center colspan=4>
          <font style='font-size:13px;font-style:italic;color:#fffff0>
          <input type=submit value=ȸ¿øµî·Ï>
          <input type=reset  value=´Ù½Ã></font></td>
          </tr>

        </table>          
        </form>           
        </center>
                
        </body>
        </html>
        ");
    }


    function error_user($connect,$id,$name,$passwda,$passwdb,$emaila,$emailb,$rsda,$rsdb,$telb,$telc,$uno,$uno2,$address)
    {

      $ally = mysql_query("select id from userin where id='$id' ",$connect);
      $userin = mysql_fetch_array($ally);


      if(!$id)
      {
        echo("
        <script>
          window.alert('id°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä.')
          history.go(-1)
        </script>
        ");

        exit;
      }


      if($userin[id])
      {
        echo("
        <script>
          window.alert('°°Àº id°¡ ÀÖ½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
        </script>
        ");

        exit;
      }


      if(!ereg("[0-9a-zA-z]",$id) || strlen($id) < 4)
      {
        echo("
        <script>
          window.alert('id´Â ¿µ¹®¼ýÀÚ Á¶ÇÕ À̾î¾ß ÇÕ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇϼ¼¿ä')
          history.go(-1)
        </script>
        ");

        exit;
      }


      for($n = 0 ; $n < strlen($name) ; $n++)
      {

        if(ord($name[$n]) <= 0x80)
        {
          echo("
          <script>
            window.alert('À̸§ÀÌ ¾ø°Å³ª ÇѱÛÀÌ ¾Æ´Õ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
            history.go(-1)
          </script>
          ");

          exit;
        }
      }


      if(!$name)
      {
        echo("
        <script>
          window.alert('À̸§ÀÌ ¾ø½À´Ï´Ù. À̸§ºÎÅÍ ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
        </script>
        ");

        exit;
      }


      if(!$passwda || !$passwdb || $passwda != $passwdb)
      {
        echo("
        <script>
          window.alert('passw°¡ ¾ø°Å³ª Ʋ¸³´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
        </script>
        ");

        exit;
      }


      if(!ereg("[0-9a-zA_Z]",$passwda) || strlen($passwda) < 4)
      {
        echo("
        <script>
          window.alert('passw´Â ¿µ¼ýÀÚ Á¶ÇÕ À̾î¾ß ÇÕ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
        </script>
        ");
                                                                                                                                                                                                                                                            exit;
      }


      if(!$emaila || !$emailb)
      {
        echo("
        <script>
          window.alert('¸ÞÀÏ ÁÖ¼Ò°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
        </script>
        ");

        exit;
      }


      if(!ereg("[0-9a-zA_Z]",$emaila) || !ereg("[0-1a-zA_Z]",$emailb))
      {
        echo("
        <script>
          window.alert('emailÀº ¿µ¼ýÀÚ Á¶ÇÕ À̾î¾ß ÇÕ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
        </script>
        ");

        exit;
      }


      $rsdno = "234567892345";
      $rsdin = $rsda.$rsdb ;
      $rsdchecka = substr($rsdin,$n,1);
      $rsdcheckb = substr($rsdno,$n,1);


      for ($n = 0 ; $n < 12 ; $n++)
      {
        $rsdall = $rsdall + $rsdchecka*$rsdcheckb ;
      }


      $rsdcheck = "11" - "($rsdall % 11)";
      $rsdb2 = substr($rsdb,0,1);
      $rsdcheck2 = substr($rsdcheck,-1,1);
      $rsdcheck3 = substr($rsdb,-1,1);
      $rsdcheck4 = ereg("[1-4]",$rsdb2);


      if(!$rsdcheck4 || $rsdcheck2 != $rsdcheck3)
      {
        echo("
        $rsdcheck2
        $rsdcheck3

        <script>
          window.alert('ÁֹιøÈ£111°¡ Ʋ¸³´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
        </script>
        ");

        exit;
      }


      if(!$rsda || !$rsdb)
      {
        echo("
        <script>
          window.alert('ÁֹιøÈ£°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
        </script>
        ");

        exit;
      }


      if(!$telb || !$telc)
      {
        echo("
        <script>
          window.alert('ÀüÈ­¹øÈ£°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
        </script>

        exit;
      }


      if(!$uno || !$uno2)
      {
        echo("
        <script>
          window.alert('¿ìÆí¹øÈ£°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
        </script>
        ");

        exit;
      }


      if(!$address)
      {
        echo("
        <script>
          window.alert('ÁÖ¼Ò°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
        </script>
        ");

        exit;
      }
    }


    function main_view($username,$connect)

    {

      mysql_select_db(adminp,$connect);


      $ally = mysql_query("select no,title,mview,view from admin  order by no ",$connect);
      $ally2 = mysql_query("select no,title,mview,view from file  order by no ",$connect);

         
      $put = mysql_fetch_array($ally);
      $put2 = mysql_fetch_array($ally2);


      mysql_select_db('libchal',$connect);
                  

      $allya = mysql_query("select no,title,hit from $put[mview]  order by hit desc",$connect);
      $allyb = mysql_query("select no,title,hit from $put2[mview] order by hit desc",$connect );
      $put3 = mysql_fetch_array($allya);
      $put4 = mysql_fetch_array($allyb);


      $t_num=mysql_num_rows($ally);
      $t_num2=mysql_num_rows($ally2);
      $wdate = date('H:i:s');


      if($username) {
        $sslogin = "$username login Çß½À´Ï´Ù.";
        $chat_mod ="<a href ='userin.php?chanl=chat&username=$username' >";
      }


      if(!$username) {
        $sslogin = "Login Çϼ¼¿ä~!";
        $userss = "<a href ='userin.php?chanl=main'>";     
      }



      if($username == guest)
      {
        $sslogin = "$username login Çß½À´Ï´Ù.";
        $userss = "<a href ='userin.php?chanl=main'>";
      }


      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      </br>
      <font style='font-size:12px;color:gray'>
      $sslogin
      </font>
      <br>
      <br>


      <table border=0 cellspacing=2 cellpadding=2 width=500 >
      <tr>
      <font style='font-size:12px;color:gray'>
      $userss
      (ȸ¿ø °¡ÀÔ)
      </a>
      (geustÀÔÀåÀº id¿¡ guestÀÔ·Â)
      $chat_mod
      (Chating)
      </a>
      </font>
      <form method=post action=userin.php>
      <input type=hidden name=chanl value=login>
      <td width=90 bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~ID</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=id size=9></font></td>
      <td width=50 bgcolor=black>
      <img src=icon.jpg border=0 align=center>
      </td>
      <td bgcolor=black  align=left>
      <font style='font-size:13px;text-decoration:none;font-style:italic;color:blue'>
      <a href ='m.php?chanl=main_view&f=$put2[mview]&f2=$put2[view]&ssid=$username' >
      <font style='font-size:13px;text-decoration:none;font-style:italic;color:blue'>
      $put2[title]</font></a>
      </td>
      </tr>


      <tr>
      <td width=90 bgcolor=#808080>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Passwd</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=password name=passwd size=9></font></td>


      <td width=50 bgcolor=black align=left>
      <img src=icon.jpg border=0 align=center>
      </td>


      <td bgcolor=black  align=left>
      <a href='main_view.php?chanl=main_view&f=$put[mview]
      &f2=$put[view]&ssid=$username' >
      <font style='font-size:13px;text-decoration:none;font-style:italic;color:blue'>
      $put[title]</font></a></td>
      </tr>


      <tr>
      <td width=90 bgcolor=black>
      <input type=submit value=Login>
      </form>
      </td>
      <form method=post action=userin.php>
      <input type=hidden name=chanl value=logout>
      <td bgcolor=black>
      <input type=submit value=Logout>
      </form>
      </td>


      <td width=50 bgcolor=black>
      <img src=icon.jpg border=0 align=center>
      </td>


      <td bgcolor=black  align=left>
      <font style='font-size:13px;text-decoration:none;font-style:italic;color:blue'>
      <form method=post action=shop.php>cry~
          <select name=sel>
          <option value=1 selected>ÀüÀÚÁ¦Ç°
          <option value=2>ÀÇ·ù
          <option value=3>À½¾Ç
          <option value=4>Ã¥
          </select>!shop</font>
      <input type=submit value=~Go>
      </td>
      </form>
      </tr>
      </table>
      ");


      echo("
      <br>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >


      <td bgcolor=black  align=center width=200>
      <font style='font-size:13px;font-style:italic;color:white'>
      <img src=icon.jpg border=0 align=center>Top ÀÚ·á</font></td>


      <td bgcolor=black  align=left width=500>
      <a href ='m.php?chanl=title&no=$put4[no]&f=$put2[mview]
      &f2=$put2[view]&ssid=$username' >
      <font style='font-size:13px;text-decoration:none;font-style:italic;color:gray'>
      <strong>$put4[title]</strong></font></a></td>


      <tr>
      <td bgcolor=black  align=center width=200>
      <font style='font-size:13px;font-style:italic;color:white'>
      <img src=icon.jpg border=0 align=center>Top °æ¸Å</font></td>


      <td bgcolor=black  align=left width=500>
      <a href ='main_view.php?chanl=title&no=$put3[no]&f=$put[mview]
      &f2=$put[view]&ssid=$username' >
      <font style='font-size:13px;text-decoration:none;font-style:italic;color:gray'>
      <strong>$put3[title]</strong></font></a></td>
      </tr>
      </table>");


      echo("
      <table border=0 cellspacing=2 cellpadding=2 width=300 >
      <tr>
      <td colspan=2 bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~File bang list</b></font></td>
      </tr>
      ");


      for($pd=1 ; $pd < $t_num2 ; $pd++)
      
          {
      
          $put2 = mysql_fetch_array($ally2);
      echo("
      <tr>
      <td bgcolor=black align=center width=200>
      <img src=icon.jpg border=0 align=center></td>
      <td bgcolor=black  align=left width=500>
      <a href ='m.php?chanl=main_view&f=$put2[mview]&f2=$put2[view]&ssid=$username' >
      <font style='font-size:13px;text-decoration:none;font-style:italic;color:gray'>
      <strong>$put2[title]</strong></font></a></td>
      </tr>
      ");
      
      }


      echo("
      <table border=0 cellspacing=2 cellpadding=2 width=300 >


      <tr>
      <td colspan=2 bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~°æ¸Å bang list</b></font></td>
      </tr>
      ");


      for($pd=1 ; $pd < $t_num ; $pd++)
          
      {
          
      $put = mysql_fetch_array($ally);


      echo("
      <tr>
      <td bgcolor=black align=center width=200>
      <img src=icon.jpg border=0 align=center></td>
      <td bgcolor=black  align=left width=500>
      <a href ='main_view.php?chanl=main_view&f=$put[mview]
      &f2=$put[view]&ssid=$username' >
      <font style='font-size:13px;text-decoration:none;font-style:italic;color:gray'>
      <strong>$put[title]</strong></font></a></td>
      </tr>
      ");

      }


      echo("
      </table>
      </center>
      </body>
      <html>
      ");

      }

    ?>

¼Ò½º ¼³¸í

    ¸ÞÀÎ È­¸éÀÇ °¢ ºÎºÐµéÀ» ±¸¼ºÇÏ´Â È­¸éÀ» ÇÔ¼ö ÇüÅ·ΠÀúÀåÇÑ ÆÄÀÏÀÔ´Ï´Ù.

    userin_func.php ÆÄÀÏ ³»ÀÇ ÇÔ¼ö´Â ¸ÞÀÎ È­¸éÀÇ ¶Ç ´Ù¸¥ ±â´ÉÀ» Ãß°¡ÇÒ °æ¿ì ÇÔ¼ö¸¸ Ãß°¡Çؼ­ »ç¿ëÇÏ¸é µË´Ï´Ù.

Database Á¢¼Ó ¸¸µé±â

    $connect = mysql_connect('localhost','root','gksmf444');

    /* MysqlÀ» Á¢¼ÓÇϱâ À§ÇÑ È£½ºÆ® ¸í°ú ¾ÆÀ̵ð, Æнº¿öµå¸¦ ÀÔ·Â ÇÕ´Ï´Ù. 
        
       ¿©±â¿¡ »ç¿ëÇÑ È£½ºÆ®¿Í ¾ÆÀ̵ð, Æнº¿öµå´Â ¿©·¯ºÐµéÀÌ »õ·Î ¸¸µé¾ú´Ù¸é ±×°ÍÀ» Àû¾îÁÖ¸é µË´Ï´Ù. */


    mysql_select_db('selectuser',$connect);

    /* MysqlÀÇ µ¥ÀÌÅͺ£À̽º¸¦ ¼±ÅÃÇÕ´Ï´Ù. */

main_userin($sel) ÇÔ¼ö

    óÀ½ ¸ÞÀÎ È­¸é¿¡ Á¢¼ÓÇÏ°í ȸ¿ø °¡ÀÔÀ» Ŭ¸¯ÇßÀ» °æ¿ì Ãâ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù.

ID Áߺ¹ È®ÀÎ ¸¸µé±â

    <form method=post action=userin.php>
    /* ÀÌ form¹®À» ÀÌ¿ëÇؼ­ ÀÔ·ÂµÈ °ªÀ» userin.php ÆÄÀÏ·Î Àü¼ÛÇÕ´Ï´Ù. */

    <input type=hidden name=chanl value=checkid>
    /* userin.php ÆÄÀÏÀÇ $chanl=checked Ç׸ñÀ» ¼±ÅÃÇÕ´Ï´Ù. */

    <table border=0 cellspacing=2 cellpadding=2 width=700 >
    <font style='font-size:13px;font-style:italic;color:#fffff0'>
    (*´Â Çʼö ÀÔ·Â ºÎºÐÀÔ´Ï´Ù.)</font>
    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=submit value=IDÁߺ¹È®ÀÎ></font></td>
    /* ÀÔ·ÂÇÑ ID¸¦ Àü¼Û Çϱâ À§ÇÑ ¹öÆ°(submit)À» ¸¸µì´Ï´Ù. */

    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=id size=9 maxlength=8>(* 4~8ÀÚÀÇ ¿µ¼ýÀÚ Á¶ÇÕ)</font></td>
    /* IDÀÇ ÀÔ·ÂÀº ÃÖ´ë 8ÀÚ¸¸ °¡´ÉÇÏ°Ô ÇÕ´Ï´Ù. */

    </tr>
    </form>

½Å±Ô ȸ¿ø ID ÀԷ¶õ ¸¸µé±â

    <form method=post action=userin.php>
    <input type=hidden name=chanl value=in>
    <input type=hidden name=sel value=$sel>
    /* ÀÌ form ¹®Àº À§ IDÁߺ¹ È®ÀÎ ¹® ÀÌÈÄÀÇ ¸ðµç ÀÔ·ÂÀ» Àü´ÞÇÏ´Â ºÎºÐÀÌ°í, userin.php ÆÄÀÏÀÇ $chanl=in Ç׸ñ°ú
        
       $selÀÇ ÇØ´çÇ׸ñ(chanl=in)ÀÇ ¼öÇà ÈÄ µÇµ¹¾Æ°¥ È­¸éÀ» ¼±ÅÃÇÏ´Â ºÎºÐÀÔ´Ï´Ù. Áï, ¸ÞÀÎ È­¸éÀ» ÅëÇØ È¸¿ø °¡ÀÔ
           
       È­¸é¿¡ ¿ÔÀ» °æ¿ì $sel °ªÀº ¾Æ¹°Íµµ ¾ø½À´Ï´Ù. ±×·² °æ¿ì ȸ¿ø °¡ÀÔ ¼öÇà ÈÄ ´Ù½Ã ¸ÞÀÎ È­¸éÀ¸·Î µ¹¾Æ¿É´Ï´Ù. */

    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~ID</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=id size=9 maxlength=8>(* 4~8ÀÚÀÇ ¿µ¼ýÀÚ Á¶ÇÕ)</font></td>
    /* »ç¿ëÇÒ ID¸¦ ÀÔ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù. ÃÖ´ë ÀÔ·Â ±ÛÀº 8ÀÚ·Î Á¦ÇÑÇÕ´Ï´Ù. */
    </tr>

ȸ¿ø À̸§ ÀԷ¶õ ¸¸µé±â

    <tr>
    <td width=90 bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Name</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=name size=9>(* ÇÑ±Û À̸§)</font></td>
    /* À̸§ÀÇ ÀÔ·Â °ªÀº name º¯¼ö·Î ȸ¿ø À̸§À» ÀÔ·Â ¹Þ½À´Ï´Ù. */
    </tr>

ȸ¿ø Æнº¿öµå ÀԷ¶õ ¸¸µé±â

    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Passwd</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=password name=passwda size=9 maxlength=8>
    (* ¿µ¼ýÀÚ Á¶ÇÕ 4~8)</font></td>
    </tr>

    /* ȸ¿øÀÇ ID¿¡ »ç¿ëÇÒ Æнº¿öµå¸¦ ÀÔ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù. ÃÖ´ë Å©±â´Â 8·Î ÇÕ´Ï´Ù. Input type´Â password·Î ¼³Á¤ÇÕ´Ï´Ù. 

       ÀÌ°ÍÀº È­¸é¿¡ *****°Ô Ç¥½ÃÇØ ´Ù¸¥ »ç¶÷ÀÌ º¸Áö ¸øÇÏ°Ô ÇÏ´Â °ÍÀÔ´Ï´Ù. */


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~PasswdRE</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=password name=passwdb size=9 maxlength=8>*</font></td>
    </tr>

    /* »ç¿ëÇÒ Æнº¿öµåÀÇ ÀçÈ®ÀÎ ÀԷ¶õÀ» ¸¸µì´Ï´Ù. ÃÖ´ë ÀÔ·Â Å©±â´Â 8ÀÔ´Ï´Ù.
        
       ÀÌ Ç׸ñ ¿ª½Ã type=password·Î ¼³Á¤Çϸçç Àü´Þ ¹Þ´Â ÀÎÀÚ´Â passwdbÀÔ´Ï´Ù. */

¸ÞÀÏ°ú ȨÆäÀÌÁö ÀԷ¶õ ¸¸µé±â

    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Email</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=emaila size=8>@
    <input type=text name=emailb size=15>(* sss@sss.sss.ss)
    /* @¸¦ Áß½ÉÀ¸·Î µÎ°³ÀÇ ÀԷ¶õÀ» »ý¼ºÇÏ°í Â÷·Ê·Î emaila, emailb º¯¼ö·Î ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀԷ¹޽À´Ï´Ù. */
    </font></td>
    </tr>


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~HomePG</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    HTTP://
    <input type=text name=home size=20>
    /* HTTP:// Ç׸ñÀ» Ãâ·ÂÇÏ°í home ÀÎÀÚ·Î »ç¿ëÀÚ È¨ÆäÀÌÁö ÁÖ¼Ò¸¦ ÀÔ·Â ¹Þ½À´Ï´Ù. */


    </font></td>
    </tr>

ÁֹιøÈ£ ÀԷ¶õ ¸¸µé±â

    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Resident</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=rsda size=7>-
    <input type=text name=rsdb size=8>(* 1111-11111)
    /* - ±âÈ£¸¦ Áß½ÉÀ¸·Î µÎ°³ÀÇ º¯¼ö(rsda , rsdb)·Î »ç¿ëÀÚ ÁֹΠ¹øÈ£¸¦ ÀÔ·ÂÇÕ´Ï´Ù. */


    </font></td>
    </tr>

ÈÞ´ëÆù ¹øÈ£ ÀԷ¶õ ¸¸µé±â

    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Tel1</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <select name=tela>
    <option value=017 selected>017
    <option value=018>018
    <option value=019>019
    <option value=011>011
    <option value=016>016
    </select>-
    /* select ¹®À» »ç¿ëÇؼ­ ÇöÀç ¼­ºñ½º ÁßÀÎ ÈÞ´ëÆù ȸ»ç¸¦ ¼±ÅÃÇÏ°Ô ÇÕ´Ï´Ù. tela º¯¼ö¿¡ ÀúÀå µË´Ï´Ù. */
    <input type=text name=telb size=5>-
    <input type=text name=telc size=5>(* ÈÞ´ëÆù ¹øÈ£)
    /* °¢°¢ ÈÞ´ëÆù ¸¶Áö¸· ¹øÈ£¸¦ ÀÔ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù. Àü´Þ ÀÎÀÚ´Â Â÷·Ê·Î telb , telcÀÔ´Ï´Ù. */


    </font></td>
    </tr>

ÀÚÅà ÀüÈ­¹øÈ£ ÀԷ¶õ ¸¸µé±â

    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Tel2</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=tel2a size=4>-
    <input type=text name=tel2b size=5>-
    <input type=text name=tel2c size=5>
    </font></td>
    </tr>
    /* Áö¿ª ¹øÈ£¸¦ Æ÷ÇÔÇÑ 3°³ÀÇ º¯¼ö·Î ÀúÀåÇÕ´Ï´Ù. °¢°¢ tel2a , tel2b , tel2c ÀÔ´Ï´Ù. */

¿ìÆí ¹øÈ£¿Í ÀÚÅà ÀüÈ­¹øÈ£ ÀԷ¶õ ¸¸µé±â

    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~¿ìÆí¹øÈ£</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=uno size=4>-
    <input type=text name=uno2 size=4>*
    </font></td>
    </tr>
    /* ¿ìÆí ¹øÈ£¸¦ ÀÔ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù. µÎ°³ÀÇ ÀԷ¶õÀ» -·Î ±¸ºÐÇÏ¸ç °¢°¢ uno , uno2 º¯¼ö·Î ÀÔ·Â ¹øÈ£¸¦ Àü´ÞÇÕÏ´Ù. */


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Address</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=address size=54>* </font></td>
    /* ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù. ÁÖ¼Ò ÀÔ·ÂÀº º¸´Ù »ç¿ëÀÚ Áß½ÉÀÇ ÀÔ·Â ÇüÅ·Π¸¸µé ¼ö ÀÖ½À´Ï´Ù.
        
       Áï ÇØ´ç µµ½Ã¿Í Çش絿 µîÀÇ ÀÔ·ÂÀ» ÀÚµ¿À¸·Î ã°Ô ÇÏ´Â ¹æ¹ýÀε¥, ÀÌ°ÍÀº Àü±¹ÀÇ ÁÖ¼Ò¿Í ¿ìÆí¹øÈ£¸¦ °¡Áø
           
       µ¥ÀÌÅͺ£À̽º ÆÄÀÏÀÌ ÀÖ¾î¾ß Çϸç ÀÎÅÍ³Ý »ó¿¡¼­ ½±°Ô ±¸ÇÒ ¼ö ÀÖ½À´Ï´Ù.
           
       ¿©±â¼­´Â ȸ¿øÀÇ ÀÓÀÇ·Î ÀûÀ» ¼ö ÀÖµµ·Ï Çß½À´Ï´Ù. ¸¸¾à ȸ¿øÀÌ ¼îÇÎÀ» ÇÏ°í ¹°°ÇÀ» ±¸¸ÅÇÑ´Ù¸é ÀÌ ÁÖ¼Ò¶õÀ» 
           
       Á¤È®È÷ ÀÔ·Â Çؾ߸¸ ¹è´ÞÀÌ µÉ °ÍÀÔ´Ï´Ù. */
    </tr>

ÀÔ·Â Ç׸ñ Àü´Þ ¹öÆ° ¸¸µé±â

    <tr>
    <td bgcolor=black align=center colspan=4>
    <font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=submit value=ȸ¿øµî·Ï>
    /* ȸ¿øµî·Ï ¹öÆ°À» »ý¼ºÇÕ´Ï´Ù. ÀÌ°ÍÀº À§ ÀÔ·Â Ç׸ñµéÀÇ °ªÀ» userin.php ÆÄÀÏ·Î Àü´ÞÇÕ´Ï´Ù. */
    <input type=reset  value=´Ù½Ã></font></td>
    /* ´Ù½Ã ¹öÆ°À» »ý¼ºÇÕ´Ï´Ù. type=resetÀ̸ç ÀÌ°ÍÀº ÀÔ·Â Ç׸ñÀ» ÀüºÎ ´Ù½Ã ÀÔ·ÂÇÒ ¶§ »ç¿ëÇÕ´Ï´Ù. */
    </tr>
    </table>
    </form>/* Áߺ¹ ID °Ë»ç form¹® ÀÌÈÄ µÎ ¹ø° form¹®ÀÇ ³¡ÀÔ´Ï´Ù. */
    </center>
    </body>
    </html>
    ");

error_user( ) ÇÔ¼ö Ç׸ñ

    ȸ¿ø °¡ÀÔ ÀԷ¶õÀÇ ÀÔ·Â Á¶°ÇÀ» ºÎ¿© ÇÕ´Ï´Ù.

    Áï, ȸ¿ø °¡ÀÔ Ç׸ñ Áß »ç¿ëÀÚ°¡ ºÎÁ¤È®ÇÏ°Ô ÀÔ·ÂÇÒ °æ¿ì ¿¡·¯ È­¸éÀ» Ãâ·Â ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù.

ÇÔ¼ö Àü´Þ ÀÎÀÚµé

    error_user($connect,$id,$name,$passwda,$passwdb,$emaila,$emailb,$rsda,$rsdb,$telb,$telc,$uno,$uno2,$address)

    /* °¢ Àü´Þ ÀÎÀڴ ȸ¿ø ÀÔ·Â È­¸é¿¡¼­ ÀÔ·Â Çß´ø °ªÀ» Àü´Þ ÇÏ´Â º¯¼öµé ÀÔ´Ï´Ù. ±×¸®°í,

    $connectÀÇ °æ¿ì mysqlÀ» Á¢¼Ó ÇÏ´Â º¯¼ö ÀÔ´Ï´Ù. */ 

ID üũ

    if(!$id)
    {

      echo("
      <script>
      window.alert('id°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä.')
      history.go(-1)
      </script>
      ");

      exit;
    }
    /* $id °ªÀÌ ¾øÀ» °æ¿ì Ãâ·ÂÇÏ´Â È­¸é ÀÔ´Ï´Ù. */


    if($userin[id])
    {

      echo("
      <script>
      window.alert('°°Àº id°¡ ÀÖ½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
      history.go(-1)
      </script>
      ");

      exit;
    }
    /* $userin[id] °ªÀÌ Á¸ÀçÇÒ °æ¿ì °°Àº id°¡ ÀÖ´Â °ÍÀ̹ǷΠÇØ´ç È­¸éÀ» Ãâ·Â ÇÕ´Ï´Ù. */


    if(!ereg("[0-9a-zA-z]",$id) || strlen($id) < 4)
    { 

      echo("
      <script>
      window.alert('id´Â ¿µ¹®¼ýÀÚ Á¶ÇÕ À̾î¾ß ÇÕ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇϼ¼¿ä')
      history.go(-1)
      </script>
      ");

      exit;
    }

    /* Àü´Þ µÇ¾î¿Â $id °ªÀÌ ¼ýÀÚ¿Í ¿µ¹® Áß 4ÀÚ º¸´Ù ÀÛÀ» °æ¿ì ¿¡·¯¸¦ Ãâ·Â ÇÕ´Ï´Ù.
        
       Áï,ereg ÇÔ¼ö¸¦ »ç¿ëÇؼ­ [0-9a-zA-z] ¼ýÀÚ¿Í ¿µ¹®´ë¼Ò¹®ÀÚ°¡ ¾Æ´Ï¸é ¿¡·¯¸¦ Ãâ·Â ÇÏ°í ¶Ç´Â strlen ÇÔ¼ö¸¦
           
       »ç¿ëÇؼ­ Àü´ÞµÇ¾î¿Â ÀÎÀÚ Áß ¹®ÀÚ¼ö°¡ 4º¸´Ù ÀÛÀ» æ¿ì ¿¡·¯¸¦ Ãâ·Â ÇÕ´Ï´Ù. */

ȸ¿ø À̸§ üũ

    for($n = 0 ; $n < strlen($name) ; $n++)
    {


    if(ord($name[$n]) <= 0x80)
    {

    echo("
    <script>
    window.alert('À̸§ÀÌ ¾ø°Å³ª ÇѱÛÀÌ ¾Æ´Õ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
    history.go(-1)
    </script>
    ");
    exit;
    }
    }
    /* Àü´Þ µÇ¾î¿Â ȸ¿ø À̸§ÀÌ ÇѱÛÀÎÁö ¾Æ´ÑÁö üũ ÇÏ°í ¾Æ´Ò °æ¿ì ¿¡·¯ È­¸éÀ» Ãâ·Â ÇÕ´Ï´Ù. */


    if(!$name)
    {

    echo("
    <script>
    window.alert('À̸§ÀÌ ¾ø½À´Ï´Ù. À̸§ºÎÅÍ ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
    history.go(-1)
    </script>
    ");

    exit;
    }
    /* ȸ¿ø À̸§ÀÌ ÀÔ·Â µÇÁö ¾Ê¾ÒÀ» °æ¿ì Ãâ·Â µÇ´Â È­¸é ÀÔ´Ï´Ù. */

Æнº¿öµå üũ

    if(!$passwda || !$passwdb || $passwda != $passwdb)
    {

    echo("
    <script>
    window.alert('passw°¡ ¾ø°Å³ª Ʋ¸³´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
    history.go(-1)
    </script>
    ");

    exit;
    }
    /* ȸ¿ø °¡ÀÔ Ç׸ñ Áß Æнº¿öµå ºÎºÐ°ú Æнº¿öµå È®ÀÎ ºÎºÐÀÇ ÀÎÀÚ°¡ ¾øÀ» °æ¿ì ¶Ç´Â µÑÀÌ °°Áö ¾ÊÀ» °æ¿ì
        
       ¿¡·¯ È­¸éÀ» Ãâ·Â ÇÕ´Ï´Ù. */


    if(!ereg("[0-9a-zA_Z]",$passwda) || strlen($passwda) < 4)
    {
        
    echo("
    <script>
    window.alert('passw´Â ¿µ¼ýÀÚ Á¶ÇÕ À̾î¾ß ÇÕ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
    history.go(-1)
    </script>
    ");
        
    exit;
    }
    /* Æнº¿öµå°¡ ¿µ¹® ´ë¼Ò¹®ÀÚ³ª ¼ýÀÚ°¡ ¾Æ´Ò °æ¿ì ¶Ç´Â Àü´Þ µÇ¾î¿Â ¹®ÀÚ°¡ 4ÀÚ º¸´Ù ÀÛÀ» °æ¿ì ¿¡·¯ È­¸éÀ» Ãâ·Â ÇÕ´Ï´Ù. */

¸ÞÀÏ ÁÖ¼Ò Ã¼Å©

    if(!$emaila || !$emailb)
    {

    echo("
    <script>
    window.alert('¸ÞÀÏ ÁÖ¼Ò°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
    history.go(-1)
    </script>
    ");

    exit;
    }
    /* ¸ÞÀÏ ÁÖ¼Ò Ç׸ñÀÌ ¾øÀ» °æ¿ì Ãâ·Â ÇÏ´Â È­¸é ÀÔ´Ï´Ù. */


    if(!ereg("[0-9a-zA_Z]",$emaila) || !ereg("[0-1a-zA_Z]",$emailb))
    {

    echo("
    <script>
    window.alert('emailÀº ¿µ¼ýÀÚ Á¶ÇÕ À̾î¾ß ÇÕ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
    history.go(-1)
    </script>
    ");

    exit;
    }
    /* Àü´Þ µÇ¾î¿Â µÎ°³ÀÇ ¸ÞÀÏ ÁÖ¼Ò ÀÎÀÚ¿¡ ´ëÇØ ¿µ¹® ´ë¼Ò¹®ÀÚ ¿Í ¼ýÀÚ°¡ ¾Æ´Ï¸é ¿¡·¯ È­¸éÀ» Ãâ·Â ÇÕ´Ï´Ù. */

ÁֹΠ¹øÈ£ üũ

    $rsdno = "234567892345";
    $rsdin = $rsda.$rsdb ;
    /* Àü´Þ µÇ¾î¿Â µÎ°³ÀÇ ÁֹΠ¹øÈ£ ÀÎÀÚ¸¦ Çϳª·Î ¸¸µì´Ï´Ù. */


    $rsdchecka = substr($rsdin,$n,1);
    /* Àü´Þ µÇ¾î¿Â ÁֹΠ¹øÈ£ ÀÎÀÚ ÀÔ´Ï´Ù. */


    $rsdcheckb = substr($rsdno,$n,1);


    for ($n = 0 ; $n < 12 ; $n++)
    {
      $rsdall = $rsdall + $rsdchecka*$rsdcheckb ;
    }


    $rsdcheck = "11" - "($rsdall % 11)";
    $rsdb2 = substr($rsdb,0,1);
    /* ÁֹΠ¹øÈ£ µÎ ¹ø° ÀÎÀÚÀÇ Ã³À½ ¼ýÀÚ¸¦ ÃßÃâ ÇÕ´Ï´Ù. */


    $rsdcheck2 = substr($rsdcheck,-1,1);
    /* ÁֹΠ¹øÈ£ÀÇ ¸¶Áö¸· ÀÚ¸® ¼ýÀÚ¸¦ ÃßÃâ ÇÕ´Ï´Ù. */


    $rsdcheck3 = substr($rsdb,-1,1);
    /* ÁֹΠ¹øÈ£ÀÇ ¸¶Áö¸· ÀÚ¸® ¼ýÀÚ¸¦ ÃßÃâ ÇÕ´Ï´Ù. */


    $rsdcheck4 = ereg("[1-4]",$rsdb2);
    /* ÁֹΠ¹øÈ£ µÎ ¹ø° ÀÎÀÚÀÇ Ã³À½ ¼ýÀÚ°¡ 1~4 Áß Çϳª ÀÎÁö üũ ÇÕ´Ï´Ù. */


    if(!$rsdcheck4 || $rsdcheck2 != $rsdcheck3)
    {

    echo("
    $rsdcheck2
    $rsdcheck3
    <script>
    window.alert('ÁֹιøÈ£111°¡ Ʋ¸³´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
    history.go(-1)
    </script>
    ");

    exit;
    }
    /* ÁֹΠ¹øÈ£ µÎ ¹ø° ÀÎÀÚ°¡ 1~4 Áß Çϳª°¡ ¾Æ´Ò °æ¿ì ¶Ç´Â µÎ ¹ø° ÀÎÀÚ ¸¶Áö¸· ¼ýÀÚ°¡

       ÀÏÄ¡ ÇÏÁö ¾ÊÀ» °æ¿ì ¿¡·¯¸¦ Ãâ·Â ÇÕ´Ï´Ù. */


    if(!$rsda || !$rsdb)
    {

    echo("
    <script>
    window.alert('ÁֹιøÈ£°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
    history.go(-1)
    </script>
    ");

    exit;
    }
    /* ÁֹΠ¹øÈ£ µÎ ÀÎÀÚ°¡ ¾øÀ» °æ¿ì ¿¡·¯¸¦ Ãâ·Â ÇÕ´Ï´Ù. */

ÈÞ´ëÆù ¹øÈ£¿Í ¿ìÆí ¹øÈ£ üũ

    if(!$telb || !$telc)
    {

    echo("
    <script>
    window.alert('ÀüÈ­¹øÈ£°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
    history.go(-1)
    </script>
    ");
        
    exit;
    }
    /* ÈÞ´ëÆù ¹øÈ£ µÎ ÀÎÀÚ Áß Çϳª°¡ ¾øÀ» °æ¿ì ¿¡·¯ È­¸éÀ» Ãâ·Â ÇÕ´Ï´Ù. */


    if(!$uno || !$uno2)
    {

    echo("
    <script>
    window.alert('¿ìÆí¹øÈ£°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
    history.go(-1)
    </script>
    ");

    exit;
    }
    /* ¿ìÆí ¹øÈ£ µÎ ÀÎÀÚ Áß Çϳª°¡ ¾øÀ» °æ¿ì ¿¡·¯ È­¸éÀ» Ãâ·Â ÇÕ´Ï´Ù. */

ÁÖ¼Ò Ã¼Å©

    if(!$address)
    {

    echo("
    <script>
    window.alert('ÁÖ¼Ò°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
    history.go(-1)
    </script>
    ");

    exit;                  
    }
    /* ÁÖ¼Ò°¡ ¾øÀ» °æ¿ì Ãâ·Â ÇÏ´Â È­¸é ÀÔ´Ï´Ù. */

main_view( ) ÇÔ¼ö

    »çÀÌÆ®ÀÇ ¸ÞÀÎ È­¸éÀ» Ãâ·Â ÇÏ´Â ÇÔ¼ö ÀÔ´Ï´Ù. ÀÌÀåÀÇ Ã³À½ ¸ÞÀÎ È­¸é ±×¸²À» Âü°í Çϼ¼¿ä.

Àü´Þ ÀÎÀÚ

    main_view($username,$connect)

    /* $username´Â ÇØ´ç IDÀÇ ¼¼¼ÇÀ¸·Î ¸¸µé¾îÁø À¯Àú ID¸¦ Àü´Þ ¹Þ±â À§ÇÔ ÀÔ´Ï´Ù.

       Áï ¸ÞÀÎ È­¸éÀÇ ·Î±×ÀÎ »óŸ¦ º¸¿© ÁÖ±â À§Çؼ­ ÀÔ´Ï´Ù. $connect´Â Mysql Á¢¼Ó º¯¼ö ÀÔ´Ï´Ù. */

Mysql Á¢¼Ó Queryµé

    mysql_select_db(adminp,$connect);
    /* adminp µ¥ÀÌÅÍ º£À̽º¸¦ ¼±Åà ÇÕ´Ï´Ù.
        
    ÀÌ°ÍÀº µÚ µ¥ÀÌÅÍ º£À̽º À¯Æ¿¸®Æ¼¸¦ ¸¸µé ¶§ »ý¼ºÇÏ´Â µ¥ÀÌÅÍ º£À̽ºÀÌç ÀÚ·á½Ç°ú °æ¸Å °Ô½ÃÆÇÀÇ Á¤º¸¸¦ ´ã°í ÀÖ½À´Ï´Ù. */


    $ally = mysql_query("select no,title,mview,view from admin  order by no ",$connect);
    /* adminp µ¥ÀÌÅÍ º£À̽º¿¡ admin Å×À̺í(°æ¸Å °Ô½ÃÆÇ)ÀÇ ÀÎÀÚ¸¦ °Ë»ö ÇÕ´Ï´Ù.
        
    no - °Ô½ÃÆÇ ¹øÈ£ , title - °Ô½ÃÆÇ Á¦¸ñ , mview - °Ô½ÃÆÇ Ã¹ ¹ø° Å×ÀÌºí ¸í , view - °Ô½ÃÆÇ µÎ ¹ø° Å×ÀÌºí ¸í */


    $ally2 = mysql_query("select no,title,mview,view from file  order by no ",$connect);
    /* adminp µ¥ÀÌÅÍ º£À̽º¿¡ file Å×À̺í(ÀÚ·á½Ç °Ô½ÃÆÇ)ÀÇ ÀÎÀÚ¸¦ °Ë»ö ÇÕ´Ï´Ù. */


    $put = mysql_fetch_array($ally);
    $put2 = mysql_fetch_array($ally2);
    /* º¯¼ö put , put2·Î °¢ °Ë»ö °á°ú¸¦ ¹è¿­·Î ÀúÀå ÇÕ´Ï´Ù. */


    mysql_select_db('libchal',$connect);
    /* libchal µ¥ÀÌÅÍ º£À̽º¸¦ ¼±Åà ÇÕ´Ï´Ù. */


    $allya = mysql_query("select no,title,hit from $put[mview]  order by hit desc",$connect);
    /* libchal µ¥ÀÌÅÍ º£À̽º¿¡¼­ ÇØ´ç °æ¸Å °Ô½ÃÆÇ Å×À̺í Áß È÷Æ® ¼ö°¡ °¡Àå ³ôÀº ±ÛÀ» °Ë»ö ÇÕ´Ï´Ù. */


    $allyb = mysql_query("select no,title,hit from $put2[mview] order by hit desc",$connect );
    /* libchal µ¥ÀÌÅÍ º£À̽º¿¡¼­ ÇØ´ç ÀÚ·á½Ç °Ô½ÃÆÇ Å×À̺í Áß È÷Æ® ¼ö°¡ °¡Àå ³ôÀº ±ÛÀ» °Ë»ö ÇÕ´Ï´Ù. */


    $put3 = mysql_fetch_array($allya);
    $put4 = mysql_fetch_array($allyb);
    /* put3 , put4 º¯¼ö¿¡ ÇØ´ç °Ë»ö °á°ú¸¦ ¹è¿­·Î ÀúÀå ÇÕ´Ï´Ù. */


    $t_num=mysql_num_rows($ally);
    $t_num2=mysql_num_rows($ally2);
    /* °¢ °Ë»ö °á°úÀÇ ¼ö¸¦ º¯¼ö¿¡ ÀúÀå ÇÕ´Ï´Ù. */


    $wdate = date('H:i:s');
    /* ÇØ´ç º¯¼ö¿¡ Áö±Ý ³¯Â¥¸¦ ÀúÀå ÇÕ´Ï´Ù. */

»ç¿ëÀÚ ID¿Í ¼¼¼Ç È®ÀÎ

    if($username)
    {
      $sslogin = "$username login Çß½À´Ï´Ù.";
      /* µî·ÏµÈ ID·Î Á¢¼Ó ÇßÀ» °æ¿ì ÇØ´ç ID¸¦ º¯¼ö¿¡ ÀúÀå ÇÕ´Ï´Ù. */


      $chat_mod ="<a href ='userin.php?chanl=chat&username=$username' >";
      /* µî·ÏµÈ ID·Î Á¢¼Ó ÇßÀ» °æ¿ì ÇØ´ç ID·Î äÆà ¸ðµå¸¦ ¸µÅ© ÇÕ´Ï´Ù. */
    }


    if(!$username)
    {
      $sslogin = "Login Çϼ¼¿ä~!";
      $userss = "<a href ='userin.php?chanl=main'>";
    }
    /* µî·ÏµÈ ID·Î Á¢¼ÓÀ» ÇÏÁö ¾Ê¾ÒÀ» °æ¿ì °¢ º¯¼ö ÀÔ´Ï´Ù. */


    if($username == guest)
    {
      $sslogin = "$username login Çß½À´Ï´Ù.";
      $userss = "<a href ='userin.php?chanl=main'>";
    }
    /* Á¢¼ÓÇÑ ID°¡ guestÀÏ °æ¿ì º¯¼ö °ªµé ÀÔ´Ï´Ù. */

»ç¿ëÀÚ Á¢¼Ó ¹× äÆà ¸ðµå Ãâ·Â

    <tr>
    <font style='font-size:12px;color:gray'>
    $userss
    (ȸ¿ø °¡ÀÔ)
    </a>
    /* µî·ÏµÈ ID °¡ ¾Æ´Ò °æ¿ì ȸ¿ø °¡ÀÔÀ» ¸µÅ© ÇÕ´Ï´Ù. */


    (gestÀÔÀåÀº id¿¡ guestÀÔ·Â)
    $chat_mod
    (Chating)
    </a>
    </font>
    /* µî·ÏµÈ ID·Î ·Î±×ÀÎ ÇßÀ» °æ¿ì äÆà ¸ðµå¸¦ ¸µÅ© ÇÕ´Ï´Ù. */

ÀԷ¶õ°ú ·Î±×ÀÎ ·Î±×¾Æ¿ô ¹öÆ° ¸¸µé±â

    <form method=post action=userin.php>
    <input type=hidden name=chanl value=login>
    /* ID ÀÔ·Â Ç׸ñÀÇ form¹®ÀÇ ½ÃÀÛ ÀÔ´Ï´Ù. Chanl º¯¼öÀÇ °ªÀº login À̸ç userin.php¿¡ Àü´Þ ÇÕ´Ï´Ù. */


    <td width=90 bgcolor=#808080 align=center>
    <font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~ID</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=id size=9></font></td>
    /* µî·ÏµÈ ID¸¦ ÀÔ·Â ÇÏ´Â Ç׸ñÀ» Ãâ·Â ÇÏ°í, id º¯¼ö·Î ÀÔ·Â µË´Ï´Ù. */


    <td width=50 bgcolor=black>
    <img src=icon.jpg border=0 align=center>
    </td>


    <td bgcolor=black  align=left>
    <font style='font-size:13px;text-decoration:none;font-style:italic;color:blue'>
    <a href ='m.php?chanl=main_view&f=$put2[mview]&f2=$put2[view]&ssid=$username' >
    /* µî·ÏµÈ ÀÚ·á½Ç °Ô½ÃÆÇÀÇ Ã³À½ ÀÚ·á½ÇÀ» ¸µÅ© ÇÕ´Ï´Ù.
        
       ÀÚ·á½Ç Å×À̺íÀÇ ½ÇÇàÀº m.phpÆÄÀÏÀ̸ç f,f2´Â ÇØ´ç ÀÚ·áÇÀÇ Å×À̺í ÀÔ´Ï´Ù.

       ±×¸®°í, ssid´Â ·Î±×ÀÎÇÑ ID ÀÔ´Ï´Ù. */


    <font style='font-size:13px;text-decoration:none;font-style:italic;color:blue'>
    $put2[title]</font></a>
    </td>
    </tr>


    <tr>
    <td width=90 bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Passwd</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=password name=passwd size=9></font></td>
    /* ÇØ´ç IDÀÇ Æнº¿öµå¸¦ ÀÔ·ÂÇÏ´Â ºÎºÐ À̸ç passwd º¯¼ö¿¡ ÀúÀå µË´Ï´Ù. */


    <td width=50 bgcolor=black align=left>
    <img src=icon.jpg border=0 align=center>
    </td>
    <td bgcolor=black  align=left>
    <a href ='main_view.php?chanl=main_view&f=$put[mview]&f2=
    /* µî·ÏµÈ °æ¸Å °Ô½ÃÆÇÀÇ Ã³À½ °æ¸Å¸¦ ¸µÅ© ÇÕ´Ï´Ù. */


    $put[view]&ssid=$username' >
    <font style='font-size:13px;text-decoration:none;font-style:italic;color:blue'>
    $put[title]</font></a></td>
    </tr>


    <tr>
    <td width=90 bgcolor=black>
    <input type=submit value=Login>
    </form>
    /* µî·ÏµÈ ID¿Í Æнº¿öµå·Î ·Î±×ÀÎ ÇÏ´Â ¹öÆ°À» »ý¼º ÇÕ´Ï´Ù. */


    </td>
    <form method=post action=userin.php>
    <input type=hidden name=chanl value=logout>
    <td bgcolor=black>
    <input type=submit value=Logout>
    </form>
    </td>
    /* ·Î±×ÀÎ ÇÑ ID¸¦ ·Î±×¾Æ¿ô ÇÏ´Â ¹öÆ°À» »ý¼º ÇÕ´Ï´Ù.  userin.php ÆÄÀÏÀÇ chanl=logout Ç׸ñÀ» ½ÇÇà ÇÕ´Ï´Ù. */

¼îÇÎ ¸ô¿¡ ¼±Åà ¸¸µé±â

    <td bgcolor=black  align=left>
    <font style='font-size:13px;text-decoration:none;font-style:italic;color:blue'>
    <form method=post action=shop.php>cry~
    <select name=sel>
    <option value=1 selected>ÀüÀÚÁ¦Ç°
    <option value=2>ÀÇ·ù
    <option value=3>À½¾Ç
    <option value=4>Ã¥
    </select>!shop</font>
    <input type=submit value=~Go>
    </td>
    </form>
    /* sel º¯¼ö·Î °¢ ¼îÇÎ ¸ô¿¡ÀÇ Á¾·ù¸¦ Àü´Þ ÇÕ´Ï´Ù. ±×¸®°í Go ¹öÆ°À» »ý¼º ÇÕ´Ï´Ù. */

Top ÀÚ·á ¿Í Top °æ¸Å Ãâ·Â Çϱâ

    <table border=0 cellspacing=2 cellpadding=2 width=700 >
    <td bgcolor=black  align=center width=200>
    <font style='font-size:13px;font-style:italic;color:white'>
    <img src=icon.jpg border=0 align=center>Top ÀÚ·á</font></td>
    <td bgcolor=black  align=left width=500>
    <a href ='m.php?chanl=title&no=$put4[no]&f=$put2[mview]&f2=
    $put2[view]&ssid=$username' >
    /* ÇØ´ç ÀÚ·á½ÇÀÇ È÷Æ® ¼ö°¡ Á¦ÀÏ ³ôÀº ÀڷḦ ¸µÅ© ÇÕ´Ï´Ù. */


    <font style='font-size:13px;text-decoration:none;font-style:italic;color:gray'>
    <strong>$put4[title]</strong></font></a></td>
    /* $put4[title]Àº µî·ÏµÈ ÀÚ·á½ÇÀÇ È÷Æ® ¼ö°¡ Á¦ÀÏ ³ôÀº ÀڷḦ Ãâ·Â ÇÕ´Ï´Ù. */
    <tr>


    <td bgcolor=black  align=center width=200>
    <font style='font-size:13px;font-style:italic;color:white'>
    <img src=icon.jpg border=0 align=center>Top °æ¸Å</font></td>
    <td bgcolor=black  align=left width=500>
    <a href ='main_view.php?chanl=title&no=$put3[no]&f=
    $put[mview]&f2=$put[view]&ssid=$username' >
    /* µî·ÏµÈ °æ¸Å Áß È÷Æ® ¼ö°¡ Á¦ÀÏ ³ôÀº °æ¸Å¸¦ ¸µÅ© ÇÕ´Ï´Ù. */


    <font style='font-size:13px;text-decoration:none;font-style:italic;color:gray'>
    <strong>$put3[title]</strong></font></a></td>
    /* $put3[title]´Â µî·ÏµÈ °æ¸Å Áß È÷Æ® ¼ö°¡ Á¦ÀÏ ³ôÀº °æ¸Å¸¦ Ãâ·Â ÇÕ´Ï´Ù. */
    </tr>
    </table>

¸¸µé¾îÁø ÀÚ·á½Ç ¸ðµÎ Ãâ·Â Çϱâ

    ÀÌ°ÍÀº µ¥ÀÌÅÍ º£À̽º admin¿¡¼­ »õ·Ó°Ô »ý¼ºÇß´ø ÀÚ·á½Ç¿¡ ´ëÇØ È­¸é¿¡ Ãâ·Â ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù.


    for($pd=1 ; $pd < $t_num2 ; $pd++)

    {
    /* $t_num2´Â µî·ÏµÈ ÀÚ·á½ÇÀÇ ¼ö ÀÔ´Ï´Ù. */


    $put2 = mysql_fetch_array($ally2);
    /* ÇØ´ç ÀÚ·á½ÇÀÇ Á¤º¸¸¦ ¹è¿­·Î ÀúÀå ÇÕ´Ï´Ù. $ally2 º¯¼ö´Â ÇØ´ç ÀÚ·á½ÇÀÇ Á¤º¸¸¦ °¡Áö°í ÀÖ½À´Ï´Ù. */

    echo("
    <tr>
    <td bgcolor=black align=center width=200>
    <img src=icon.jpg border=0 align=center></td>


    <td bgcolor=black  align=left width=500>
    <a href ='m.php?chanl=main_view&f=$put2[mview]&f2=$put2[view]&ssid=$username' >
    /* µî·ÏµÈ ÀÚ·á½ÇÀ» Çϳª¾¿ ¸µÅ© ÇÕ´Ï´Ù. For¹®¿¡ ÀÇÇؼ­ ½ÇÇà ÇÕ´Ï´Ù. */


    <font style='font-size:13px;text-decoration:none;font-style:italic;color:gray'>
    <strong>$put2[title]</strong></font></a></td>
    </tr>
    /* µî·ÏµÈ ÀÚ·á½ÇÀÇ Á¦¸ñÀ» Çϳª¾¿ Ãâ·Â ÇÕ´Ï´Ù.
        
       ÀÌ°ÍÀº Á¦ÀÏ Ã³À½ ¸ÞÀÎ È­¸é¿¡ Ãâ·ÂÇÑ ÀÚ·á½ÇÀ» Á¦¿ÜÇÑ ±× ´ÙÀ½ Ú·á½ÇºÎÅÍ ÀÔ´Ï´Ù. */
    ");
    }

¸¸µé¾îÁø °æ¸Å °Ô½ÃÆÇ ¸ðµÎ Ãâ·ÂÇϱâ

    for($pd=1 ; $pd < $t_num ; $pd++)
    {
    /* $t_num Àº ¸¸µç °æ¸Å °Ô½ÃÆÇÀÇ ÃÑ ¼ö ÀÔ´Ï´Ù. */


    $put = mysql_fetch_array($ally);
    /* ÇØ´ç °æ¸Å °Ô½ÃÆÇÀÇ Á¤º¸¸¦ ¹è¿­·Î ÀúÀå ÇÕ´Ï´Ù. */


    echo("
    <tr>
    <td bgcolor=black align=center width=200>
    <img src=icon.jpg border=0 align=center></td>
    <td bgcolor=black  align=left width=500>
    <a href ='main_view.php?chanl=main_view&f=$put[mview]&f2=
    $put[view]&ssid=$username' >
    /* ÇØ´ç °æ¸Å °Ô½ÃÆÇÀ» Çϳª¾¿ ¸µÅ© ÇÕ´Ï´Ù. For¹®¿¡ ÀÇÇØ ÇöÀç ¸¸µé¾îÁø °Ô½ÃÆÇÀÇ ¼ö¸¸Å­ µÇÇ®ÀÌ ÇÕ´Ï´Ù. */


    <font style='font-size:13px;text-decoration:none;font-style:italic;color:gray'>
    <strong>$put[title]</strong></font></a></td>
    </tr>
    /* ÇØ´ç °Ô½ÃÆÇÀÇ Á¦¸ñÀ» Ãâ·Â ÇÕ´Ï´Ù. */
    ");
    }

userin.php Àüü ÄÚµå

    userin_func.php ÆÄÀÏÀÇ ÇÔ¼öµéÀ» ÀÌ¿ëÇؼ­ È­¸é¿¡ Ãâ·ÂÇÏ´Â ÆÄÀÏ ÀÔ´Ï´Ù.


    <?php

    include('userin_func.php');


    if($chanl == main_view || !$chanl)
    {
      main_view($username,$connect);
    }


    if($chanl == main)
    {
      main_userin($sel);
    }


    if($chanl == in)
    {
      error_user($connect,$id,$name,$passwda,$passwdb,$emaila,$emailb,$rsda,$rsdb,$telb,$telc,$uno,$uno2,$address);


      $wdate = date('y-m-d');
      $resident = "$rsda-$rsdb" ;
      $email = "$emaila@$emailb" ;
      $tel1 = "$tela-$telb-$telc" ;
      $tel2 = "$tel2a-$tel2b-$tel2c" ;
      $uno = "$uno-$uno2" ;


      mysql_query("insert into userin(name,id,passwd,resident,email,homepage,address,tel1,tel2,wdate,uno)
                  values('$name','$id',password('$passwda'),'$resident','$email',
                         '$home','$address','$tel1','$tel2','$wdate','$uno')",$connect);


      if($sel == user_edit)
      {
        echo("
        <html>
        <body>
        <center>
        <form method=post action=db_view.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>ȸ¿ø °¡ÀÔÀÌ µÇ¾ú½À´Ï´Ù.</b></font>
        <input type=hidden name=chanl value=user_edit>
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");
      }
      else
      {
        echo("
        <html>
        <body>
        <center>
        <form method=post action=userin.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>ȸ¿ø °¡ÀÔÀÌ µÇ¾ú½À´Ï´Ù.</b></font>
        <input type=hidden name=no value=$no>
        <input type=hidden name=chanl value=main_view>
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");
      }
    }


    if($chanl == checkid)
    {
      $ally = mysql_query("select id from userin where id='$id'",$connect);
      $userin = mysql_fetch_array($ally);


      if($userin[id] || !$id)
      {
        echo("
        <script>
        window.alert('°°Àº id°¡ Àְųª °ø¶õ ÀÔ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }
      else
      {
        echo("
        <script>
        window.alert('»ç¿ë °¡´ÉÇÑ id ÀÔ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }
    }


    if($chanl == login)
    {
      $ally = mysql_query("select id,passwd from userin where id='$id'",$connect);
      $userin = mysql_fetch_array($ally);
      $passwput = mysql_query("select password('$passwd')");
      $passwput1 = mysql_result($passwput,0,0);


      if($userin[passwd] != $passwput1 || !$id )
      {
        echo("
        <script>
        window.alert('id,passw°¡ Ʋ¸³´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }


      if($userin[passwd] == $passwput1 && $userin[id] == $id || $id == guest)
      {
        session_start();
        $username = "$id";
        session_register( "username");
        main_view($username,$connect);
      }
      else
      {
        echo("
        <script>
        window.alert('id,passw°¡ Ʋ¸³´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }
    }


    if($chanl == chat)
    {
      echo("
      <html>
      <body>
      <center>
      <script>
      window.open('chat.php','send','height=100px width=325px')
      window.open('chat_view.php','send2','height=200px width=325px')
      </script>
      </center>
      </body>
      </html>
      ");

      main_view($username,$connect);
    }


    if($chanl == logout)
    {
      session_start();
      session_destroy("username");
      main_view($username,$connect);
    }

    ?>

¼Ò½º ¼³¸í

    ÀÌ ÆÄÀÏÀº userin_func.php ÆÄÀÏÀÇ ÇÔ¼öµéÀ» º¸´Ù ´Ù¾çÇÑ ¹æ¹ýÀ¸·Î È­¸é¿¡ Ãâ·Â ÇÏ°Ô²û ±¸¼ºµÈ ÆÄÀÏ ÀÔ´Ï´Ù. 

    ´Ü¼øÈ÷ if¹®ÀÇ ³ª¿­¸¸ Á¸Àç ÇÏÁö¸¸ ÀÌ°ÍÀº $chanl À̶ó´Â º¯¼ö¸¦ µÒÀ¸·Î Çؼ­ °¢°¢ÀÇ chanl¿¡ µû¶ó Ãâ·Â ÇÏ´Â
        
    È­¸éÀÌ ´Þ¶ó Áý´Ï´Ù.

¸ÞÀÎ È­¸é Ãâ·Â

    <?php

    include('userin_func.php');
    /* userin_func.php ÆÄÀÏÀ» Æ÷ÇÔ ÇÕ´Ï´Ù. ÀÌ°ÍÀº ÀÌ ÆÄÀÏ ¾ÈÀÇ ÇÔ¼öµéÀ» »ç¿ë Çϱâ À§ÇÔ ÀÔ´Ï´Ù. */


    if($chanl == main_view || !$chanl)
    {
      main_view($username,$connect);
    }
    /* $chanl ÀÌ ¾ø°Å³ª ¶Ç´Â main_view À϶§ ¸ÞÀÎ È­¸éÀ» Ãâ·Â ÇÕ´Ï´Ù. */

ȸ¿ø °¡ÀÔ Ãâ·Â°ú µ¥ÀÌÅÍ º£À̽º ÀÔ·Â

    if($chanl == main)
    {
      main_userin($sel);
    }
    /* $chanl ÀÌ main ÀÏ ¶§ ȸ¿ø °¡ÀÔ È­¸éÀ» Ãâ·Â ÇÕ´Ï´Ù. */


    if($chanl == in)
    {

      error_user($connect,$id,$name,$passwda,$passwdb,$emaila,$emailb,$rsda,$rsdb,$telb,$telc,$uno,$uno2,$address);
      /* $chanlÀÌ inÀÏ ¶§ Àü´Þ µÇ¾î¿Â ȸ¿ø Á¤º¸¸¦ ÀÔ·Â ÇÏ´Â ºÎºÐ ÀÌ¸ç °¢ ÀÎÀڵ鿡 ´ëÇØ ¿¡·¯ ¿©ºÎ¸¦ üũ ÇÕ´Ï´Ù. */
      

      $wdate = date('y-m-d');
      $resident = "$rsda-$rsdb" ;
      $email = "$emaila@$emailb" ;
      $tel1 = "$tela-$telb-$telc" ;
      $tel2 = "$tel2a-$tel2b-$tel2c" ;
      $uno = "$uno-$uno2" ;
      /* ÁֹιøÈ£ , ¸ÞÀÏ , ÀüÈ­¹øÈ£ , ¿ìÆí¹øÈ£¿¡ ´ëÇØ °¢°¢ÀÇ Çü½Ä¿¡ ¸Â°Ô ¸¸µì´Ï´Ù. */


      mysql_query("insert into userin(name,id,passwd,resident,email,homepage,address,tel1,tel2,wdate,uno)
           values('$name','$id',password('$passwda'),'$resident','$email',
                  '$home','$address','$tel1','$tel2','$wdate','$uno')",$connect);
      /* Àü´Þ µÇ¾î¿Â °¢ ȸ¿ø Á¤º¸°¡ ¿¡·¯°¡ ¾ø´Ù¸é userin Å×ÀÌºí¿¡ ÀÔ·Â ÇÕ´Ï´Ù. */


      if($sel == user_edit)
      {
      /* $sel ÀÌ user_edit À̸é admin Ç׸ñ¿¡¼­ ÀÏ¹Ý À¯Àú¸¦ µî·ÏÇÑ °ÍÀ̸ç, »õ·Î¿î ȸ¿øÀ» µî·Ï ½ÃŲ ÈÄ ´Ù½Ã
          
         admin Ç׸ñÀ¸·Î µÇµ¹¾Æ °©´Ï´Ù. */


         echo("
         <html>
         <body>
         <center>
         <form method=post action=db_view.php>
         <font style='font-size:13px;font-style:italic;color:#808080'>
         <b>ȸ¿ø °¡ÀÔÀÌ µÇ¾ú½À´Ï´Ù.</b></font>
         <input type=hidden name=chanl value=user_edit>
         <input type=submit value=È®ÀÎ>
         </form>
         </center>
         </body>
         </html>
         ");
      }
      else
      {
         /* else °æ¿ì $sel °ªÀÌ ¾ø´Â °æ¿ì À̸ç, ÀÏ¹Ý »ç¿ëÀÚµéÀÌ È¸¿ø °¡ÀÔÀ» ÇÒ °æ¿ì °¡ÀÔÇÑ ÈÄ¿¡ ´Ù½Ã
                 
            ¸ÞÀÎ È­¸éÀ¸·Î À̵¿ÇÕ´Ï´Ù. */

        echo("
        <html>
        <body>
        <center>
        <form method=post action=userin.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>ȸ¿ø °¡ÀÔÀÌ µÇ¾ú½À´Ï´Ù.</b></font>
        <input type=hidden name=no value=$no>
        <input type=hidden name=chanl value=main_view>


        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");

      }
    }

ID üũ Ç׸ñ

    if($chanl == checkid)
    {
      $ally = mysql_query("select id from userin where id='$id'",$connect);
      $userin = mysql_fetch_array($ally);
      /* $chanlÀÌ checkidÀÏ °æ¿ì ¼öÇàÇϸç, userinÅ×ÀÌºí¿¡¼­ Àü´Þ µÇ¾î¿Â IDÀÇ Á¸Àç ¿©ºÎ¸¦ °Ë»ö ÇÏ°í °á°ú¸¦
          
         ¹è¿­·Î ÀúÀå ÇÕ´Ï´Ù. */


      if($userin[id] || !$id)
      {
        echo("
        <script>
        window.alert('°°Àº id°¡ Àְųª °ø¶õ ÀÔ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }
      /* Àü´Þ µÇ¾î¿Â ID°¡ ¾ø°Å³ª ¶Ç´Â ÇØ´ç ID°¡ userin Å×ÀÌºí¿¡ ÀÖÀ» °æ¿ì Ãâ·Â ÇÏ´Â È­¸é ÀÔ´Ï´Ù. */
          
      else
      {
        echo("
        <script>
        window.alert('»ç¿ë °¡´ÉÇÑ id ÀÔ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");

        exit;
      }
      /* ±× ¹ÛÀÇ °æ¿ì »ç¿ë °¡´ÉÇÑ IDÀÓÀ» Ãâ·Â ÇÕ´Ï´Ù. */
    }

login ó¸®

    if($chanl == login)
    {
      $ally = mysql_query("select id,passwd from userin where id='$id'",$connect);
      $userin = mysql_fetch_array($ally);
      $passwput = mysql_query("select password('$passwd')");
      $passwput1 = mysql_result($passwput,0,0);

      /* $chanlÀÌ loginÀÏ ¶§ userinÅ×ÀÌºí¿¡¼­ Àü´Þ µÇ¾î¿Â ID¿¡ ´ëÇØ °Ë»öÇÏ°í, °á°ú¸¦ ¹è¿­·Î ÀúÀå ÇÕ´Ï´Ù.
          
      ±×¸®°í, Àü´ÞµÇ¾î¿Â Æнº¿öµå¸¦ ¾Ïȣȭ Çؼ­ º¯¼ö¿¡ ÀúÀå ÇÕ´Ï´Ù. */


      if($userin[passwd] != $passwput1 || !$id )
      {
        echo("
        <script>
        window.alert('id,passw°¡ Ʋ¸³´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");

        exit;
      }
      /* Àü´Þ µÇ¾î¿Â ID°¡ ¾ø°Å³ª ¶Ç´Â Àü´Þ µÇ¾î¿Â Æнº¿öµå¿Í °Ë»öÇÑ Æнº¿öµå°¡ °°Áö ¾ÊÀ» °æ¿ì Ãâ·Â ÇÏ´Â È­¸é ÀÔ´Ï´Ù. */


      if($userin[passwd] == $passwput1 && $userin[id] == $id || $id == guest)
      {
        session_start();
        $username = "$id";
        session_register( "username");
        main_view($username,$connect);
      }
      /* Àü´Þ µÇ¾î¿Â Æнº¿öµå,ID°¡ °Ë»öÇÑ Æнº¿öµå,ID ¿Í °°À» °æ¿ì ¶Ç´Â Àü´Þ µÇ¾î¿Â ID°¡ guest ÀÏ °æ¿ì
          
      ÇØ´ç ID¿¡ ´ëÇØ ¼¼¼ÇÀ» ¸¸µì´Ï´Ù. */

      else
      {
        echo("
        <script>
        window.alert('id,passw°¡ Ʋ¸³´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");

        exit;
      }
      /* ±× ¹ÛÀÇ °æ¿ì Ãâ·Â ÇÏ´Â È­¸é ÀÔ´Ï´Ù. */

    }

äÆà â ¶ç¿ì±â

    if($chanl == chat)
    {
      echo("
      <html>
      <body>
      <center>
      <script>
      window.open('chat.php','send','height=100px width=325px')
      window.open('chat_view.php','send2','height=200px width=325px')
      /* $chanl ÀÌ chatÀÏ ¶§ µÎ°³ÀÇ Ã¤Æà âÀ» ¶ç¿ó´Ï´Ù. °£´ÜÇÑ java ½ºÅ©¸³Æ®¸¦ ÀÌ¿ëÇÑ ¹æ¹ý ÀÔ´Ï´Ù. */
      </script>
      </center>
      </body>
      </html>
      ");

      main_view($username,$connect);
    }

logout Çϱâ

    if($chanl == logout)
    {
      session_start();
      session_destroy("username");
      main_view($username,$connect);
    }
    /* $chanlÀÌ logoutÀÏ °æ¿ì Á¢¼ÓÇÑ IDÀÇ ¼¼¼ÇÀ» Á¦°Å ÇÕ´Ï´Ù. */

        
    ´ÙÀ½ Àå¿¡¼­´Â ÀÚ·á½Ç¿¡ ´ëÇØ ¼³¸í ÇÏ°Ú½À´Ï´Ù.

13. ÀÚ·á½Ç ¸¸µé±ââ

ÀÚ·á½ÇÀº °£´ÜÇÑ µ¥ÀÌÅÍÀÇ °æ¿ì ¸Å¿ì À¯¿ëÇÏ°Ô »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. º¸Åë ÀϹÝÀûÀÎ À¯Æ¿¸®Æ¼ ÀÚ·á °øÀ¯·Î È°¿ëÇÒ ¼ö ÀÖÀ¸¸ç

¿©±â¼­ ±¸ÇöÇÒ ÀÚ·á½ÇÀº ÀÚ·á¿¡ °üÇÑ ÀÀ´ä ±Û ±â´ÉÀÌ ÀÖ´Â ¾ÆÁÖ °£´ÜÇÑ ¼Ò½ºÀÔ´Ï´Ù.

13.1 ¼Ò½ºÀÇ ±¸¼º

ÀÚ·á½Ç Å×ÀÌºí ¸¸µé±â

ÀÚ·á½ÇÀÇ Å×À̺íÀº ÃÑ µÎ°³·Î ÀÌ·ç¾îÁ® ÀÖ½À´Ï´Ù.    Àüü ÀÚ·á¿¡ °üÇÑ Å×À̺í°ú ÇØ´ç ÀÚ·á¿¡ °üÇÑ ÀÀ´ä ±Û Å×À̺íÀÔ´Ï´Ù.    ¿©±â¼­ ¸¸µé Å×À̺íÀº ´ÜÁö ÀÚ·á½Ç Çϳª¸¸ ¸¸µé °æ¿ì ±× °úÁ¤À» ¼³¸íÇÑ °ÍÀ̸ç ÀÌÈÄ º» »çÀÌÆ®¸¦ ±¸¼ºÇÒ ¶§ ÀÚ·á½Ç°ú °æ¸Å °Ô½ÃÆÇÀº admin ¿µ¿ª¿¡¼­ ÀÚ½ÅÀÌ ¿øÇÏ´Â ¸¸Å­ °Ô½ÃÆÇÀ» »ý¼ºÇÒ ¼ö ÀÖ½À´Ï´Ù.    Áï, ¿©±â¼­ ¼öÀÛ¾÷À¸·Î ¸¸µç ÀÚ·á½Ç Å×À̺íÀº ³ªÁß¿¡ »ý¼ºÇÒ admin ±â´É¿¡¼­ ÀÚ·á½Ç Ç׸ñ¿¡ ³ªÅ¸³ªÁö ¾Ê½À´Ï´Ù. ¶ÇÇÑ ÀÚ·á½Ç ¼Ò½º ºÎºÐ Áß ÀÚ·á½Ç Å×À̺í($f , $f2)À» Áö±Ý »ý¼ºÇÏ´Â Å×ÀÌºí ¸íÀ¸·Î ¹Ù²Ù¾î¼­ »ç¿ëÇØ¾ß ÇÕ´Ï´Ù.    ¿©±â¼­´Â ÀÚ·á½Ç ¼Ò½ºÀÇ ±¸¼º°ú ÀÛ¼º ¿ä·ÉÀ» ÁßÁ¡ÀûÀ¸·Î ¼³¸íÇÕ´Ï´Ù.

    1) µ¥ÀÌÅͺ£À̽º ¸¸µé±â

        mysql>create databases libchal ;
        ÀÚ·á½Ç Å×À̺íÀ» ¸¸µé µ¥ÀÌÅͺ£À̽º¸¦ »ý¼ºÇÕ´Ï´Ù. Libchal µ¥ÀÌÅͺ£À̽º´Â °æ¸Å °Ô½ÃÆÇÀÇ Å×ÀÌºíµµ »ý¼ºÇÕ´Ï´Ù.

                
    2) Å×ÀÌºí ¸¸µé±â

        ./mysql -u root -p libchal < filetest.sql 

 

    CDÀÇ filetest.sql ÆÄÀÏÀ» ÀÌ¿ëÇؼ­ °£´ÜÈ÷ ÀÚ·á½Ç Å×À̺íÀ» »ý¼ºÇÕ´Ï´Ù.
    ÀÌ ¹æ¹ýÀº »õ·Ó°Ô ÆÄÀÏÀ» »ý¼ºÇؼ­ °¢ Å×À̺íÀÇ ¼Ó¼ºÀ» º¯°æÇؼ­ »ç¿ëÇصµ µË´Ï´Ù. 
    ¿©±â¼­ ¸¸µç Å×À̺íÀº ÇöÀç ±¸¼ºÇÒ ½ºÅ©¸³Æ®ÀÇ ÀÚ·á½Ç Å×ÀÌºí ¸íÀ» ¼öÁ¤Çؼ­ º¼ ¼ö ÀÖ½À´Ï´Ù.
    Áï , ³ªÁß¿¡ admin ¿µ¿ª¿¡¼­ »ý¼ºÇÑ ÀÚ·á½Ç °Ô½ÃÆÇÀÌ ¾Æ´Ò °æ¿ì´Â ¸ÞÀÎ È­¸é¿¡ ³ªÅ¸³ªÁö ¾Ê½À´Ï´Ù.
    »ý¼ºµÇ´Â Å×À̺íÀº filetest¿Í filetest2ÀÌ°í ÀÌ Å×À̺íÀ» ÀÚ·á½Ç ½ºÅ©¸³Æ®¿¡ Àû¿ëÇϱâ À§Çؼ­ ¾Æ·¡ÀÇ ¸µÅ©¸¦
    »ç¿ëÇØ¾ß ÇÕ´Ï´Ù.

  
        <a href ='m.php?chanl=main_view&f=ÀÚ·á½Ç ¸ÞÀÎ Å×À̺í¸í

        &f2=ÀÀ´ä ±Û Å×ÀÌºí ¸í&ssid=$username' >

   
    ÀÌ°ÍÀº °æ¸Å °Ô½ÃÆÇÀÇ °æ¿ìµµ ¸¶Âù°¡ÁöÀÔ´Ï´Ù.



    3) Å×À̺íÀÇ ±¸¼º ÀÎÀÚµé

        ÀÚ·á½ÇÀÇ Å×À̺íÀº ÃÑ µÎ°³·Î ÀÌ·ç¾îÁ® ÀÖ½À´Ï´Ù.
        ¿©±â¼­ Å×À̺íÀ» ¸¸µé¾î º¸´Â °ÍÀº ´ÜÁö ÀÚ·á½ÇÀÇ Å×ÀÌºí ±¸¼º ¿ä¼Ò¸¦ È®ÀÎÇϱâ À§ÇÔÀÔ´Ï´Ù. 
        Áï Å×À̺íÀ» ¿©±â¼­ ¸¸µéÁö ¾Ê´õ¶óµµ admin ¿µ¿ª¿¡¼­ »ý¼ºÇؼ­ »ç¿ëÇÏ¸é µË´Ï´Ù.

ÀÚ·á½Ç ¸ÞÀÎ Å×À̺í

    °¢ ÀÎÀÚ Áß¿¡ µî·ÏÀÚ À̸§°ú Æнº¿öµå µîÀ» ¼³Á¤ÇÑ °ÍÀº ȸ¿øÁ¦ »çÀÌÆ®Áö¸¸ ÀÚ·á½ÇÀÇ ÀÌ¿ëÀº °ø°³Çϱâ
    À§ÇÔÀÔ´Ï´Ù.   Áï , ȸ¿ø °¡ÀÔÀ» ÇÏÁö ¾Ê°í guest·Î ÀÔÀå ÇÏ´õ¶óµµ ÀÚ·áÀÇ ´Ù¿î·Îµå´Â °¡´ÉÇÕ´Ï´Ù.
    ±×¸®°í ȸ¿øÀÎ °æ¿ì¶óµµ ´Ù¾çÇÑ À̸§°ú Æнº¿öµå·Î µî·Ï°¡´ÉÇÕ´Ï´Ù.

 
        no - ÀÚ·áÀÇ ¹øÈ£¸¦ ºÎ¿©ÇÕ´Ï´Ù. (ÀÚµ¿ Áõ°¡)
        name - ÀÚ·á µî·ÏÀÚ À̸§
        email - ÀÚ·á µî·ÏÀÚ ¸ÞÀÏ ÁÖ¼Ò
        path - µî·ÏµÈ ÀÚ·áÀÇ À§Ä¡
        passw - µî·ÏÀÚ Æнº¿öµå
        title - ÀÚ·á Á¦¸ñ
        content - ÀÚ·á ¼³¸í
        wdate - ÀÚ·á µî·Ï ³¯Â¥
        hit - ÇØ´ç ÀÚ·á Á¶È¸ ¼ö

ÀÀ´ä ±Û Å×À̺í

    ÀÀ´ä ±ÛÀÇ °æ¿ì ÇØ´ç ÀÚ·á¿¡ ´ëÇÑ °íÀ¯ ¹øÈ£¸¦ ÀúÀåÇϸç ÇØ´ç ±ÛÀÇ ³»¿ë¿¡ ³ª¿­µË´Ï´Ù.

 
        name - ÀÀ´ä ±Û µî·ÏÀÚ À̸§
        email - ÀÀ´ä ±Û µî·ÏÀÚ ¸ÞÀÏ ÁÖ¼Ò
        tnum - ÇØ´ç ÀÚ·áÀÇ °íÀ¯ ¹øÈ£ ÀúÀå
        wdate - ÀÀ´ä ±Û µî·Ï ³¯Â¥
        content - ÀÀ´ä ±Û ³»¿ë

¼Ò½º ¸¸µé±â

    ÀÚ·á½Ç ½ºÅ©¸³Æ®´Â ÃÑ µÎ°³·Î ±¸¼ºµË´Ï´Ù.
    ÀÌ ¹æ¹ýÀº ¾ÕÀÇ ¸ÞÀÎ È­¸é ±¸¼º°ú µÚ¿¡ ¼³¸íÇÒ °æ¸Å °Ô½ÃÆÇ , ¼îÇÎ ¸ô , admin ¿µ¿ª ¶ÇÇÑ ¸¶Âù°¡ÁöÀÔ´Ï´Ù. 
    ±¸¼ºÀº ÀÚ·á½Ç °¢ È­¸éÀ» ±¸¼ºÇÏ´Â ÆÄÀÏ(f.php)°ú ÇÔ¼öµéÀ» ´Ù¾çÇÑ ¹æ¹ýÀ¸·Î Ãâ·ÂÇÏ´Â ÆÄÀÏ(m.php)·Î ÀÌ·ç¾î Áý´Ï´Ù.

f.php Àüü ÄÚµå

    <?php

    /////////////////////////////////////////////
    //
    //    ÀÏÀÚ : 2000.3.27 pm 5
    //   ÀÛ¼ºÀÚ: skycry (hong il)
    //
    //   method : ÀÚ·á½Ç ÇÔ¼ö ¸ðÀ½
    //
    //////////////////////////////////////////////
    ?>


    <?php

    $connect = mysql_connect('localhost' ,'root' ,'gksmf444');
    mysql_select_db('libchal' ,$connect);


    if($findtype == name)
    {
      $ally = mysql_query("select no ,title ,name ,hit ,wdate ,email ,path from $f
      where name like '%$findname%' order by no " ,$connect);
    }


    if($findtype == title)
    {
      $ally = mysql_query("select no ,title ,name ,hit ,wdate ,email ,path from $f
      where title like '%$findname%' order by no " ,$connect);
    }


    if($findtype == content)
    {
      $ally = mysql_query("select no ,title ,name ,hit ,wdate ,email ,path from $f
      where content like '%$findname%' order by no " ,$connect);
    }


    if($findtype == t_c)
    {
      $ally = mysql_query("select no ,title ,name ,hit ,wdate ,email ,path from $f
      where title like '%$findname%' or content like '%$findname%' order by no " ,$connect);
    }


    if(!$findtype)
    {
      $ally = mysql_query("select no ,title ,name ,hit ,wdate ,path ,email from $f
      order by no " ,$connect);//$connection »ý·« ÇßÀ½
    }


    $ally4 = mysql_query("select no ,hit ,passw ,name ,path from $f where no='$no'" ,$connect );


    $ally3 = mysql_query("select name ,email ,tnum ,wdate ,content from $f2 where tnum ='$no'
    order by tnum desc" ,$connect );


    $ally2 = mysql_query("select no ,email ,title ,name ,content ,path ,wdate from $f
    where no='$no'" ,$connect );


    $t_num=mysql_num_rows($ally);
    $putup = mysql_fetch_array($ally4);

    ?>



    <?php

    function main_view($t_num ,$ally ,$page ,$findtype ,$findname ,$f ,$f2 ,$root ,$username)
    { 

      $p_dip = 4 ;
      $p_page =5 ;
      $p_pagex = ceil($p_page / 2) ;
      $t_page = ceil($t_num / $p_dip) ;


      if(!$page)
      {
        $page = 1;
      }


      if( $page <= $p_pagex )
      {
        $p_start = $p_pagex + 1 ;
      }
      else
      {
        $p_start = $page + 1;
      }


      $pt_page = ceil($p_start - $p_pagex) ;
      $next_p = $page + 1 ;
      $pre_p = $page - 1 ;
      $start_num = ($t_num - ($page * $p_dip))+($p_dip-1) ;


      if(!$root)
      {
        $admin = "User " ;
      }
      else
      {
        $admin = "Admin ÀÔ´Ï´Ù.";
      }

          
      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>

      <table border=0 cellspacing=2 cellpadding=2 width=700 >

      <tr>
      <th bgcolor=white colspan=6 align=left>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b>$t_page / $page : $admin</b></font></th>
      </tr>

      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>No</b></font></td>


      <td bgcolor=#808080 width=370>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Title</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Name</b></font></td>


      <td bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Cnt</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>down</b></font></td>


      <td bgcolor=#808080 width=125 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>µî·ÏÀÏ</b></font></td>
      </tr>");


      if(!$t_num)
      {
        echo ("
        <tr>
        <th bgcolor=black colspan=6>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>µî·ÏµÈ ±ÛÀÌ ¾ö½º¿ä...  ^^;</b></font></th>
        </tr>
        </center>
        </table>
        </html>
        ");
      }
      else
      {
        for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
        {

          if($pd >= 0 )
          {
            mysql_data_seek($ally ,$pd);
            $put=mysql_fetch_array($ally);


            echo("
            <tr>
            <td bgcolor=black>
            <font style='font-size:13px;font-style:italic;color:blue'>
            $put[no]</font></td>


            <td bgcolor=black>
            <a href ='m.php?chanl=title&no=$put[no]&f=$f&f2=$f2'>


            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[title]</b></font></a></td>
            <td bgcolor=black align=center>
            <a href = mailto:$put[email] >


            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[name]</b></font></a></td>
            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[hit]</b></font></td>


            <td bgcolor=black align=center>
            <a href ='ftp://192.168.0.3/home/ftp/pub/$put[path]'>
            <font style='font-size:13px;font-style:italic;color:blue'>
            <img src=disksmblk.gif border=0></font></a></td>
            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[wdate]</b></font></td>
            </tr>
            ");
          }
        }


        echo("
        <tr>
        <td bgcolor=black colspan=7>&nbsp;</td>
        </tr>
        <tr>
        <td bgcolor=black colspan=7 align=center>
        ");


        if($page == 1)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'>first </font> ");
        }
        else
        {
          echo ("
          <a href =m.php?chanl=main_view&page=$pre_p&f=$f&f2=$f2>
          <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>");
        }


        for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++)
        {

          if($pp == $page )
          {
            <font style='font-size:13px;font-style:italic;color:red'>
            $pp</font>  ");
          }
          else
          {
            if($pp > 0  && $pp <= $t_page)
            {
              echo("
              <a href =m.php?chanl=main_view&page=$pp&f=$f&f2=$f2>
              font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>");
            }
          }
        }


        if($page == $t_page)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'> last^^ </font>");
        }
        else
        {
          echo ("
          <a href =m.php?chanl=main_view&page=$next_p&f=$f&f2=$f2>
          <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
        }

      }

      echo("
      </td>
      </tr>
      </center>
      </table>
      <br>
      <center>
          

      <table border=0 cellspacing=2 cellpadding=2 width=700 >
          

      <tr>
      <td bgcolor=black width=100>
      <a href =m.php?chanl=new_libchal&f=$f&f2=$f2>
      <img src=write.gif border=0>
      </a></td>
          

      <td bgcolor=black width=100>
      <a href =userin.php?chanl=main_view&username=$username>
      <img src=home.gif border=0>
      </a></td>
      <td bgcolor=black width=100>
      <a href =db_view.php?chanl=rootin&file=file>
      <img src=admin.gif border=0>
      </a></td>
          

      <td bgcolor=black align=right width=150>
      <form method=post action=m.php>
      <input type=hidden name=chanl size=14 value=main_view>
      <input type=hidden name=f value=$f>
      <input type=hidden name=f2 value=$f2>
      <select name=findtype>
      <option value=name selected>Name
      <option value=title>Title
      <option value=content>Content
      <option value=t_c>Titl+Cont
      </select>
      </font></td>


      <td bgcolor=black width=150>
      <input type=text name=findname size=14>
      </td>


      <td bgcolor=black width=100>
      <input type=submit value=Find>

      </td>
      </tr>
      </table>
      </center>
      </html>
      ");
    }



    function edit_libchal($ally2 ,$no ,$f ,$f2)
    {

      $put3=mysql_fetch_array($ally2);


      echo("
      <html>
      <title>
      input_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>


      <form method=post action=m.php>


      <input type=hidden name=chanl value=edit_libchal_in>
      <input type=hidden name=f value=$f>
      <input type=hidden name=f2 value=$f2>
      <input type=hidden name=no value=$no>


      <table border=0 cellspacing=2 cellpadding=2 width=700 >


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Title</b></font></td>
      <td bgcolor=black align=left><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=title size=50 value='$put3[title]'></font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Name</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=name size=10 value='$put3[name]'></font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Passw</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=password name=passw size=10></font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~E-mail</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=email size=20 value='$put3[email]'></font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Content</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <textarea name=content rows=10 cols=70 >$put3[content]</textarea></font></td>
      </tr>


      <tr>
      <td bgcolor=black align=center colspan=4>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=¼öÁ¤Çϱâ>
      </font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }



    function view_title($ally2 ,$ally3 ,$no ,$f ,$f2)
    {

      $put=mysql_fetch_array($ally2);
      $content=nl2br($put[content]) ;
      $size = filesize("/ftp/pub/$put[path]");
      $t_num=mysql_num_rows($ally3);


      echo("
      <html>
      <title>
      view_title html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>


      <table border=0 cellspacing=2 cellpadding=2 width=700 >


      <tr>
      <td bgcolor=white align=center width=120>
      <font style='font-size:13px;font-style:italic;color:#blue'><b>$no No</b></font></td>


      <td bgcolor=white align=center width=580>
      <font style='font-size:13px;font-style:italic;color:#black'>
      <b>$put[title]</b></font></td>
      </tr>
      </table>


      <table border=0 cellspacing=2 cellpadding=2 width=700 >


      <tr>
      <td bgcolor=#808080 align=center width=100>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$put[wdate]</b></font></td>


      <td bgcolor=#808080 align=center width=200><a href = mailto:$put[email] >
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>name:$put[name]</b></font></a></td>


      <td bgcolor=#808080 align=center width=280>
      <a href ='ftp://192.168.0.3/home/ftp/pub/$put[path]'>
      <font style='font-size:13px;font-style:italic;color:red'>
      <b>$put[path]($size Byte)</b></font></a></td>
      </tr>


      <tr>
      <table border=0 cellspacing=2 cellpadding=2 width=700 height=250>
      <td bgcolor=black valign=top colspan=3 width=700 height=250>
      <font style='font-size:13px;font-style:italic;color:blue'><b>$content</b></font></td>
      </tr>


      <tr>
      <td bgcolor=blue width=700>
      </td>
      </tr>
      </table>

          
      <table border=0 cellspacing=2 cellpadding=2 width=700 height=100>
      ");


      for($s=1 ; $s <= $t_num  ; $s++)
      {
        $put2=mysql_fetch_array($ally3);
        $content=nl2br($put2[content]);


        echo("
        <tr>
        <td bgcolor=#808080><a href = mailto:$put2[email] >
        <font style='font-size:13px;font-style:italic;color:black'>
        <b>$put2[name]´ÔÀÌ ¸»Çϱæ^^;</b>
        </font></a></td>


        <td bgcolor=#808080 align=center width=200>
        <font style='font-size:13px;font-style:italic;color:#fffff0'><b>$put2[wdate]</b>
        </font></td>
        </tr>

        <tr>
        <td bgcolor=black width=700 height=100>
        <font style='font-size:13px;font-style:italic;color:#fffff0'><b>$content</b>
        </font></td>
        </tr>
        ");
      }


      echo("
      </table>
      <table border=0 cellspacing=2 cellpadding=2 width=700 height=100>
     
         
      <tr>
      <td bgcolor=black > &nbsp </td>
      </tr>
      <tr>
      <td bgcolor=black width=200>
      <a href =m.php?chanl=input_newlibchal&tnum=$no&f=$f&f2=$f2>
      <img src=write.gif border=0></a></td>
     

      <td bgcolor=black width=><a href =m.php?chanl=main_view&f=$f&f2=$f2>
      <img src=list.gif border=0></a></td>


      <td bgcolor=black ><a href =m.php?chanl=edit_libchal&no=$no&f=$f&f2=$f2>
      <img src=rewrite.gif border=0></a></td>


      <td bgcolor=black ><a href =m.php?chanl=del&no=$no&f=$f&f2=$f2>
      <img src=delete1.gif border=0></a></td>


      </tr>
      </table>
      </center>
      </html>
      ");
    }



    function error_view($title ,$name ,$passw ,$email ,$content ,$f ,$f2)
    {

      if(!$title)
      {
        echo("
        <script>
        window.alert('ÁÖÁ¦°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }


      if(!$name)
      {
        echo("
        <script>
        window.alert('À̸§ÀÌ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }


      if(!$passw)
      {
        echo("
        <script>
        window.alert('passw°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }


      if(!$email)
      {
        echo("
        <script>
        window.alert('¸ÞÀÏ ÁÖ¼Ò°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }


      if(!$content)
      {
        echo("
        <script>
        window.alert('³»¿ëÀÌ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }
    }



    function input_newlibchal($tnum ,$f ,$f2)
    {

      echo("
      <html>
      <title>
      input_newlibchal html
      </title>
      <head>
      </head>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=m.php>
      <input type=hidden name=chanl value=input_newlibchal>
      <input type=hidden name=chanl2 value=input_newlibchal2>
      <input type=hidden name=tnum value=$tnum>
      <input type=hidden name=f value=$f>
      <input type=hidden name=f2 value=$f2>


      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <td bgcolor=#808080 width=100>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Name</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=name size=10></font></td>
      </tr>


      <tr>
      <td bgcolor=#808080 width=100>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~E-mail</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=email size=24></font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Content</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <textarea name=content rows=10 cols=70></textarea></font></td>
      </tr>
      </table>
      <br><br>


      <table border=0 cellspacing=2 cellpadding=2  width=71% >


      <tr>
      <td bgcolor=black align=center colspan=4>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=±Û¿Ã¸®±â>
      <input type=reset  value=Áö¿ì±â></font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }



    function input_view($f ,$f2)
    {
      echo("
      <html>
      <title>
      input_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post enctype=multipart/form-data action=m.php>
      <input type=hidden name=chanl value=input_new>
      <input type=hidden name=f value=$f>
      <input type=hidden name=f2 value=$f2>

 
      <table border=0 cellspacing=2 cellpadding=2 width=700 >


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Title</b></font></td>
      <td bgcolor=black align=left><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=title size=44></font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Name</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=name size=10></font></td>
      </tr>
 

      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Passw</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=password name=passw size=10></font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~E-mail</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=email size=24></font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~up File</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=file name=upfile size=24></font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Content</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <textarea name=content rows=10 cols=70></textarea></font></td>
      </tr>


      <tr>
      <td bgcolor=black align=center colspan=4>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=ÀÚ·áµî·Ï>
      <input type=reset  value=Áö¿ì±â></font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }



    function del($no ,$f ,$f2 ,$root)
    {

      echo("
      <html>
      <title>
      input_newlibchal html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=m.php>
      <input type=hidden name=chanl value=del_no>
      <input type=hidden name=tnum value=$no>
      <input type=hidden name=no value=$no>
      <input type=hidden name=f value=$f>
      <input type=hidden name=f2 value=$f2>


      <table border=0 cellspacing=2 cellpadding=2  width=700 >


      <tr>
      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~passw</b></font></td>


      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=password name=passw size=10></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=Áö¿ì±â>
      </font></td>
      </table>
      </tr>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    ?>

ÀÚ·á½Ç ¼Ò½º ±¸¼º

    ÀÌ ÀÚ·á½ÇÀÇ °¢ È­¸éÀº ÇÔ¼ö Çü½ÄÀ¸·Î ¸¸µç °ÍÀÔ´Ï´Ù.

    ÀÌ ÆÄÀÏ¿¡ »õ·Î¿î ÀÚ·á½Ç È­¸éÀ» Ãß°¡ÇÒ ¼ö ÀÖÀ¸¸ç m.phpÀÇ È­¸é ±¸¼ºÀ» ¹Ù²Ü ¼ö ÀÖ½À´Ï´Ù. 

database Á¢¼Ó°ú °Ë»ö ¸ðµå ¸¸µé±â

    f.php ÆÄÀÏÀÇ Ã³À½¿¡ ÀÌ ºÎºÐÀÌ µé¾î °¡¸ç ÀÚ·á½ÇÀÇ ÀڷḦ °Ë»öÇϱâ À§ÇØ mysqlÀÇ query¸¦ ¸ðµå º°·Î($findtype)

    ³ª´©¾î ³ª¿­Çß½À´Ï´Ù.


    <?php

    $connect = mysql_connect('localhost' ,'root' ,'gksmf444');
    mysql_select_db('libchal' ,$connect);
    /* mysql Á¢¼Ó°ú µ¥ÀÌÅͺ£À̽º¸¦ ¼±ÅÃÇÏ°Ô ÇÕ´Ï´Ù. */

 
    if($findtype == name)
    {
      $ally = mysql_query("select no ,title ,name ,hit ,wdate ,email ,path from $f
      where name like '%$findname%' order by no " ,$connect);
    }
    /* $findtypeÀÌ nameÀÏ °æ¿ì mysql query´Â ÇØ´ç Å×À̺í($f)¿¡¼­ À̸§¿¡ °üÇØ °Ë»öÇÕ´Ï´Ù.
       ¿©±â¼­ $f´Â ÀÚ·á½Ç Å×À̺íÀ» ³ªÅ¸³»´Â º¯¼öÀ̸ç, ¿©·¯ °³ÀÇ ÀÚ·á½ÇÀ» ó¸®Çϱâ À§ÇØ º¯¼ö¸¦ »ç¿ëÇÕ´Ï´Ù.
       ¸¸¾à ƯÁ¤ ÀÚ·á½Ç¸¸ °Ë»öÇÏ·Á¸é ÇØ´ç ÀÚ·á½Ç Å×ÀÌºí ¸íÀ» Àû¾îÁÖ¸é µË´Ï´Ù.
       ÇÏÁö¸¸ ±Ã±ØÀûÀÎ ¸ñÀûÀÌ ¿©·¯ °³ÀÇ ÀÚ·á½Ç »ý¼ºÀÌ°í »ç¿ëÀ̹ǷΠÀÚ·á½Ç Å×À̺íÀº º¯¼ö·Î »ç¿ëÇÕ´Ï´Ù.
       Äõ¸®ÀÇ °Ë»öÀº like¹®À» »ç¿ëÇؼ­ °Ë»öÇÕ´Ï´Ù.
       Like¹®ÀÇ ÀÚ¼¼ÇÑ ³»¿ëÀº mysql ¼³¸í ºÎºÐÀ» Âü°íÇϼ¼¿ä. */


    if($findtype == title)
    {                   
      $ally = mysql_query("select no , title , name , hit , wdate , email , path from $f
      where title like '%$findname%' order by no " ,$connect);
    }
    /* $findtype ÀÌ titleÀÏ ¶§ ÇØ´ç Å×ÀÌºí¿¡¼­ Á¦¸ñÀ» °Ë»öÇÕ´Ï´Ù. */


    if($findtype == content)
    {
      $ally = mysql_query("select no ,title ,name ,hit ,wdate ,email ,path from $f
      where content like '%$findname%' order by no " ,$connect);
    }
    /* $findtypeÀÌ contentÀÏ ¶§ ÇØ´ç Å×ÀÌºí¿¡¼­ ³»¿ëÀ» °Ë»öÇÕ´Ï´Ù. */


    if($findtype == t_c)
    {
      $ally = mysql_query("select no ,title ,name ,hit ,wdate ,email ,path from $f
      where title like '%$findname%' or content like '%$findname%' order by no " ,$connect);
    }
    /* $findtype°¡ t_cÀÏ ¶§ ÇØ´ç Å×ÀÌºí¿¡¼­ Á¦¸ñ°ú ³»¿ëÀ» °Ë»öÇÕ´Ï´Ù. */


    if(!$findtype)
    {
      $ally = mysql_query("select no ,title ,name ,hit ,wdate ,path ,email from $f
      order by no " ,$connect);//$connection »ý·« ÇßÀ½
    }
    /* $findtypeÀÌ ¾øÀ» °æ¿ì ÇØ´ç Å×ÀÌºí¿¡¼­ ¸ðµç ÀڷḦ ¹øÈ£ ¼øÀ¸·Î Á¤·ÄÇÕ´Ï´Ù. */


    $ally4 = mysql_query("select no ,hit ,passw ,name ,path from $f where no='$no'" ,$connect );
    /* ÇØ´ç Å×À̺í ƯÁ¤ ¹øÈ£¿¡($no) ÇØ´çÇÏ´Â ±ÛÀ» °Ë»öÇÕ´Ï´Ù. */


    $ally3 = mysql_query("select name ,email ,tnum ,wdate ,content from $f2
    where tnum ='$no' order by tnum desc" ,$connect );
    /* ÇØ´ç Å×À̺í($f2 - ÀÚ·á½Ç ÀÀ´ä ±Û Å×À̺í) ƯÁ¤ ¹øÈ£¿¡ ÇØ´çÇÏ´Â ÀÀ´ä ±ÛÀ» °Ë»öÇÕ´Ï´Ù.
       ÀÌ°ÍÀº ÇØ´ç ±ÛÀÇ ÀÀä ±ÛÀ» °Ë»öÇÏ´Â °ÍÀÔ´Ï´Ù. */


    $ally2 = mysql_query("select no ,email ,title ,name ,content ,path ,wdate from $f
    where no='$no'" ,$connect );
    /* ÇØ´ç Å×À̺í ƯÁ¤ ¹øÈ£¿¡ ÇØ´çÇÏ´Â ±ÛÀÇ Á¤º¸¸¦ °Ë»öÇÕ´Ï´Ù. */


    $t_num=mysql_num_rows($ally);
    /* ÀÚ·á½Ç ¸ÞÀÎ Å×ÀÌºí¿¡ µî·ÏµÈ ¸ðµç ÀÚ·áÀÇ ¼ö¸¦ ÀúÀåÇÕ´Ï´Ù. */


    $putup = mysql_fetch_array($ally4);
    /* ÀÚ·á½Ç ¸ÞÀÎ Å×ÀÌºí¿¡ µî·ÏµÈ ƯÁ¤ ¹øÈ£ÀÇ ÀÚ·á Á¤º¸¸¦ $putup º¯¼ö¿¡ ¹è¿­·Î ÀúÀåÇÕ´Ï´Ù. */

    ?>

main_view( ) ÇÔ¼ö

    óÀ½ ÀÚ·á½Ç Á¢¼ÓÇßÀ» ¶§ ¸ÞÀÎ È­¸éÀ» Ãâ·ÂÇÏ´Â ÇÔ¼öÀÔ´Ï´Ù. ÀÚ·á½Ç ¸ÞÀÎ È­¸é ±×¸²À» Âü°íÇϼ¼¿ä.

ÇÔ¼ö ÀÎÀÚ

    function main_view($t_num , $ally , $page , $findtype , $findname , $f , $f2 , $root , $username)

    /* ÀÚ·á½Ç ¸ÞÀÎ È­¸éÀ» Ãâ·ÂÇϱâ À§ÇØ Àü´Þ¹Þ´Â ÀÎÀÚµéÀÔ´Ï´Ù.

    $t_num - ÇØ´ç Å×À̺íÀÇ µî·ÏµÈ ÀÚ·áÀÇ ¼ýÀÚ¸¦ Àü´ÞÇÕ´Ï´Ù.
    $ally -  ÇØ´ç Å×À̺íÀÇ µî·ÏµÈ ¸ðµç ÀÚ·áÀÇ Á¤º¸¸¦ Àü´ÞÇÕ´Ï´Ù.
    $page - ÇØ´ç Å×À̺íÀÇ ÆäÀÌÁö¸¦ Àü´ÞÇÕ´Ï´Ù.
    $findtype - ÇØ´ç Å×À̺íÀÇ °Ë»ö ¸ðµå¸¦ Àü´ÞÇÕ´Ï´Ù.
    $findname - ÇØ´ç Å×À̺íÀÇ °Ë»ö ´Ü¾î¸¦ Àü´ÞÇÕ´Ï´Ù.
    $f - ÀÚ·á½Ç Å×À̺íÀÇ ¸ÞÀÎ È­¸é Å×À̺íÀ» Àü´ÞÇÕ´Ï´Ù. ¿©·¯ °Ô½ÃÆÇ »ç¿ëÀ» À§ÇÔÀÔ´Ï´Ù.
    $f2 - ÀÚ·á½Ç Å×À̺íÀÇ ÀÀ´ä ±Û Å×À̺íÀ» Àü´ÞÇÕ´Ï´Ù.
    $root - ÀÚ·á½Ç ¸ÞÀÎ È­¸é¿¡ À¯ÀúÀÇ Á¢¼Ó°ú adminÀÇ Á¢¼ÓÀ» ±¸ºÐÇϱâ À§ÇØ admin Á¢¼Ó À¯¹«¸¦ Àü´ÞÇÕ´Ï´Ù.
    $username - ÇØ´ç »çÀÌÆ®¿¡ ·Î±×ÀÎÇÑ ID ¼¼¼ÇÀ» Àü´ÞÇÕ´Ï´Ù.

ÆäÀÌÁö ¼³Á¤°ú admin Ç¥½Ã ¸¸µé±â

    $p_dip = 4 ;


    /* ÆäÀÌÁö´ç ±Û ¼ö */
    $p_page =5  ;


    /* ÆäÀÌÁö´ç ÆäÀÌÁö ¸µÅ©¼ö */
    $p_pagex = ceil($p_page / 2) ;
    $t_page = ceil($t_num / $p_dip) ;
    /* ceil ÇÔ¼ö¸¦ ÀÌ¿ëÇؼ­ ÃÖ¼ÒÀÇ Á¤¼ö¸¦ ±¸ÇØ ÁÝ´Ï´Ù. */


    if(!$page)
    {
      $page = 1;
    }
    /* Àü´ÞµÈ ÆäÀÌÁö ¹øÈ£°¡ ¾øÀ» °æ¿ì 1 ÆäÀÌÁö·Î ¼³Á¤ÇÕ´Ï´Ù. */


    if( $page <= $p_pagex )
    {
      $p_start = $p_pagex + 1 ;
    }
    else
    {
      $p_start = $page + 1;
    }


    $pt_page = ceil($p_start - $p_pagex) ;
    $next_p = $page + 1 ;
    /* ´ÙÀ½ ÆäÀÌÁö¸¦ ±¸ÇÕ´Ï´Ù. */


    $pre_p = $page - 1 ;
    /* ÀÌÀü ÆäÀÌÁö¸¦ ±¸ÇÕ´Ï´Ù. */


    $start_num = ($t_num - ($page * $p_dip))+($p_dip-1) ;
    /* ÀÚ·á½ÇÀÇ ÇÑ ÆäÀÌÁö¿¡ Ãâ·ÂÇÏ´Â ±ÛÀÇ ½ÃÀÛ ¹øÈ£¸¦ Ãâ·ÂÇÕ´Ï´Ù. */


    if(!$root)
    {
      $admin = "User " ;
    }
    else
    {
      $admin = "Admin ÀÔ´Ï´Ù.";
    }
    /* $root°¡ ÀÖÀ» °æ¿ì $admin º¯¼ö¸¦ ÇÒ´çÇÕ´Ï´Ù. */

µî·ÏµÈ ÀÚ·á°¡ ¾øÀ» °æ¿ì

    ÀÚ·á½Ç¿¡ µî·ÏµÈ ÀÚ·á°¡ ¾ø´Â Ãʱ⿡ º¸¿©ÁÖ´Â È­¸éÀÔ´Ï´Ù. ÀÌ °æ¿ì´Â


    if(!$t_num)
    {
      echo ("
      <tr>
      <th bgcolor=black colspan=6><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>µî·ÏµÈ ±ÛÀÌ ¾ö½º¿ä...  ^^;</b></font></th>
      </tr>
      </center>
      </table>
      </html>
      ");
    }
    /* ÇØ´ç ÀÚ·á½Ç Å×ÀÌºí¿¡ µî·ÏµÈ ÀÚ·á ¼ö°¡($t_num) ¾øÀ» °æ¿ì Ãâ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù. */

µî·ÏµÈ ÀÚ·á ±Û Ãâ·ÂÇϱâ

    $t_numÀÌ ÀÖÀ» ¶§ for¹®À» ÀÌ¿ëÇؼ­ ÇØ´ç ÀÚ·á½Ç Å×À̺íÀÇ ±ÛÀ» ÆäÀÌÁö ±Û ¼ö¸¸Å­ Ãâ·ÂÇÕ´Ï´Ù.

        
    for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
    {
      if($pd >= 0 )
      {
      /* ÆäÀÌÁö´ç ±Û ¼ö¸¸Å­ $pd°¡ 0º¸´Ù Å©°Å³ª °°À» ¶§ ½ÇÇàÇÕ´Ï´Ù. */


        mysql_data_seek($ally ,$pd);
        /* ÇØ´ç ÀÚ·á½Ç Å×À̺íÀÇ ÀÚ·á¿¡¼­ ´ÙÀ½ ÀÚ·á·Î À̵¿½Ãŵ´Ï´Ù. */


        $put=mysql_fetch_array($ally);
        /* ÇØ´ç ÀÚ·á½Ç Å×À̺íÀÇ Á¤º¸¸¦ ¹è¿­·Î ÀúÀåÇÕ´Ï´Ù. */


        echo("
        <tr>
        <td bgcolor=black>
        <font style='font-size:13px;font-style:italic;color:blue'>
        $put[no]</font></td>
        /* ÇØ´ç ÀÚ·áÀÇ ¹øÈ£¸¦ Ãâ·ÂÇÕ´Ï´Ù. */


        <td bgcolor=black>
        <a href ='m.php?chanl=title&no=$put[no]&f=$f&f2=$f2'>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$put[title]</b></font></a></td>
        /* ÇØ´ç ÀÚ·áÀÇ Á¦¸ñÀ» Ãâ·ÂÇÕ´Ï´Ù. */


        <td bgcolor=black align=center>
        <a href = mailto:$put[email] >
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$put[name]</b></font></a></td>
        /* ÇØ´ç ÀÚ·áÀÇ µî·ÏÀÚ À̸§À» Ãâ·ÂÇÕ´Ï´Ù. */


        <td bgcolor=black align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$put[hit]</b></font></td>
        /* ÇØ´ç ÀÚ·áÀÇ Á¶È¸ ¼ö¸¦ Ãâ·ÂÇÕ´Ï´Ù. */


        <td bgcolor=black align=center>
        <a href ='ftp://192.168.0.3/home/ftp/pub/$put[path]'>
        <font style='font-size:13px;font-style:italic;color:blue'>
        <img src=disksmblk.gif border=0></font></a></td>
        /* ÇØ´ç ÀÚ·áÀÇ À§Ä¡¸¦ µð½ºÄÏ À̹ÌÁö·Î ¸µÅ© ½Ãŵ´Ï´Ù. */


        <td bgcolor=black align=center>
        <font style='font-size:13px;font-style:italic;color:red'>
        <b>$put[wdate]</b></font></td>
        /* ÇØ´ç ÀÚ·áÀÇ µî·Ï ³¯Â¥¸¦ Ãâ·ÂÇÕ´Ï´Ù. */
        </tr>
        ");
      }
    }

ÀÌÀü page ¸µÅ© ¸¸µé±â

    if($page == 1)
    {
      echo ("
      <font style='font-size:12px;font-style:italic;color:#fffff0'>first </font> ");
    }
    /* $page°¡ 1ÀÏ °æ¿ì first¿¡ ÇØ´ç ÆäÀÌÁö¸¦ ¸µÅ©ÇÏÁö ¾Ê½À´Ï´Ù. */
        
    else
    {
      echo ("
      <a href =m.php?chanl=main_view&page=$pre_p&f=$f&f2=$f2>
      <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>");
    }
    /* $page°¡ 1ÀÌ ¾Æ´Ò °æ¿ì << ±âÈ£¿¡ $pre_p º¯¼ö¸¦ ¸µÅ©ÇÕ´Ï´Ù. ÀÌ°ÍÀº ÀÌÀü ÆäÀÌÁö·Î À̵¿ °¡´ÉÇÏ°Ô ÇÕ´Ï´Ù. */

ÆäÀÌÁö ¸µÅ© ¸¸µé±â

    ÆäÀÌÁö ¸µÅ©´Â ÀÚ·á½Ç ÇÏ´Ü¿¡ [1][2][3][4]¡¦¸¦ Ç¥ÇöÇϱâ À§ÇÔÀÔ´Ï´Ù. ÀÚ·á½Ç ¸ÞÀÎ È­¸éÀ» Âü°í Çϼ¼¿ä.


    for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++)
    {

      if($pp == $page )
      {
        echo ("
        <font style='font-size:13px;font-style:italic;color:red'>
        $pp</font>  ");
      }
      /* Ãâ·ÂÇÏ´Â ÆäÀÌÁö ¸µÅ©°¡ ÇöÀç ÆäÀÌÁö¿Í °°À» °æ¿ì ¸µÅ©¸¦ ¸¸µéÁö ¾Ê½À´Ï´Ù. */
      else
      {
        if($pp > 0  && $pp <= $t_page)
        {
          echo("
          <a href =m.php?chanl=main_view&page=$pp&f=$f&f2=$f2>
          <font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>");
        }
        /* ¸µÅ© ÆäÀÌÁö´Â 0º¸´Ù Å©°í ±×¸®°í ÃÑ ÆäÀÌÁöº¸´Ù À۰ųª °°À» ¶§ »ý¼ºÇÕ´Ï´Ù. */
      }
    }

´ÙÀ½ ÆäÀÌÁö ¸µÅ©¸¸µé±â

    if($page == $t_page)
    {
      echo ("
      <font style='font-size:12px;font-style:italic;color:#fffff0'> last^^ </font>");
    }
    /* ÇöÀç ÆäÀÌÁö°¡ ÃÑ ÆäÀÌÁö¿Í °°À» °æ¿ì last^^¿¡ ¸µÅ©¸¦ ¸¸µéÁö ¾Ê½À´Ï´Ù. */
    else
    {
      echo ("
      <a href =m.php?chanl=main_view&page=$next_p&f=$f&f2=$f2>
      <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
    }
    /* ÇöÀç ÆäÀÌÁö°¡ ÃÑ ÆäÀÌÁö¿Í °°Áö ¾ÊÀ» °æ¿ì >> ±âÈ£¿¡ ¸µÅ©¸¦ ¸¸µì´Ï´Ù. */

´Ù¸¥ ¸Þ´º ¸µÅ© ¸¸µé±â

    ÀÚ·á½Ç ¸ÞÀÎ È­¸é°ú ³ª¸ÓÁö È­¸éµé¿¡¼­ ´Ù¸¥ È­¸éÀ¸·Î À̵¿ÇÏ´Â ¸µÅ©¸¦ ¸¸µì´Ï´Ù.
    ÀÌ°ÍÀº º¸Åë top È­¸é°ú ÀÚ·áµî·Ï , Áö¿ì±â , °íÄ¡±â µîÀÔ´Ï´Ù.


    echo("
    </td>
    </tr>
    </center>
    </table>
    <br>
    <center>

    <table border=0 cellspacing=2 cellpadding=2 width=700 >


    <tr>
    <td bgcolor=black width=100>
    <a href =m.php?chanl=new_libchal&f=$f&f2=$f2>
    <img src=write.gif border=0>
    </a></td>
    /* ÇØ´ç Å×À̺íÀÇ ÀÚ·á½Ç¿¡ ÀڷḦ µî·ÏÇÏ´Â È­¸éÀ¸·Î ¸µÅ©ÇÕ´Ï´Ù. */


    <td bgcolor=black width=100>
    <a href =userin.php?chanl=main_view&username=$username>
    <img src=home.gif border=0>
    </a></td>
    /* ÇØ´ç ÀÚ·á½Ç Å×ÀÌºí¿¡¼­ »çÀÌÆ® ¸ÞÀÎ È­¸éÀ¸·Î ¸µÅ©ÇÕ´Ï´Ù. */


    <td bgcolor=black width=100>
    <a href =db_view.php?chanl=rootin&file=file>
    <img src=admin.gif border=0>
    </a></td>
    /* ÇØ´ç ÀÚ·á½Ç Å×ÀÌºí¿¡¼­ admin Á¢¼Ó È­¸éÀ¸·Î ¸µÅ©ÇÕ´Ï´Ù. */


    <td bgcolor=black align=right width=150>
    <form method=post action=m.php>
    <input type=hidden name=chanl size=14 value=main_view>
    <input type=hidden name=f value=$f>
    <input type=hidden name=f2 value=$f2>
    <select name=findtype>
    <option value=name selected>Name
    <option value=title>Title
    <option value=content>Content
    <option value=t_c>Titl+Cont
    </select>
    </font></td>
    /* ÇØ´ç ÀÚ·á½Ç Å×ÀÌºí¿¡¼­ À̸§ , Á¦¸ñ , ³»¿ë , Á¦¸ñ°ú ³»¿ëÀ» ¼±ÅÃÇÏ´Â form¹®À» ¸¸µì´Ï´Ù.
       ÀÌ°ÍÀº ÇØ´ç ÀÚ·áÇ Å×ÀÌºí¿¡¼­ À§ ÀÎÀڵ鿡 ´ëÇÑ °Ë»öÀ» Çϱâ À§ÇÔÀÔ´Ï´Ù. */


    <td bgcolor=black width=150>
    <input type=text name=findname size=14>
    /* $findname º¯¼ö¿¡ °Ë»ö ´Ü¾î¸¦ ÀúÀåÇÕ´Ï´Ù. ÀÌ º¯¼ö¸¦ ÀÌ¿ëÇؼ­ ÇØ´ç Å×À̺íÀ» °Ë»öÇÕ´Ï´Ù. */
    </td>


    <td bgcolor=black width=100>
    <input type=submit value=Find>
    /* find ¹öÆ°À» »ý¼ºÇÕ´Ï´Ù. */


    </td>
    </tr>
    </table>
    </center>
    </html>
    ");

edit_libchal( ) ÇÔ¼ö

    ÀÚ·á½ÇÀÇ ±ÛÀ» ¼öÁ¤ÇÏ´Â ÇÔ¼öÀÔ´Ï´Ù. 
    ÀÚ·á½ÇÀÇ ÇØ´ç ÀڷḦ ¼öÁ¤ÇÏ´Â °ÍÀº ¾Æ´Ï°í ÀÚ·á Á¦¸ñ°ú À̸§ µîÀ» ¼öÁ¤ÇÒ ¼ö ÀÖ°Ô ÇÕ´Ï´Ù.

ÇÔ¼ö ÀÎÀÚ

    edit_libchal($ally2 ,$no ,$f ,$f2)

    ÀÚ·á½Ç ±Û ³»¿ë°ú Á¦¸ñ À̸§ µîÀ» ¼öÁ¤ ÇÏ·Á¸é ÇØ´ç ÀÚ·á¿¡ ´ëÇÑ ¹øÈ£¿Í Å×ÀÌºí µ¥ÀÌÅͺ£À̽º Query¸¦
    Àü´Þ¹Þ¾Æ¾ß µË´Ï´Ù. 

   $ally2 - ÇØ´ç ÀÚ·á¿¡ ´ëÇÑ µ¥ÀÌÅͺ£À̽º °Ë»öÀ» Àü´ÞÇÕ´Ï´Ù.
   $no - ÇØ´ç ÀÚ·áÀÇ ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù.
   $f - ÇØ´ç ÀÚ·á½ÇÀÇ ¸ÞÀÎ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù.
   $f2 - ÇØ´ç ÀÚ·á½ÇÀÇ ÀÀ´ä ±Û Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù.

¿øº» ÀÚ·áÀÇ Á¤º¸ ÀúÀå Çϱâ

    $put3=mysql_fetch_array($ally2);

    /* $ally2´Â ¼öÁ¤ÇÒ ÀÚ·á ¹øÈ£¿¡ ´ëÇØ µ¥ÀÌÅͺ£À̽º¿¡¼­ °Ë»öÇÑ ÀÚ·áÀÇ Á¤º¸À̸ç , ÀÌ°ÍÀ» $put3 º¯¼ö¿¡ ¹è¿­·Î ÀúÀåÇÕ´Ï´Ù. */

¼öÁ¤ Ç׸ñ Àü´Þ form¹® ¸¸µé±â

    ¼öÁ¤ÇÒ ÀÚ·á ¸ñ·ÏÀ» ¼öÁ¤ÇÑ ÈÄ ¼öÁ¤µÈ Ç׸ñµéÀ» Àü´ÞÇϱâ À§ÇØ form¹®À» ¸¸µì´Ï´Ù.


    <form method=post action=m.php>
    <input type=hidden name=chanl value=edit_libchal_in>
    /* m.phpÆÄÀÏ¿¡¼­ $chanlÀÌ edit_libchal_in ÀÎ Ç׸ñ¿¡ ¼öÁ¤ »çÇ×À» Àü´ÞÇÕ´Ï´Ù. */


    <input type=hidden name=f value=$f>
    <input type=hidden name=f2 value=$f2>
    <input type=hidden name=no value=$no>
    /* ÇØ´ç ÀÚ·á½Ç Å×À̺í À̸§ µÎ°³¿Í ÀÚ·á ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù. */

ÀԷ¶õ ¸¸µé±â

    ¼±ÅÃÇÑ ÀÚ·áÀÇ Á¤º¸¸¦ ÀÔ·ÂÇÏ´Â ºÎºÐÀ» ¸¸µì´Ï´Ù. ¹°·Ð óÀ½ µî·ÏÇÑ À¯ÀúÀÇ ID¿Í Æнº¿öµå°¡ ÀÏÄ¡ÇØ¾ß ¼öÁ¤ °¡´ÉÇÕ´Ï´Ù.


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Title</b></font></td>
    <td bgcolor=black align=left><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=title size=50 value='$put3[title]'></font></td>
    /* ÇØ´ç ÀÚ·áÀÇ Á¦¸ñÀ» Ãâ·ÂÇÏ°í ¼öÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.
       $put3[title] º¯¼ö¿¡ ¡® ¡¯¸¦ ÇÑ °ÍÀº ÇØ´ç Á¦¸ñ¿¡ °ø¹éÀÌ ÀÖÀ» °æ¿ì °°ÀÌ Ãâ·ÂÇÏ°Ô ÇÏ´Â °ÍÀÔ´Ï´Ù. */
    </tr>


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Name</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=name size=10 value='$put3[name]'></font></td>
    </tr>
    /* ÇØ´ç ÀÚ·áÀÇ µî·ÏÀÚ À̸§À» Ãâ·ÂÇÏ°í ¼öÁ¤ÇÏ°Ô ÇÕ´Ï´Ù. */


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Passw</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=password name=passw size=10></font></td>
    </tr>
    /* ÇØ´ç ÀÚ·áÀÇ µî·ÏÀÚ Æнº¿öµå¸¦ ÀÔ·Â ÇÏ´Â ºÎºÐÀÔ´Ï´Ù. Type´Â password·Î ´Ù¸¥ »ç¶÷ÀÌ º¼ ¼ö ¾ø°Ô ÇÕ´Ï´Ù. */


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~E-mail</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=email size=20 value='$put3[email]'></font></td>
    </tr>
    /* ÇØ´ç ÀÚ·áÀÇ µî·ÏÀÚ ¸ÞÀÏ ÁÖ¼Ò¸¦ Ãâ·ÂÇÏ°í ¼öÁ¤ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù. */


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Content</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <textarea name=content rows=10 cols=70 >$put3[content]</textarea></font></td>
    </tr>
    /* ÇØ´ç ÀÚ·áÀÇ ¼³¸íÀ» Ãâ·ÂÇÏ°í ¼öÁ¤ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù.
       TextareaÀÇ °æ¿ì ÇØ´ç ÀÚ·á Á¤º¸´Â <textarea>¿Í </textarea> »çÀÌ¿¡ ³Ö¾î ÁÝ´Ï´Ù.*/


    <tr>
    <td bgcolor=black align=center colspan=4>
    <font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=submit value=¼öÁ¤Çϱâ>
    </font></td>
    </tr>
    </table>
    </form>
    /* ¼öÁ¤ÇÑ ¸ðµç Ç׸ñÀ» m.php ÆÄÀÏ¿¡ Àü´ÞÇϱâ À§ÇØ ¼öÁ¤Çϱ⠹öÆ°À» »ý¼ºÇÏ°í , form¹®À» Á¾·áÇÕ´Ï´Ù. */

view_title($ally2 ,$ally3 ,$no ,$f ,$f2) ÇÔ¼ö

    ¼±ÅÃÇÑ ÀÚ·áÀÇ Á¤º¸¸¦ »ó¼¼ÇÏ°Ô º¸¿©ÁÖ´Â ÇÔ¼öÀÔ´Ï´Ù.

    Áï , ÀÚ·á½Ç ¸ÞÀÎ È­¸é¿¡¼­ ƯÁ¤ ÀÚ·áÀÇ Á¦¸ñÀ» Ŭ¸¯ÇÏ¸é º¸¿©ÁÖ´Â ºÎºÐÀ̸ç , ÀÚ·á¿¡ ´ëÇÑ ¼³¸í°ú
        
    µî·ÏÀÚ ÀÀ´ä ±Û µîÀ» Ãâ·ÂÇÕ´Ï´Ù.

ÇÔ¼ö Àü´Þ ÀÎÀÚ

    view_title($ally2 , $ally3 , $no , $f , $f2)

    ƯÁ¤ ÀÚ·áÀÇ ¼³¸í°ú µî·ÏÀÚ , ÀÀ´ä ±Û µîÀ» º¼ ¼ö ÀÖ°Ô Çϱâ À§ÇØ ¿©·¯ ÀÎÀÚµéÀ» »ç¿ëÇÕ´Ï´Ù.

    $ally2 - ÇØ´ç Å×ÀÌºí¿¡¼­ ¼±ÅÃÇÑ ÀÚ·á ¹øÈ£¿¡ ´ëÇÑ µ¥ÀÌÅͺ£À̽º °Ë»ö °á°ú¸¦ Àü´ÞÇÕ´Ï´Ù.
    $ally3 - ÀÀ´ä ±Û Å×ÀÌºí¿¡¼­ ¼±ÅÃÇÑ ÀÚ·á ¹øÈ£ÀÇ ÀÀ´ä ±Û Á¤º¸¸¦ Àü´ÞÇÕ´Ï´Ù.
    $no - ¼±ÅÃÇÑ ÀÚ·á ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù.
    $f - ÀÚ·á½Ç ¸ÞÀÎ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù.
    $f2 - ÀÚ·á½Ç ÀÀ´ä ±Û Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù.

¼±ÅÃÇÑ ÀÚ·áÀÇ Á¤º¸ ÀúÀåÇϱâ

    $put=mysql_fetch_array($ally2);
    /* $ally2´Â ¼±ÅÃÇÑ ÀÚ·á¿¡ ´ëÇÑ °Ë»ö °á°ú¸¦ Àü´ÞÇÕ´Ï´Ù. $put º¯¼ö¿¡ ¹è¿­·Î ÀúÀåÇÕ´Ï´Ù.*/


    $content=nl2br($put[content]) ;
    /* nl2br( ) ÇÔ¼ö¸¦ ÀÌ¿ëÇؼ­ ¼±ÅÃÇÑ ÀÚ·áÀÇ ¼³¸í ³»¿ë Áß nl ºÎºÐÀ» <br>·Î º¯È¯ÇÕ´Ï´Ù.
       ÀÌ°ÍÀº HTML·Î ºê¶ó¿ìÀú¿¡ Ãâ·ÂÇϱ⠶§¹®¿¡ óÀ½ ±Û µî·Ï ¶§ enter¸¦ ÀÔ·ÂÇÑ ºÎºÐÀ» ´Ù½Ã
       <br>·Î º¯È¯ÇÏ´Â °ÍÀÔ´Ï´Ù. */


    $size = filesize("/ftp/pub/$put[path]");
    /* filesize( ) ÇÔ¼ö¸¦ ÀÌ¿ëÇؼ­ µî·ÏÇÑ ÀÚ·áÀÇ Å©±â¸¦ byte·Î ±¸ÇÕ´Ï´Ù. */


    $t_num=mysql_num_rows($ally3);
    /* ¼±ÅÃÇÑ ÀÚ·áÀÇ ÀÀ´ä ±ÛÀÇ ¼ö¸¦ $t_num º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */

ÀÚ·á Á¤º¸ Ãâ·ÂÇϱâ

    ¼±ÅÃÇÑ ÀÚ·áÀÇ Á¤º¸¸¦ Ãâ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù. Áï ÇØ´ç ÀÚ·áÀÇ Å©±â , µî·ÏÀÚ , µî·ÏÀÏ , ¹øÈ£ , ÀÚ·á ¼³¸í µîÀÌ ÀÖ½À´Ï´Ù.


    <tr>
    <td bgcolor=white align=center width=120>
    <font style='font-size:13px;font-style:italic;color:#blue'><b>$no No</b></font></td>
    /* ¼±ÅÃÇÑ ÀÚ·áÀÇ ¹øÈ£¸¦ Ãâ·ÂÇÕ´Ï´Ù. */


    <td bgcolor=white align=center width=580>
    <font style='font-size:13px;font-style:italic;color:#black'><b>$put[title]</b></font></td>
    /* ¼±ÅÃÇÑ ÀÚ·áÀÇ Á¦¸ñÀ» Ãâ·ÂÇÕ´Ï´Ù. */


    </tr>
    </table>
    <table border=0 cellspacing=2 cellpadding=2 width=700 >


    <tr>
    <td bgcolor=#808080 align=center width=100>
    <font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>$put[wdate]</b></font></td>
    /* ¼±ÅÃÇÑ ÀÚ·áÀÇ µî·Ï ³¯Â¥¸¦ Ãâ·ÂÇÕ´Ï´Ù. */


    <td bgcolor=#808080 align=center width=200>
    <a href = mailto:$put[email] >
    <font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>name:$put[name]</b></font></a></td>
    /* ¼±ÅÃÇÑ ÀÚ·áÀÇ µî·ÏÀÚ¸¦ Ãâ·ÂÇÏ°í µî·ÏÀÚÀÇ ¸ÞÀÏ ÁÖ¼Ò¸¦ ¸µÅ©ÇÕ´Ï´Ù. */


    <td bgcolor=#808080 align=center width=280>
    <a href ='ftp://192.168.0.3/home/ftp/pub/$put[path]'>
    <font style='font-size:13px;font-style:italic;color:red'>
    <b>$put[path]($size Byte)</b></font></a></td>
    /* ¼±ÅÃÇÑ ÀÚ·áÀÇ ÀÚ·á À̸§À» Ãâ·ÂÇÏ°í ÀÚ·áÀÇ À§Ä¡¸¦ ¸µÅ©ÇÕ´Ï´Ù.
       À§ ¸µÅ©ÀÇ °æ¿ì ·¹µåÇÖ ¸®´ª½ºÀÇ °æ¿ì ftp´Â ÀÚµ¿À¸·Î ¼³Á¤µÇ¾î ÀÖÀ¸¸ç ¸µÅ©¸¦ ftp://¼­¹ö ¸í/pub/$put[path]·Î
       ¼³Á¤ ÇÏ¸é µË´Ï´Ù. ÀÌ°ÍÀº ¸®´ª½ºÀÇ ¼³Á¤¿¡ µû¶ó ´Ù¸¦ °æ¿ì°¡ ÀÖÀ¸¸ç ÀÚ½ÅÀÇ ftp ¼­¹öÀÇ ¼³Á¤À» nobody Á¢¼ÓÀÌ
       °¡´ÉÇϵµ·Ï ÇؾßÇÏ°í ÇØ´ç µð·ºÅ丮ÀÇ ÆÛ¹Ì¼Ç ¶ÇÇÑ nobody À¯Àú°¡ Á¢¼Ó °¡´É Çϵµ·Ï ÇØ¾ß ÇÕ´Ï´Ù.         */
    </tr>


    <tr>
    <table border=0 cellspacing=2 cellpadding=2 width=700 height=250>
    <td bgcolor=black valign=top colspan=3 width=700 height=250>
    <font style='font-size:13px;font-style:italic;color:blue'><b>$content</b></font></td>
    </tr>
    /* ÇØ´ç ÀÚ·áÀÇ ¼³¸íÀ» Ãâ·ÂÇÕ´Ï´Ù. */

ÀÀ´ä ±Û Ãâ·ÂÇϱâ

    ÇØ´ç ÀÚ·á¿¡ ´ëÇÑ ÀÀ´ä ±ÛÀ» Ãâ·ÂÇÏ°Ô ÇÕ´Ï´Ù.
        
    Áï , ¼±ÅÃÇÑ ÀÚ·áÀÇ ¹øÈ£¸¦ ÀÌ¿ëÇؼ­ ±× ÀÚ·á¿¡ ´ëÇÑ ÀÀ´ä ±ÛÀ» °Ë»öÇÏ°í Ãâ·ÂÇÕ´Ï´Ù.



    for($s=1 ; $s <= $t_num  ; $s++)
    {

      $put2=mysql_fetch_array($ally3);
      $content=nl2br($put2[content]);
      /* ¼±ÅÃÇÑ ÀÚ·áÀÇ ÀÀ´ä ±Û Á¤º¸¸¦ $put2 º¯¼ö¿¡ ¹è¿­·Î ÀúÀåÇÕ´Ï´Ù.
         ±×¸®°í nl2br( ) ÇÔ¼ö¸¦ ÀÌ¿ëÇؼ­ ÀÀ´ä ±ÛÀÇ ³»¿ëÀ» ¼öÁ¤ÇÕ´Ï´Ù. */


      echo("
      <tr>
      <td bgcolor=#808080><a href = mailto:$put2[email] >
      <font style='font-size:13px;font-style:italic;color:black'>
      <b>$put2[name]´ÔÀÌ ¸»Çϱæ^^;</b>
      </font></a></td>
      /* ÇØ´ç ÀÚ·áÀÇ ÀÀ´ä ±Û µî·ÏÀÚ¸¦ Ãâ·ÂÇÏ°í ¸ÞÀÏ ÁÖ¼Ò¸¦ ¸µÅ©ÇÕ´Ï´Ù. */


      <td bgcolor=#808080 align=center width=200>
      <font style='font-size:13px;font-style:italic;color:#fffff0'><b>$put2[wdate]</b>
      </font></td>
      </tr>
      /* ÀÀ´ä ±Û µî·Ï ³¯Â¥¸¦ Ãâ·ÂÇÕ´Ï´Ù. */


      <tr>
      <td bgcolor=black width=700 height=100>
      <font style='font-size:13px;font-style:italic;color:#fffff0'><b>$content</b>
      </font></td>
      </tr>
      /* ÀÀ´ä ±Û ³»¿ëÀ» Ãâ·ÂÇÕ´Ï´Ù. */
      ");
    }

error_view($title ,$name ,$passw ,$email ,$content ,$f ,$f2) ÇÔ¼ö

    ÀڷḦ µî·ÏÇßÀ» °æ¿ì µî·Ï Ç׸ñ Áß ºñ¾îÀÖ´Â ºÎºÐÀ» üũÇÏ´Â ºÎºÐÀÔ´Ï´Ù.

¿¡·¯ È­¸é Ãâ·Â Çϱâ

    ÀÚ·á µî·Ï ¶§ °¢ Ç׸ñÀÇ ÀÔ·Â ¿©ºÎ¸¸À» È®ÀÎÇÕ´Ï´Ù.
    °£´ÜÇÑ java ½ºÅ©¸³Æ®¸¦ ÀÌ¿ëÇؼ­ ÇØ´ç Ç׸ñÀÌ ¾øÀ» °æ¿ì ¿¡·¯ ¹Ú½º¸¦ Ãâ·ÂÇÕ´Ï´Ù.


    if(!$title)
    {
      echo("
      <script>
      window.alert('ÁÖÁ¦°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
      history.go(-1)
      </script>
      ");
      exit;
    }
    /* ÀÚ·á Á¦¸ñÀ» ÀÔ·ÂÇÏÁö ¾Ê¾ÒÀ» °æ¿ì Ãâ·ÂÇÏ´Â ºÎºÐÀÌ¸ç ³ª¸ÓÁö Ç׸ñÀÇ ¿¡·¯ Ãâ·Âµµ °°Àº ¹æ¹ýÀ¸·Î ±¸¼º Çß½À´Ï´Ù */

input_newlibchal($tnum , $f , $f2) ÇÔ¼ö

    ÇØ´ç ÀÚ·áÀÇ ÀÀ´ä ±ÛÀ» µî·ÏÇϱâ À§ÇØ ÀÔ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù.

form¹®°ú Àü´Þ ÀÎÀÚ

    ÀÀ´ä ±ÛÀ» ÀÔ·ÂÇÏ°í ÇØ´ç ÀÎÀÚµéÀ» m.phpÆÄÀÏ¿¡ Àü´Þ ÇϱâÀ§ÇØ form¹® ¸¸µì´Ï´Ù.
    ÀÌ ÇÔ¼öÀÇ Àü´Þ ÀÎÀÚ´Â $tnum(ÀÀ´ä ±ÛÀÇ ¹øÈ£) , $f , $f2°¡ ÀÖ½À´Ï´Ù.


    <form method=post action=m.php>
    <input type=hidden name=chanl value=input_newlibchal>
    <input type=hidden name=chanl2 value=input_newlibchal2>
    /* µî·ÏÇÑ ÀÀ´ä ±Û Ç׸ñÀ» m.php ÆÄÀÏÀÇ $chanlÀÌ input_newlibchalÀÌ°í $chanl2°¡
    input_newlibchal2ÀÎ Ç׸ñ¿¡ Àü´ÞÇÏ´Â form¹®À» ¸¸µì´Ï´Ù. */


    <input type=hidden name=tnum value=$tnum>
    <input type=hidden name=f value=$f>
    <input type=hidden name=f2 value=$f2>
    /* ÇØ´ç ÀÚ·á½ÇÀÇ µÎ°³ÀÇ Å×À̺í°ú ÀÀ´ä ±Û ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù. */

ÆÄÀÏ µî·ÏÀ» À§ÇÑ form¹®

    ÆÄÀÏ µî·ÏÀ» À§ÇØ form¹®ÀÇ ¼³Á¤À» enctype=multipart/form-data·Î ÇÕ´Ï´Ù.
    ÇÏÁö¸¸ ÀÌ ¼³Á¤ ÀÌ¿Ü¿¡ PHP.INIÀÇ ÆÄÀÏ ¼³Á¤ ºÎºÐÀ» Á¶±Ý ¼öÁ¤Çؼ­ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
    ÆÄÀÏ µî·Ï ¿ë·®ÀÇ ¼³Á¤ , ÀúÀåÇÒ µð·ºÅ丮 µîÀÇ ¼³Á¤À» ÇÒ ¼ö ÀÖÀ¸¸ç ¿©±â¿¡ »ç¿ëÇÏ´Â ¹æ¹ýÀº µðÆúÆ®
    ¼³Á¤À̸ç form¹®ÀÇ ¼³Á¤¸¸ Çؼ­ »ç¿ëÇÏ¸é µË´Ï´Ù.


    <form method=post enctype=multipart/form-data action=m.php>
    <input type=hidden name=chanl value=input_new>
    <input type=hidden name=f value=$f>
    <input type=hidden name=f2 value=$f2>

ÀԷ¶õ ¸¸µé±â

    ÀÚ·á µî·ÏÀ» À§ÇØ ¿©·¯ ÀÔ·Â »çÇ×°ú ÆÄÀÏÀ» ¼±ÅÃÇÏ´Â ºÎºÐÀ» ¸¸µì´Ï´Ù.


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Title</b></font></td>
    <td bgcolor=black align=left><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=title size=44></font></td>
    </tr>
    /* µî·Ï ÀÚ·áÀÇ Á¦¸ñÀ» ÀÔ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù. */


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Name</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=name size=10></font></td>
    </tr>
    /* µî·Ï ÀÚ·áÀÇ µî·ÏÀÚ À̸§À» ÀÔ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù. */


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Passw</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=password name=passw size=10></font></td>
    </tr>
    /* µî·ÏÀÚ Æнº¿öµå¸¦ ÀÔ·ÂÇÏ´Â ºÎºÐÀ̸ç password typeÀÔ´Ï´Ù. */


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~E-mail</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=email size=24></font></td>
    </tr>
    /* µî·ÏÀÚÀÇ ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù. */


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~up File</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=file name=upfile size=24></font></td>
    </tr>
    /* µî·ÏÇÒ ÆÄÀÏÀ» ã´Â ºÎºÐÀÔ´Ï´Ù. Type=file·Î ¼³Á¤Çϸç ÀÌ°ÍÀº ÀÚ½ÅÀÇ ÄÄÇ»ÅÍ¿¡¼­ µî·ÏÇÒ ÆÄÀÏÀ» ãÀ» ¼ö ÀÖ°Ô ÇÕ´Ï´Ù. */

    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Content</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <textarea name=content rows=10 cols=70></textarea></font></td>
    </tr>
    /* µî·ÏÇÒ ÀÚ·áÀÇ ¼³¸íÀ» ÀÔ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù. */


    <tr>
    <td bgcolor=black align=center colspan=4>
    <font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=submit value=ÀÚ·áµî·Ï>
    <input type=reset  value=Áö¿ì±â></font></td>
    </tr>
    /* ÀÚ·á µî·ÏÀ» À§ÇØ ÀÔ·ÂÇÑ »çÇ×°ú ÆÄÀÏÀ» m.php¿¡ º¸³»±â À§ÇØ "ÀÚ·áµî·Ï" ¹öÆ°À» ¸¸µì´Ï´Ù.
       ±×¸®°í ¸ðµç Ç׸ñÀ» ´Ù½Ã ÀÔ·ÂÇϱâ À§ÇØ "Áö¿ì±â" ¹öÆ°À» ¸¸µì´Ï´Ù. */

del($no ,$f ,$f2 ,$root) ÇÔ¼ö

    µî·ÏÇÑ ÀڷḦ Áö¿ì´Â ÇÔ¼öÀÔ´Ï´Ù. Àü´Þ ÀÎÀÚ´Â $no(ÇØ´ç ÀÚ·á ¹øÈ£) , $f , $f2 , $root(admin) ÀÔ´Ï´Ù.
    ¿©±â¼­ $root º¯¼ö¸¦ Àü´ÞÇÏ´Â °ÍÀº ÇØ´ç ÀڷḦ adminÀÌ µî·ÏÀÚ Æнº¿öµå ¾øÀÌ Áö¿ì°Ô ÇÏ´Â ¿ªÇÒÀ» ÇÕ´Ï´Ù.

form¹® ¸¸µé±â

    ÇØ´ç ÀڷḦ »èÁ¦Çϱâ À§ÇØ form¹®À¸·Î ÀÚ·á Á¤º¸¸¦ Àü´ÞÇÕ´Ï´Ù.


    <form method=post action=m.php>
    <input type=hidden name=chanl value=del_no>
    /* m.php ÆÄÀÏÀÇ $chanl=del_noÀÎ Ç׸ñÀ¸·Î ÇØ´ç ÀÚ·áÀÇ Á¤º¸¸¦ Àü´ÞÇÕ´Ï´Ù. */
 

    <input type=hidden name=tnum value=$no>
    <input type=hidden name=no value=$no>
    <input type=hidden name=f value=$f>
    <input type=hidden name=f2 value=$f2>
    /* ÇØ´ç ÀÚ·áÀÇ ¹øÈ£($tnum)¿Í ÀÀ´ä ±Û ¹øÈ£($no) , ÀÚ·á½Ç µÎ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù.*/

Æнº¿öµå ÀԷ¶õ ¸¸µé±â

    µî·ÏÀÚÀÇ Æнº¿öµå ÀԷ¶õÀ» ¸¸µì´Ï´Ù.


    <tr>
    <td bgcolor=#808080 width=74><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~passw</b></font></td>
    <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=password name=passw size=10></font></td>
    /* ÇØ´ç ÀÚ·á µî·ÏÀÚÀÇ Æнº¿öµå¸¦ ÀÔ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù. */


    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=submit value=Áö¿ì±â>
    </font></td>
    /* ÀÔ·ÂÇÑ Æнº¿öµå¸¦ Àü´ÞÇϱâ À§ÇØ "Áö¿ì±â" ¹öÆ°À» »ý¼ºÇÕ´Ï´Ù. */

13.2 m.php Àüü ÄÚµå

f.phpÀÇ ÇÔ¼öµéÀ» ºê¶ó¿ìÀú¿¡ Ãâ·ÂÇϱâ À§ÇÑ ½ºÅ©¸³Æ®·Î ±¸¼ºµÇ¾î ÀÖ½À´Ï´Ù.

    <?php
    session_start();
    //////////////////////////////////////////////////
    //
    //    ÀÏÀÚ : 2000.3.27 pm 5
    //   ÀÛ¼ºÀÚ: skycry (hong il)
    //
    //
    //   method : ÀÚ·á½Ç ¸ÞÀÎ È­¸éµé..^^;
    //
    //////////////////////////////////////////////////
    ?>


    <?php

    if($username)
    {

      include('f.php');


      if($chanl == new_libchal && $username != guest)
      {
        input_view($f ,$f2) ;
        mysql_close($connect);
      }


      if($chanl == new_libchal && $username == guest)
      {
        echo("
        <script>
        window.alert('guest´Â ÀÌ¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.')
        history.go(-1)
        </script>
        ");
        exit;
      }


      if($chanl == input_new)
      {
        error_view($title ,$name ,$passw ,$email ,$content ,$f ,$f2);
        $max = mysql_query("select max(no) from $f " ,$connect );
        $new_no = mysql_result($max ,0 ,0);
        $no = $new_no + "1" ;
        $wdate = date("y-m-d");
        $gg=explode("." ,"$upfile_name");
        $tt=$gg[sizeof($gg)-1];
        $path= "/home/ftp/pub/$upfile_name";
     

        if($tt == "php" || $tt == "php3" || $tt == "php4" || $tt == "html" 
                                  || $tt == "htm" || $tt == "inc" || $tt == "txt" )
        {
          echo("
          <script>
          window.alert('ÀÌ È­ÀÏÀº µî·Ï ÇÒ ¼ö ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
          </script>
          ");
          exit;
        }


        if(file_exists("$path"))
        {
          echo("
          <script>
          window.alert('°° À̸§ÀÇ È­ÀÏÀÌ Á¸ÀçÇÕ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
          </script>
          ");
          exit;
        }
        else
        {
          copy("$upfile" ,"$path");
          mysql_query("insert into $f(title ,name ,passw ,path ,email ,content ,wdate ,no)
          values('$title' ,'$name' ,password('$passw') ,'$upfile_name' ,'$email' ,'$content' ,
          '$wdate' ,'$no')" ,$connect);


          echo("
          <html>
          <body>
          <center>
          <form method=post action=m.php>
          <font style='font-size:13px;font-style:italic;color:#808080'>
          <b>±ÛÀÌ µî·Ï µÇ¾ú½À´Ï´Ù</b></font>
          <input type=hidden name=chanl value=main_view>
          <input type=hidden name=f value=$f>
          <input type=hidden name=f2 value=$f2>
          <input type=submit value=È®ÀÎ>
          </form>
          </center>
          </body>
          </html>
          ");

          unlink($upfile);
          mysql_close($connect);
        }
      }


      if($chanl == input_newlibchal)
      {
        if($chanl2 == input_newlibchal2)
        {
          $wdate = date("y-m-d");
          mysql_query("insert into $f2(name ,email ,tnum ,wdate ,content)
          values('$name' ,'$email' ,'$tnum' ,'$wdate' ,'$content')" ,$connect);


          echo("
          <html>
          <body>
          <center>
          <form method=post action=m.php>
          <font style='font-size:13px;font-style:italic;color:#808080'>
          <b>±ÛÀÌ µî·Ï µÇ¾ú½À´Ï´Ù</b></font>
          <input type=hidden name=chanl value=main_view>
          <input type=hidden name=f value=$f>
          <input type=hidden name=f2 value=$f2>
          <input type=submit value=È®ÀÎ>
          </form>
          </center>
          </body>
          </html>
          ");
        }
        else
        {
          input_newlibchal($tnum ,$f ,$f2) ;
        }


        mysql_close($connect);
      }


      if($chanl == edit_libchal)
      {
        edit_libchal($ally2 ,$no ,$f ,$f2) ;
        mysql_close($connect);
      }


      if($chanl == edit_libchal_in)
      {
        error_view($title ,$name ,$passw ,$email ,$content ,$f ,$f2);
        $input=mysql_query("select password('$passw') " ,$connect );
        $inputpassw = mysql_result($input ,0 ,0);


        if($putup[passw] == $inputpassw)
        {
          mysql_query("update $f set title='$title' , name='$name' ,passw=password('$passw') , email='$email', 
          content='$content' where no = '$no'" ,$connect);
 
          mysql_close;
        }
        else
        {
          echo("
          <script>
          window.alert('passw°¡ Ʋ·È½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
          </script>
          ");
          exit;
        }


        echo("
        <html>
        <body>
        <center>
        <form method=post action=m.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>±ÛÀÌ ¼öÁ¤ µÇ¾ú½À´Ï´Ù</b></font>
        <input type=hidden name=no value=$no>
        <input type=hidden name=chanl value=main_view>
        <input type=hidden name=f value=$f>
        <input type=hidden name=f2 value=$f2>
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");
 
        mysql_close($connect);
      }


      if($chanl == title)
      {
        mysql_query("update $f set hit = '$putup[hit]'+1 where no = '$no'" ,$connect) ;
        view_title($ally2 ,$ally3 ,$no ,$f ,$f2) ;
        mysql_close($connect);
      }


      if($chanl == main_view)
      {
        mysql_select_db('adminp' ,$connect);
        mysql_query("update file set sum='$t_num' where mview = '$f'" ,$connect);
        main_view($t_num ,$ally ,$page ,$findtype ,$findname ,$f ,$f2 ,$root ,$username);
        mysql_close($connect);
      }


      if($chanl == del)
      { 
        del($no ,$f ,$f2 ,$root);
        mysql_close($connect);
      }


      if($chanl == del_no)
      {
        $input=mysql_query("select password('$passw') " ,$connect );
        $inputpassw = mysql_result($input ,0 ,0);


        if($putup[passw] == $inputpassw || $root )
        {
          unlink("/home/ftp/pub/$putup[path]");
          $mldel = "delete from $f where no=$no";
          $rsult = mysql_query($mldel ,$connect);
          $ml2del = "delete from $f2 where tnum=$tnum ";
          $rsult2 = mysql_query($ml2del ,$connect);
        }
        else
        {
          echo("
          <script>
          window.alert('passw°¡ Ʋ·È½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
          </script>
          ");
          exit;
        }


        echo("
        <html>
        <body>
        <center>
        <form method=post action=m.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>±ÛÀÌ »èÁ¦ µÇ¾ú½À´Ï´Ù</b></font>
        <input type=hidden name=no value=$no>
        <input type=hidden name=chanl value=main_view>
        <input type=hidden name=f value=$f>
        <input type=hidden name=f2 value=$f2>
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");

        mysql_close($connect);
      }
    }
    else
    {
      echo("
      <script>
      window.alert('Login Çϼ¼¿ä.')
      history.go(-1)
      </script>
      ");
      exit;
    }

    ?>

¼Ò½º ¼³¸í

    m.php´Â f.php ÆÄÀÏÀÇ ÇÔ¼ö¸¦ È­¸é¿¡ ´Ù¾çÇÑ ¹æ¹ýÀ¸·Î Ãâ·ÂÇÏ°Ô ÇÕ´Ï´Ù.
    ±× ¹Û¿¡ Àü´Þ ¹ÞÀº ÀÎÀÚ¿Í ÀڷḦ µ¥ÀÌÅͺ£À̽º¿¡ ÀÔ·ÂÇÏ°í »èÁ¦ÇÏ´Â ±â´ÉÀ» ÇÕ´Ï´Ù.

¼¼¼Ç Ç׸ñ

    ÀÚ·á½ÇÀÇ °¢ È­¸éÀ» Ãâ·ÂÇÏ´Â ÇÔ¼öÀÇ ½ÇÇàÀº µî·ÏµÈ IDÀÇ ·Î±×ÀÎ ¿©ºÎ¿¡ µû¶ó ±ÇÇÑÀ» ´Þ¸®ÇÕ´Ï´Ù.


    session_start();
    /* ¼¼¼ÇÀ» ½ÃÀÛÇÕ´Ï´Ù. */


    if($username)
    {
    /* ·Î±×ÀÎ ÇÑ ¼¼¼ÇÀ» °¡Áø ID°¡ ÀÖÀ» °æ¿ìÀÔ´Ï´Ù. */

      include('f.php');
      /* f.php ÆÄÀÏÀÇ ÇÔ¼ö¸¦ Æ÷ÇÔÇÕ´Ï´Ù. ±×¸®°í if($username){   ¿Í   }else »çÀÌ¿¡ °¢ È­¸éÀÇ ÇÔ¼ö Ãâ·Â ºÎºÐÀ» µÓ´Ï´Ù.
         ÀÌ°ÍÀº ¼¼¼ÇÀ¸·Î ·Î±×ÀÎÇßÀ» °æ¿ì¸¸ È­¸éÀ» º¸¿©ÁÖ±â À§ÇÔÀ̸ç if¹® ¾È¿¡ º¸´Ù ¼¼ºÎÀûÀ¸·Î ¼³Á¤ÇÒ ¼ö ÀÖ½À´Ï´Ù. */
    }
    else
    {
      echo("
      <script>
      window.alert('Login Çϼ¼¿ä.')
      history.go(-1)
      </script>
      ");
      exit;
    }
    /* µî·ÏµÈ ID·Î ·Î±×ÀÎÇÏÁö ¾Ê¾ÒÀ» °æ¿ì Ãâ·ÂÇÏ´Â È­¸éÀÔ´Ï´Ù. */

ÀÚ·á µî·Ï ¸ðµå

    if($chanl == new_libchal && $username != guest)
    {
      input_view($f ,$f2) ;
      mysql_close($connect);
    }
    /* $chanl = new_libchalÀÌ°í ·Î±×ÀÎÇÑ ¼¼¼ÇÀÌ guest°¡ ¾Æ´Ò °æ¿ì ÀÚ·á µî·Ï È­¸éÀ» Ãâ·ÂÇÕ´Ï´Ù. */


    if($chanl == new_libchal && $username == guest)
    {
      echo("
      <script>
      window.alert('guest´Â ÀÌ¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.')
      history.go(-1)
      </script>
      ");
      exit;
    }
    /* ¸¸¾à ·Î±×ÀÎÇÑ ¼¼¼ÇÀÌ guestÀÏ °æ¿ì ÇØ´ç ¸Þ½ÃÁö ¹Ú½º¸¦ Ãâ·ÂÇÕ´Ï´Ù. */

ÀڷḦ ¼­¹ö¿Í µ¥ÀÌÅͺ£À̽º¿¡ ÀúÀåÇϱâ

    ÀÚ·á µî·Ï È­¸é¿¡¼­ ÀÚ·á¿¡ ´ëÇÑ Á¤º¸¸¦ ¼­¹ö¿Í µ¥ÀÌÅͺ£À̽º¿¡ ÀúÀåÇÏ´Â Ç׸ñÀ» ¸¸µì´Ï´Ù.


    if($chanl == input_new)
    {
    /* $chanl=input_newÀÏ ¶§ ½ÇÇàÇÕ´Ï´Ù. */


      error_view($title , $name , $passw , $email , $content , $f , $f2);
      /* Àü´Þ µÇ¾î¿Â ÀÚ·á Á¤º¸ÀÇ ÀÔ·Â ¿©ºÎ¸¦ üũÇÕ´Ï´Ù. */


      $max = mysql_query("select max(no) from $f " ,$connect );
      /* ÇØ´ç Å×À̺íÀÇ ÀÚ·á Áß °¡Àå ³ôÀº ¹øÈ£¸¦ °Ë»öÇÕ´Ï´Ù. */


      $new_no = mysql_result($max ,0 ,0);
      /* °¡Àå ³ôÀº ¹øÈ£¸¦ $new_no º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */
 

      $no = $new_no + "1" ;
      /* »õ·Ó°Ô µî·ÏµÇ´Â ÀÚ·áÀÇ ¹øÈ£¸¦ ºÎ¿©ÇÕ´Ï´Ù. */


      $wdate = date("y-m-d");
      $gg=explode("." ,"$upfile_name");
      /* Àü´Þ µÇ¾î¿Â ÆÄÀÏÀ» explode( ) ÇÔ¼ö¸¦ ÀÌ¿ëÇؼ­ ÆÄÀÏ À̸§°ú È®ÀåÀÚ¸¦ ±¸ºÐÇÕ´Ï´Ù. */


      $tt=$gg[sizeof($gg)-1];
      /* Àü´Þ µÇ¾î¿Â ÆÄÀÏÀÇ È®ÀåÀÚ¸¦ $tt º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */


      $path= "/home/ftp/pub/$upfile_name";
      /* Àü´Þ µÇ¾î¿Â ÆÄÀÏ À̸§À» path¿Í ÇÔ²² $path¿¡ ÀúÀåÇÕ´Ï´Ù. À§´Â ·¹µåÇÖ ¸®´ª½ºÀÇ °æ¿ì ÀÔ´Ï´Ù.
         ¸ðµç ftp ¼³Á¤ÀÌ µðÆúÆ®ÀÏ °æ¿ìÀ̸ç ÇØ´ç µð·ºÅ丮´Â nobody°¡ Á¢±Ù °¡´ÉÇÑ »óÅ ÀÔ´Ï´Ù. */


      if($tt == "php" || $tt == "php3" || $tt == "php4" || $tt == "html" 
                                || $tt == "htm" || $tt == "inc" || $tt == "txt" )
      {
        echo("
        <script>
        window.alert('ÀÌ ÆÄÀÏÀº µî·ÏÇÒ ¼ö ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }
      /* ¾÷·Îµå µÇ´Â ÆÄÀÏÀÇ È®ÀåÀÚ¸¦ ±¸ºÐÇؼ­ µî·ÏÇÒ ¼ö ¾ø´Â ÆÄÀÏÀ» °¡·Á ³À´Ï´Ù.
         ¸¸¾à À§ Á¶°Ç¿¡ ÇØ´çÇÒ °æ¿ì ¿¡·¯ ¹Ú½º È­¸éÀ» Ãâ·ÂÇÕ´Ï´Ù. */


      if(file_exists("$path"))
      {
        echo("
        <script>
        window.alert('°°Àº À̸§ÀÇ È­ÀÏÀÌ Á¸ÀçÇÕ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }
      /* µî·Ï µÇ´Â ÆÄÀÏ°ú ¶È °°Àº À̸§ÀÇ ÆÄÀÏÀÌ Á¸ÀçÇÏ´ÂÁö ¾Ë¾Æº¸°í ÀÖÀ» °æ¿ì ¿¡·¯ È­¸éÀ» Ãâ·ÂÇÕ´Ï´Ù. */
      else
      {
        copy("$upfile" ,"$path");
        /* ¾÷·Îµå µÇ´Â ÆÄÀÏÀ» PHP.INIÀÇ ÆÄÀÏ ¼³Á¤¿¡¼­ Á¤ÇÑ µð·ºÅ丮¿¡¼­ $path º¯¼ö°¡ °¡¸®Å°´Â µð·ºÅ丮·Î copyÇÕ´Ï´Ù.
           ¿©±â¼­´Â PHP.INI ¼³Á¤À» µðÆúÆ®·Î ÇßÀ¸¸ç /tmp µð·ºÅ丮·Î óÀ½ ÆÄÀÏÀ» ¾÷·ÎµåÇÕ´Ï´Ù. */


        mysql_query("insert into $f(title ,name ,passw ,path ,email ,content ,wdate ,no)
        values('$title' ,'$name' ,password('$passw') ,'$upfile_name' ,'$email' ,'$content' ,
        '$wdate' ,'$no')" ,$connect);
        /* ÀÚ·á½Ç ¸ÞÀÎ Å×ÀÌºí¿¡ µî·ÏÇÏ´Â ÀÚ·áÀÇ Á¤º¸¸¦ ÀúÀåÇÕ´Ï´Ù. PasswordÀÇ °æ¿ì mysql ¾Ïȣȭ ¹æ½ÄÀ» ÅëÇØ ÀúÀåÇÕ´Ï´Ù. */


        echo("
        <html>
        <body>
        <center>
        <form method=post action=m.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>±ÛÀÌ µî·ÏµÇ¾ú½À´Ï´Ù</b></font>
        <input type=hidden name=chanl value=main_view>
        <input type=hidden name=f value=$f>
        <input type=hidden name=f2 value=$f2>
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");


        unlink($upfile);
        /* ±ÛÀÇ µî·Ï ¿©ºÎ¸¦ Ãâ·ÂÇÏ°í , µðÆúÆ®·Î ¾÷·ÎµåµÈ(/tmp) ÆÄÀÏÀ» »èÁ¦ÇÕ´Ï´Ù. */
        mysql_close($connect);
      }
        }

ÀÀ´ä ±Û ÀÔ·Â È­¸é°ú µ¥ÀÌÅͺ£À̽º ÀúÀå ¸¸µé±â

    ¼±ÅÃÇÑ ÀÚ·áÀÇ ÀÀ´ä ±ÛÀ» ÀÔ·ÂÇÏ´Â ºÎºÐ°ú ÀÔ·ÂµÈ ÀÀ´ä ±ÛÀÇ Ç׸ñµéÀ» µ¥ÀÌÅͺ£À̽º¿¡ ÀúÀåÇÏ´Â ºÎºÐÀ» ¸¸µì´Ï´Ù.


    if($chanl == input_newlibchal)
    {
    /* $chanl=input_newlibchal ÀÏ ¶§ ÀÀ´ä ±ÛÀ» ÀÔ·ÂÇÏ´Â È­¸éÀ» Ãâ·ÂÇÕ´Ï´Ù. */


      if($chanl2 == input_newlibchal2)
      {
      /* $chanl=input_newlibchal , $chanl2 == input_newlibchal2 ÀÏ ¶§ ÀÔ·ÂÇÑ ÀÀ´ä ±ÛÀÇ ³»¿ëÀ» µ¥ÀÌÅͺ£À̽º¿¡ ÀúåÇÕ´Ï´Ù. */

        $wdate = date("y-m-d");
        mysql_query("insert into $f2(name ,email ,tnum ,wdate ,content)
        values('$name' ,'$email' ,'$tnum' ,'$wdate' ,'$content')" ,$connect);
        /* Àü´Þ µÇ¾î¿Â ÀÀ´ä ±ÛÀÇ ³»¿ëÀ» ÀÀ´ä ±Û Å×ÀÌºí¿¡ ÀúÀåÇÕ´Ï´Ù. */


        echo("
        <html>
        <body>
        <center>
        <form method=post action=m.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>±ÛÀÌ µî·Ï µÇ¾ú½À´Ï´Ù</b></font>
        <input type=hidden name=chanl value=main_view>
        <input type=hidden name=f value=$f>
        <input type=hidden name=f2 value=$f2>
        <input type=submit value=È®ÀÎ>
        /* ÀÀ´ä ±Û ÀúÀåÀ» ÇÑ ÈÄ È®ÀÎ È­¸éÀ» Ãâ·ÂÇÏ°í , ÀÚ·á½Ç ¸ÞÀÎ È­¸éÀ¸·Î À̵¿ÇÏ´Â ¹öÆ°À» »ý¼ºÇÕ´Ï´Ù. */


        </form>
        </center>
        </body>
        </html>
        ");
      }
      else
      {
        input_newlibchal($tnum ,$f ,$f2) ;
      }
      /* ÀÀ´ä ±Û ÀÔ·Â È­¸éÀ» Ãâ·ÂÇÕ´Ï´Ù. */

      mysql_close($connect);
    }

ƯÁ¤ ÀÚ·á Á¤º¸ º¸¿© ÁÖ±â

    ÀÚ·á½Ç ¸ÞÀÎ È­¸é¿¡¼­ ƯÁ¤ ÀÚ·áÀÇ Á¦¸ñÀ» Ŭ¸¯ÇÒ °æ¿ì Ãâ·ÂÇÏ´Â È­¸éÀÔ´Ï´Ù.


    if($chanl == title)
    {
      mysql_query("update $f set hit = '$putup[hit]'+1 where no = '$no'" ,$connect) ;
      /* $chanl= title ÀÏ ¶§ ÇØ´ç ÀÚ·áÀÇ Á¶È¸¼ö¸¦ 1 ´õÇؼ­ ÀúÀåÇÕ´Ï´Ù. */


      view_title($ally2 ,$ally3 ,$no ,$f ,$f2) ;
      /* $chanl= title ÀÏ ¶§ ƯÁ¤ ÀÚ·áÀÇ ³»¿ëÀ» º¸¿© ÁÝ´Ï´Ù. */
      mysql_close($connect);
    }

ÀÚ·áÀÇ »èÁ¦

    ƯÁ¤ ÀڷḦ »èÁ¦Çϱâ À§ÇÑ µî·ÏÀÚ Æнº¿öµå ÀÔ·Â È­¸é°ú Æнº¿öµå¸¦ ÀÌ¿ëÇÑ ÇØ´ç ÀÚ·áÀÇ »èÁ¦ ·çƾÀ» ¸¸µì´Ï´Ù.


    if($chanl == del)
    {
      del($no ,$f ,$f2 ,$root);
      mysql_close($connect);
    }
    /* $chanl=del ÀÏ ¶§ ÇØ´ç ÀڷḦ »èÁ¦Çϱâ À§ÇÑ µî·ÏÀÚ Æнº¿öµå ÀÔ·Â È­¸éÀ» Ãâ·ÂÇÕ´Ï´Ù. */


    if($chanl == del_no)
    {
      $input=mysql_query("select password('$passw') " ,$connect );
      $inputpassw = mysql_result($input ,0 ,0);
      /* $chanl == del_noÀÏ ¶§ Àü´Þ µÇ¾î¿Â Æнº¿öµå¸¦ password( )ÇÔ¼ö¸¦ ÀÌ¿ëÇؼ­ ¾ÏȣȭÇÕ´Ï´Ù. */


      if($putup[passw] == $inputpassw || $root )
      {
        unlink("/home/ftp/pub/$putup[path]");
        /* Àü´Þ µÇ¾î¿Â Æнº¿öµå¿Í µ¥ÀÌÅͺ£À̽ºÀÇ Æнº¿öµå°¡ ÀÏÄ¡ÇÒ °æ¿ì ÇØ´ç ÆÄÀÏÀ» »èÁ¦ÇÕ´Ï´Ù. */
        $mldel = "delete from $f where no=$no";
        $rsult = mysql_query($mldel ,$connect);
        /* ÀÚ·á½Ç ¸ÞÀÎ Å×ÀÌºí¿¡¼­ ÇØ´ç ÀÚ·áÀÇ Á¤º¸¸¦ ¸ðµÎ »èÁ¦ÇÕ´Ï´Ù. */


        $ml2del = "delete from $f2 where tnum=$tnum ";
        $rsult2 = mysql_query($ml2del ,$connect);
        /* ÀÚ·á½Ç ÀÀ´ä ±Û Å×ÀÌºí¿¡¼­ ÇØ´ç ÀÚ·áÀÇ ÀÀ´ä ±ÛÀÇ Á¤º¸¸¦ ¸ðµÎ »èÁ¦ÇÕ´Ï´Ù. */
      }
      else
      {
        echo("
        <script>
        window.alert('passw°¡ Ʋ·È½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }


      echo("
      <html>
      <body>
      <center>
      <form method=post action=m.php>
      <font style='font-size:13px;font-style:italic;color:#808080'>
      <b>±ÛÀÌ »èÁ¦ µÇ¾ú½À´Ï´Ù</b></font>
      <input type=hidden name=no value=$no>
      <input type=hidden name=chanl value=main_view>
      <input type=hidden name=f value=$f>
      <input type=hidden name=f2 value=$f2>
      <input type=submit value=È®ÀÎ>
      </form>
      </center>
      </body>
      </html>
      ");
      /* ÇØ´ç ÀÚ·áÀÇ ¸ðµç Á¤º¸¸¦ »èÁ¦ÇÑ ÈÄ È®ÀÎ ¹öÆ°À» »ý¼ºÇÏ°í ÀÚ·á½Ç ¸ÞÀÎ È­¸éÀ¸·Î À̵¿ÇÏ°Ô ÇÕ´Ï´Ù. */

      mysql_close($connect);
    }



    ´ÙÀ½ Àå¿¡¼­´Â °æ¸Å °Ô½ÃÆÇÀ» ¼³¸íÇÏ°Ú½À´Ï´Ù.

  
    Âü°í. À§ ÀÚ·á½ÇÀº Áö±Ý ¾²´Â ¹æ½ÄÀÌ ¾Æ´Õ´Ï´Ù¡¦ Áß¿äÇÑ°Ç À§ ¹æ¹ýÀ» ÀÌ¿ëÇؼ­ ¿©·¯ °Ô½ÃÆÇÀ» µ¶Ã¢ÀûÀ¸·Î
          ¸¸µé¾î º¼ ¼ö ÀÖ½À´Ï´Ù.   ÀÀ´äÇüµµ ¸»ÀÌÁ®¡¦ ¿äÁòÀÇ ftp ÀÚ·á½ÇÀº ±Û°Ô½ÃÆÇ°ú ¿¬µ¿Çؼ­ ¸¹ÀÌµé ¸¸µé¸ç
          ¹æ¹ýÀº Çì´õ¸¦ ÀÌ¿ëÇؼ­ ÆÄÀÏÀ» Àü¼Û ÇÕ´Ï´Ù.   ÀÚ¼¼ÇÑ »çÇ×Àº ¸îÁÙ ¾ÊµË´Ï´Ù. 
          ÇÏÁö¸¸ Àú°¡ Áö±Ý »ý°¢ÀÌ ³ªÁú ¾Ê´Â±º¿ä.   ÇãÁ¢ ÇÏÁö¸¸ ¸¸µé¾îµÐ°Ô ÀÖ¾î µÚÁö¸é ³ª¿Ã µí Çѵ¥ ±Ã±ÝÇϽÅ
          ºÐÀº ¸ÞÀÏ ÁÖ¼¼¿ä¡¦   ±×¸®°í °æ¸ÅÀÇ °æ¿ì ½Ç½Ã°£ÀÌ ¾Æ´Õ´Ï´Ù. 
          ´ÜÁö 󸮵Ǵ ºÎºÐ¸¸À» ±¸Çö Çß½À´Ï´Ù. ½Ç½Ã°£À¸·Î ±¸ÇöÇÏ´Â ¹æ¹ýÀº ¿©·¯ °¡Áö°¡ ÀÖÀ¸¸ç ½±°Ô ¾ò¾îÁú
          °ÍÀÔ´Ï´Ù¡¦

14. °æ¸Å °Ô½ÃÆÇ ¸¸µé±â

¿©±â¼­ ±¸ÇöÇÒ °æ¸Å °Ô½ÃÆÇÀº ¾î¶² ¹°°ÇÀ̵ç ÀÚÀ¯·Ó°Ô °æ¸Å¸¦ µî·ÏÇÒ ¼ö ÀÖ°í °æ¸Å µî·ÏÀÚ Áß½ÉÀ¸·Î °æ¸Å°¡ ÁøÇàµË´Ï´Ù.    µî·ÏÀÚ´Â °æ¸ÅÀÇ ÁøÇà ¿©ºÎ¸¦ ¼öÁ¤ÇÒ ¼ö ÀÖÀ¸¸ç »èÁ¦±îÁö ÇÒ ¼ö ÀÖ½À´Ï´Ù.    ´Ù¸¸ ÀÔÂûÀÚÀÇ »èÁ¦´Â ÇØ´ç °æ¸Å¸¦ »èÁ¦ ÇؾßÁö¸¸ ¸ðµÎ »èÁ¦µË´Ï´Ù.    °æ¸Å ÀÔÂûÀº ±âº» °æ¸Å °¡°Ýº¸´Ù Ä¿¾ßÇϸç Çѹø¸¸ ÀÔÂûÀÌ °¡´ÉÇÕ´Ï´Ù.    °æ¸Å°¡ Á¾·áµÉ °æ¿ì ¸ÅµµÀÚ¿Í ³«ÂûÀÚ¿¡°Ô ¸ÞÀÏÀ» Àü¼ÛÇÏ¸ç ¸¶°¨À» °Ô½ÃÆÇ¿¡ Ç¥½ÃÇÕ´Ï´Ù.

14.1 °æ¸Å Å×ÀÌºí ¸¸µé±â

°æ¸Å °Ô½ÃÆÇÀÇ Å×ÀÌºí ¿ª½Ã µÎ°³·Î ÀÌ·ç¾îÁý´Ï´Ù.    °Ô½ÃÆÇÀÇ ÁÖ¿ä È­¸éÀÇ Á¤º¸¸¦ ÀúÀåÇÏ´Â Å×À̺í°ú ÀÔÂûÀÚÀÇ Á¤º¸¸¦ ÀúÀåÇÏ´Â Å×À̺íÀÔ´Ï´Ù.    ¿©±â¼­ ¸¸µé Å×ÀÌºí ¿ª½Ã ¸¸µå´Â °úÁ¤¸¸ ÀÍÈ÷±â ¹Ù¶ø´Ï´Ù.    Admin ¿µ¿ª¿¡¼­ °Ô½ÃÆÇ Å×À̺íÀ» »ý¼ºÇÏ´Â ¹æ¹ýÀÌ ÀÖÀ¸¹Ç·Î ÀÌ°ÍÀ» ÀÌ¿ëÇؼ­ Å×À̺íÀ» ¸¸µé¾î¾ß ÇÕ´Ï´Ù.    ¼öÀÛ¾÷À¸·Î Å×À̺í À̸§À» Á¤ÇÏ°í ¸¸µé °æ¿ì´Â ´ÜÁö °æ¸Å °Ô½ÃÆǸ¸À» ¸¸µé °æ¿ì¿¡ »ç¿ëÇÕ´Ï´Ù.    Áï, °æ¸Å½ºÅ©¸³Æ®ÀÇ °æ¸Å Å×À̺í À̸§À» Áö±Ý ¸¸µç Å×À̺í À̸§À¸·Î ¸ðµÎ ¼öÁ¤Çؼ­ »ç¿ëÇØ¾ß ÇÕ´Ï´Ù.    »çÀÌÆ®ÀÇ ±âº» ±¸¼ºÀ» ´ÙÁß °Ô½ÃÆÇ ¸ðµå·Î Ç߱⠶§¹®¿¡ admin ¿µ¿ª¿¡¼­ °Ô½ÃÆÇÀ» »ý¼ºÇØ¾ß ÇÕ´Ï´Ù.    ¹°·Ð °æ¸Å ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇϱâ À§Çؼ­ °æ¸Å Å×À̺í À̸§À» ¸µÅ©·Î Àü´ÞÇÏ´Â ¹æ¹ýÀ» »ç¿ëÇÒ ¼öµµ ÀÖ½À´Ï´Ù.

µ¥ÀÌÅͺ£À̽º ¸¸µé±â

    mysql>create databases libchal ;

 
    À§ libchal µ¥ÀÌÅͺ£À̽º´Â ÀÚ·á½Ç µ¥ÀÌÅͺ£À̽º¿Í °°½À´Ï´Ù.
    ¸¸¾à °æ¸Å °Ô½ÃÆÇ°ú ÀÚ·á½Ç °Ô½ÃÆÇ Áß Çϳª¸¸ »ç¿ëÇÏ´õ¶óµµ libchal µ¥ÀÌÅͺ£À̽º´Â ¸¸µé¾î¾ß ÇÕ´Ï´Ù.
    ÀÚ·á½Ç °Ô½ÃÆÇ¿¡¼­ µ¥ÀÌÅͺ£À̽º¸¦ ¸¸µé¾ú´Ù¸é ´Ù½Ã ¸¸µéÁö ¾Ê¾Æµµ µË´Ï´Ù.

Å×ÀÌºí ¸¸µé±â

    ./mysql -u root -p libchal < libchaltest.sql 

    CDÀÇ libchaltest.sql ÆÄÀÏÀ» ÀÌ¿ëÇؼ­ Çѹø¿¡ °æ¸Å °Ô½ÃÆÇ µÎ°³ÀÇ Å×À̺íÀ» »ý¼ºÇÕ´Ï´Ù.
    ¹°·Ð °¢ Å×À̺íÀÇ ¼Ó¼ºÀ» º¯°æÇÒ °æ¿ì ÀÌ ÆÄÀÏÀ» ¼öÁ¤Çؼ­ »ç¿ëÇÏ¸é µË´Ï´Ù.
    ±×¸®°í, ¿©±â¼­ »ý¼ºÇÏ´Â Å×À̺íÀº »çÀÌÆ® ¸ÞÀÎ È­¸é¿¡ ³ªÅ¸³ªÁö ¾Ê½À´Ï´Ù.
    ¿ÀÁ÷ admin ¿µ¿ª¿¡¼­ ¸¸µç Å×ÀÌºí¸¸ »çÀÌÆ® ¸ÞÀÎ È­¸é¿¡ ³ªÅ¸³³´Ï´Ù. 
    ¸¸¾à ¿©±â¼­ Å×À̺íÀ» »ý¼ºÇÑ ÈÄ ÀÌ Å×À̺íÀ» ÀÌ¿ëÇؼ­ °æ¸Å ½ºÅ©¸³Æ®¸¦ Å×½ºÆ®ÇÏ·Á¸é ¾Æ·¡¿Í °°Àº ¸µÅ©·Î
    »ç¿ëÇØ¾ß ÇÕ´Ï´Ù.


        <a href ='main_view.php?chanl=main_view&f=°æ¸Å ¸ÞÀÎ Å×À̺í¸í

        &f2=°æ¸Å ÀÔÂûÀÚ Å×ÀÌºí ¸í&ssid=$username' >

 
    ÀÌ°ÍÀº ÀÚ·á½ÇÀÇ °æ¿ìµµ ¸¶Âù°¡ÁöÀÔ´Ï´Ù.

Å×ÀÌºí ±¸¼º ÀÎÀÚµé

    °æ¸Å Å×À̺íÀÇ °æ¿ìµµ µÎ°³ÀÇ Å×À̺í·Î ±¸¼ºµÇ¾î ÀÖÀ¸¸ç ½ºÅ©¸³Æ® ¿ª½Ã µÎ°³·Î ÀÌ·ç¾îÁ® ÀÖ½À´Ï´Ù. 
    °¢°¢ÀÇ ±¸¼ºÀÎÀÚ´Â °æ¸Å ¸ÞÀÎ Å×À̺íÀÇ °æ¿ì °æ¸Å µî·ÏÀÚÀÇ Á¤º¸¸¦ ÀúÀåÇÏ°í ÀÔÂû Å×À̺íÀÇ °æ¿ì ÇØ´ç °æ¸Å
    ÀÔÂûÀÚÀÇ Á¤º¸¸¦ ÀúÀåÇÕ´Ï´Ù.

°æ¸Å ¸ÞÀÎ Å×À̺í

    °æ¸Å µî·ÏÀÚÀÇ Á¤º¸¸¦ ÀúÀåÇÕ´Ï´Ù.

    no - °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ ÀúÀåÇÕ´Ï´Ù.
    name - °æ¸Å µî·ÏÀÚ À̸§À» ÀúÀåÇÕ´Ï´Ù.
    email - °æ¸Å µî·ÏÀÚ ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀúÀåÇÕ´Ï´Ù.
    tel - °æ¸Å µî·ÏÀÚÀÇ ÀüÈ­¹øÈ£¸¦ ÀúÀåÇÕ´Ï´Ù.
    title - °æ¸Å Á¦¸ñÀ» ÀúÀåÇÕ´Ï´Ù.
    content - °æ¸ÅÀÇ ³»¿ëÀ» ÀúÀåÇÕ´Ï´Ù.
    edate - °æ¸ÅÀÇ ¸¶°¨ ³¯Â¥¸¦ ÀúÀåÇÕ´Ï´Ù.
    smoney - °æ¸ÅÀÇ ±âº» ±Ý¾×À» ÀúÀåÇÕ´Ï´Ù.
    wdate - °æ¸Å µî·Ï ³¯Â¥¸¦ ÀúÀåÇÕ´Ï´Ù.
    sise - ÇØ´ç °æ¸ÅÀÇ ÀÔÂû ȸ¼ö¸¦ ÀúÀåÇÕ´Ï´Ù.
    hit - °æ¸Å Á¶È¸ ¼ö¸¦ ÀúÀåÇÕ´Ï´Ù.

    noÀÇ °æ¿ì ÀÚµ¿ Áõ°¡ÇÕ´Ï´Ù.

ÀÔÂûÀÚ Å×À̺í

    ÀÔÂûÀÚ Á¤º¸¸¦ ÀúÀåÇÏ´Â Ç׸ñÀÔ´Ï´Ù.

    no - ÀÔÂûÀÚÀÇ °íÀ¯ ¹øÈ£¸¦ ÀúÀåÇÕ´Ï´Ù.
    name - ÀÔÂûÀÚÀÇ À̸§À» ÀúÀåÇÕ´Ï´Ù.
    email - ÀÔÂûÀÚÀÇ ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀúÀåÇÕ´Ï´Ù.
    tel - ÀÔÂûÀÚÀÇ ÀüÈ­ ¹øÈ£¸¦ ÀúÀåÇÕ´Ï´Ù.
    bmoney - ÀÔÂûÀÚÀÇ ÀÔÂû ±Ý¾×À» ÀúÀåÇÕ´Ï´Ù.
    tnum - ÇØ´ç °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ ÀúÀåÇÕ´Ï´Ù.
        
    noÀÇ °æ¿ì ÀÚµ¿ Áõ°¡ÇÕ´Ï´Ù.   

14.2 °æ¸Å °Ô½ÃÆÇ ¼Ò½º ¸¸µé±â

°æ¸Å °Ô½ÃÆÇÀÇ ¼Ò½º ¿ª½Ã ÃÑ µÎ°³·Î ÀÌ·ç¾îÁý´Ï´Ù.    °¢ È­¸éÀ» Ç¥ÇöÇÏ´Â ÇÔ¼ö·Î ±¸¼ºµÇ´Â ÆÄÀÏ(func_all.php)°ú ÇÔ¼öÀÇ ´Ù¾çÇÑ È­¸é Ãâ·ÂÀ» À§ÇÑ ·çƾÀÌ ÀÖ´Â ÆÄÀÏ·Î(main_view.php)·Î ±¸¼ºµË´Ï´Ù.

func_all.php Àüü ÄÚµå

    <?php

    //////////////////////////////////////////////////
    //
    //    ÀÏÀÚ : 2000.2.15 am 5
    //   ÀÛ¼ºÀÚ: skycry (hong il)
    //
    //
    //   method : °æ¸Å °Ô½ÃÆÇ functions
    //
    //////////////////////////////////////////////////
    ?>

    <?php

    $connect = mysql_connect('localhost','root','gksmf444');
    mysql_select_db('libchal',$connect);


    if($findtype == name)
    {
      $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f
      where name like '%$findname%' order by no ",$connect);
    }


    if($findtype == title)
    {
      $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f
      where title like '%$findname%' order by no ",$connect);
    }


    if($findtype == content)
    {
      $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f
      where content like '%$findname%' order by no ",$connect);
    }


    if($findtype == t_c)
    {
      $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f
      where title like '%$findname%' or content like '%$findname%' order by no ",$connect);
        }


    if(!$findtype)
    {
      $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f
      order by no ",$connect);//$connection »ý·« ÇßÀ½
    }


    $ally4 = mysql_query("select hit,sise from $f where no='$no'",$connect );
    $ally3 = mysql_query("select tnum,no,bmoney,name,tel,email from $f2
    where tnum ='$no' order by bmoney desc",$connect );
    $ally2 = mysql_query("select smoney,title,edate,content,wdate,name,email,tel
    from $f where no='$no'",$connect );
    $allylib = mysql_query("select tnum,no,name from $f2 where tnum ='$no'
    order by bmoney desc",$connect );

          
    $t_num=mysql_num_rows($ally);
    $putup = mysql_fetch_array($ally4);
    $putup2 = mysql_fetch_array($allylib);
    $putally2=mysql_fetch_array($ally2);

          
    mysql_select_db('selectuser',$connect);
    $allyuser = mysql_query("select id,name,tel1,email,passwd from userin
    where id='$username' ",$connect);
    $putuser = mysql_fetch_array($allyuser);

    ?>



    <?php

    function main_view($s_mail,$t_num,$ally,$page,$findtype,$findname,$f,$f2,$root,$username)
    {

      $p_dip = 4 ;
      $p_page =4  ;
      $p_pagex = ceil($p_page / 2) ;
      $t_page = ceil($t_num / $p_dip) ;


      if(!$page)
      {
        $page = 1;
      }


      if( $page <= $p_pagex )
      {
        $p_start = $p_pagex + 1 ;
      }
      else
      {
        $p_start = $page + 1;
      }


      $pt_page = ceil($p_start - $p_pagex) ;
      $next_p = $page + 1 ;
      $pre_p = $page - 1 ;
      $start_num = ($t_num - ($page * $p_dip))+($p_dip-1) ;


      if(!$root)
      {
        $admin = "User " ;
      }
      else
      {
        $admin = "Admin ÀÔ´Ï´Ù.";
      }


      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <th bgcolor=white colspan=7 align=left>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b>$t_page / $page : $admin </b></font></th>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>No</b></font></td>


      <td bgcolor=#808080 width=370>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Title</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Name</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Sise</b></font></td>


      <td bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Cnt</b></font></td>
      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>ÇöÀç</b></font></td>
      <td bgcolor=#808080 width=125 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>¸¶°¨</b></font></td>
      </tr>
      ");


      if(!$t_num)
      {
        echo ("
        <tr>
        <th bgcolor=black colspan=6><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>µî·ÏµÈ ±ÛÀÌ ¾ö½º¿ä...  ^^;</b></font></th>
        </tr>
        </center>
        </table>
        </html>
        ");
      }
      else
      {
        for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
        {

          if($pd >= 0 )
          {
            mysql_data_seek($ally,$pd);
            $put=mysql_fetch_array($ally);
            $wdate = date('Y-m-d H:i:s');
            $title_link1 = "<a href ='main_view.php?chanl=title&no=$put[no]&f=$f&f2=$f2'>";
            $title_link2 = "<a href ='main_view.php?chanl=title_end&no=$put[no]&f=$f&f2=$f2'>";


            if($put[edate] > $wdate)
            {
              $h = "ÁøÇàÁß";
              $title_link = $title_link1;
            }

            if($put[edate] < $wdate)
            {
              $h = "¸¶°¨";
              $title_link = $title_link2;
              $s_mail;
            }


            echo("
            <tr>
            <td bgcolor=black>
            <font style='font-size:13px;font-style:italic;color:white'>
            $put[no]</font></td>
            <td bgcolor=black>
            $title_link
            <font style='font-size:13px;font-style:italic;color:white'>
            <b>$put[title]</b></font></a></td>


            <td bgcolor=black align=center>
            <a href = mailto:$put[email] >
            <font style='font-size:13px;font-style:italic;color:white'>
            <b>$put[name]</b></font></a></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:#ff1493'>
            <b>$put[sise]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[hit]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:#008000'>
            <b>$h</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:#9400d3'>
            <b>$put[edate]</b></font></td>
            </tr>
            ");
          }
        }


        echo("
        <tr>
        <td bgcolor=black colspan=7>&nbsp;</td>
        </tr>
        <tr>
        <td bgcolor=black colspan=7 align=center>
        ");


        if($page == 1)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'>first </font> ");
        }
        else
        {
          echo ("
          <a href =main_view.php?chanl=main_view&page=$pre_p&f=$f&f2=$f2>
          <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>");
        }


        for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++)
        {
          if($pp == $page )
          {
            echo ("
            <font style='font-size:13px;font-style:italic;color:red'>
            $pp</font>
            ");
          }
          else
          {
            if($pp > 0  && $pp <= $t_page)
            {
              echo("
              <a href =main_view.php?chanl=main_view&page=$pp&f=$f&f2=$f2>
              <font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>");
            }
          }
        }


        if($page == $t_page)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'> last^^ </font>");
        }
        else
        {

                
        echo ("
        <a href =main_view.php?chanl=main_view&page=$next_p&f=$f&f2=$f2>
        <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
      }
      }


      echo("
      </td>
      </tr>
      </center>
      </table>
      <br>
      <center>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <td bgcolor=black width=100>
      <a href =main_view.php?chanl=new_libchal&f=$f&f2=$f2>
      <img src=write.gif border=0>
      </a></td>
 

      <td bgcolor=black width=100>
      <a href =userin.php?chanl=main_view&username=$username>
      <img src=home.gif border=0>
      </a></td>
 

      <td bgcolor=black width=100>
      <a href =db_view.php?chanl=rootin>
      <img src=admin.gif border=0></a></td>
 

      <td bgcolor=black align=right width=150>
      <form method=post action=main_view.php>
      <input type=hidden name=chanl size=14 value=main_view>
      <input type=hidden name=f value=$f>
      <input type=hidden name=f2 value=$f2>
      <select name=findtype>
      <option value=name selected>Name
      <option value=title>Title
      <option value=content>Content
      <option value=t_c>Titl+Cont
      </select>
      </font></td>
      <td bgcolor=black width=150>
      <input type=text name=findname size=14>
      </td>


      <td bgcolor=black width=100>
      <input type=submit value=Find>
      </td>
      </tr>
      </table>
      </center>
      </html>
      ");

    }


    function edit_libchal($putally2,$no,$f,$f2,$putuser)
    {

      echo("
      <html>
      <title>
      input_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=main_view.php>
      <input type=hidden name=chanl value=edit_libchal_in>
      <input type=hidden name=f value=$f>
      <input type=hidden name=f2 value=$f2>
      <input type=hidden name=no value=$no>

      <table border=0 cellspacing=2 cellpadding=2 width=700 >

      <tr>
      <td bgcolor=#808080 scrolling=no>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Title</b></font></td>


      <td bgcolor=black align=left>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=title size=50 value='$putally2[title]'></font></td>
      </tr>
 

      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Name</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $putally2[name]</font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Passwd</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#ff1493'>
      <input type=password name=passwd size=9></font></td>
      </tr>
    

      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~E-mail</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $putally2[email]</font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Tel</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $putally2[tel]</font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~¸¶°¨½Ã°£</b></font></td>
      <td bgcolor=black>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <select name=edata1>
        <option value=2000 selected>Y2K
        <option value=2001>Y21
      </select>
      <select name=edata2>
        <option value=1>1mon
        <option value=2>2mon
        <option value=3>3mon
        <option value=4 selected>4mon
        <option value=5>5mon
        <option value=6>6mon
        <option value=7>7mon
        <option value=8>8mon
        <option value=9>9mon
        <option value=10>10mon
        <option value=11>11mon
        <option value=12>12mon
      </select>
      <select name=edata3>
        <option value=1>1day
        <option value=2>2day
        <option value=3>3day
        <option value=4>4day
        <option value=5>5day
        <option value=6>6day
        <option value=7>7day
        <option value=8>8day
        <option value=9>9day
        <option value=10>10day
        <option value=11>11day
        <option value=12>12day
        <option value=13>13day
        <option value=14 selected>14day
        <option value=15>15day
        <option value=16>16day
        <option value=17>17day
        <option value=18>18day
        <option value=19>19day
        <option value=20>20day
        <option value=21>21day
        <option value=22>22day
        <option value=23>23day
        <option value=24>24day
        <option value=25>25day
        <option value=26>26day
        <option value=27>27day
        <option value=28>28day
        <option value=29>29day
        <option value=30>30day
        <option value=31>31day
      </select>
      <select name=edata4>
        <option value=am>A.m
        <option value=pm selected>P.m
      </select>
      <select name=edata5>
        <option value=1>1si
        <option value=2>2si
        <option value=3 selected>3si
        <option value=4>4si
        <option value=5>5si
        <option value=6>6si
        <option value=7>7si
        <option value=8>8si
        <option value=9>9si
        <option value=10>10si
        <option value=11>11si
        </select>
        <select name=edata6>
        <option value=10>10
        <option value=20>20
        <option value=30>30
        <option value=40 selected>40
        <option value=50>50
        <option value=00>00
      </select>
      </font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~±âº»±Ý¾×</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#ff1493'>
      <input type=int name=smoney size=10 value='$putally2[smoney]'>
      <b>Won</b></font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Content</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <textarea name=content rows=10 cols=70 >
      $putally2[content]</textarea></font></td>
      </tr>


      <tr>
      <td bgcolor=black align=center colspan=4>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=¼öÁ¤Çϱâ>
      </font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");

    }


    function view_title($putally2,$ally3,$no,$f,$f2,$putuser)
    {

      $content=nl2br($putally2[content]) ;


      echo("
      <html>
      <title>
      view_title html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <td bgcolor=white align=center width=120>
      <font style='font-size:13px;font-style:italic;color:#blue'><b>$no No</b></font></td>


      <td bgcolor=white align=center width=580>
      <font style='font-size:13px;font-style:italic;color:#black'>
      <b>$putally2[title]</b></font></td>
      </tr>
      </table>
      
      <table border=0 cellspacing=2 cellpadding=2 width=700 >

      <tr>
      <td bgcolor=#808080 align=center width=100>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$putally2[edate]:¸¶°¨</b></font></td>


      <td bgcolor=#808080 align=center width=200>
      <a href = mailto:$putally2[email] >
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>name:$putally2[name]</b></font></a></td>
      <td bgcolor=#808080 align=center width=280>
      <font style='font-size:13px;font-style:italic;color:red'>
      <b>񃧯money:$putally2[smoney]</b></font></td>
      </tr>


      <tr>
      <table border=0 cellspacing=2 cellpadding=2 width=700 height=250>
      <td bgcolor=black valign=top colspan=3 width=700 height=250>
      <font style='font-size:13px;font-style:italic;color:blue'><b>$content</b></font></td>
      </tr>
      </table>
      
      <table border=0  width=700 >

      <tr>
      <td bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>ÀϼøÀ§</b></font></td>


      <td bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Name</b></font></td>
      

      <td bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Tel</b></font></td>


      <td bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Money</b></font></td>
      </tr>
      ");


      for($a=1 ; $a < 5 ; $a++)
      {

        $put2=mysql_fetch_array($ally3);


        if($put[smoney]<$put2[bmoney])
        {
          echo("
          <tr>
          <td bgcolor=black align=center width=150>
          <font style='font-size:13px;font-style:italic;color:#fffff0'><b>$a</b></td>
          <td bgcolor=black align=center width=150>
          <a href = mailto:$put2[email] >
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$put2[name]</b></font></a></td>


          <td bgcolor=black align=center width=200>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$put2[tel]</b></font></td>


          <td bgcolor=black align=center >
          <font style='font-size:13px;font-style:italic;color:red'>
          <b>$put2[bmoney]</b></font></td>
          </tr>
          ");
        }
      }      


      echo("
      </table>
      <table border=0  width=700 >

      <tr>
      <td bgcolor=black > &nbsp </td>
      </tr>

      <tr>
      <td bgcolor=black >
      <a href =main_view.php?chanl=input_newlibchal&tnum=$no&f=$f&f2=$f2>
      <img src=write.gif border=0></a></td>


      <td bgcolor=black ><a href =main_view.php?chanl=main_view&f=$f&f2=$f2>
      <img src=list.gif border=0></a></td>
      <td bgcolor=black ><a href =main_view.php?chanl=edit_libchal&no=$no&f=$f&f2=$f2>
      <img src=rewrite.gif border=0></a></td>


      <td bgcolor=black ><a href =main_view.php?chanl=del&no=$no&f=$f&f2=$f2>
      <img src=delete1.gif border=0></a></td>
      <td bgcolor=black ><a href =main_view.php?chanl=del_lib&no=$no&f=$f&f2=$f2>
      <img src=delete2.gif border=0></a></td>


      </tr>
      </table>
      </center>
      </html>
      ");

    }


    function error_view($title,$smoney,$edate,$content,$f,$f2)
    {

      if(!$title)
      {
        echo("
        <script>
        window.alert('ÁÖÁ¦°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");

        exit;
      }


      if(!$smoney)
      {
        echo("
        <script>
        window.alert('±âº» ±Ý¾×ÀÌ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");

        exit;
      }

      if(!$content)
      {
        echo("
        <script>
        window.alert('³»¿ëÀÌ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");

      exit;
      }


      if(!$edate)
      {
        echo("
        <script>
        window.alert('¸¶°¨ÀÏÀÌ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");

        exit;
      }
    }


    function input_newlibchal($tnum,$f,$f2,$putuser)
    {

      echo("
      <html>
      <title>
      input_newlibchal html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>


      <form method=post action=main_view.php>
      <input type=hidden name=chanl value=input_newlibchal>
      <input type=hidden name=chanl2 value=input_newlibchal2>
      <input type=hidden name=tnum value=$tnum>
      <input type=hidden name=no value=$tnum>
      <input type=hidden name=f value=$f>
      <input type=hidden name=f2 value=$f2>
      <table border=0 cellspacing=2 cellpadding=2  width=700 >
      </table>

      <table border=0 cellspacing=2 cellpadding=2 width=700 >

      <tr>
      <td width=50 bgcolor=#808080>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Name</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $putuser[name]</font></td>


      <td width=100 bgcolor=#808080>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~E-mail</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $putuser[email]</font></td>
      </tr>

      <tr>
      <td width=100 bgcolor=#808080>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Tel</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $putuser[tel1]</font></td>
      <td width=100 bgcolor=#808080>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~ÀÔÂû±Ý¾×</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=bmoney size=10>won</font></td>
      </tr>
      </table>
      <br><br>
      <table border=0 cellspacing=2 cellpadding=2  width=71% >
      <tr>
      <td bgcolor=black align=center colspan=4>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=ÀÔÂûµî·Ï>
      <input type=reset  value=Áö¿ì±â></font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    function input_view($f,$f2,$connect,$putuser)
    {

      echo("
      <html>
      <title>
      input_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=main_view.php>
      <input type=hidden name=chanl value=input_new>
      <input type=hidden name=f value=$f>
      <input type=hidden name=f2 value=$f2>

      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      

      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Title</b></font></td>


      <td bgcolor=black align=left><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=title size=44> </font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Name</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $putuser[name]</font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~E-mail</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $putuser[email]
      </font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Tel</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $putuser[tel1]</font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~¸¶°¨½Ã°£</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <select name=edata1>
      <option value=2000 selected>Y2K
      <option value=2001>Y21
      </select>

      <select name=edata2>
      <option value=1>1mon
      <option value=2>2mon
      <option value=3>3mon
      <option value=4 selected>4mon
      <option value=5>5mon
      <option value=6>6mon
      <option value=7>7mon
      <option value=8>8mon
      <option value=9>9mon
      <option value=10>10mon
      <option value=11>11mon
      <option value=12>12mon
      </select>

      <select name=edata3>
      <option value=1>1day
      <option value=2>2day
      <option value=3>3day
      <option value=4>4day
      <option value=5>5day
      <option value=6>6day
      <option value=7>7day
      <option value=8>8day
      <option value=9>9day
      <option value=10>10day
      <option value=11>11day
      <option value=12>12day
      <option value=13>13day
      <option value=14 selected>14day
      <option value=15>15day
      <option value=16>16day
      <option value=17>17day
      <option value=18>18day
      <option value=19>19day
      <option value=20>20day
      <option value=21>21day
      <option value=22>22day
      <option value=23>23day
      <option value=24>24day
      <option value=25>25day
      <option value=26>26day
      <option value=27>27day
      <option value=28>28day
      <option value=29>29day
      <option value=30>30day
      <option value=31>31day
      </select>
      
      <select name=edata4>
      <option value=am>A.m
      <option value=pm selected>P.m
      </select>

      <select name=edata5>
      <option value=1>1si
      <option value=2>2si
      <option value=3 selected>3si
      <option value=4>4si
      <option value=5>5si
      <option value=6>6si
      <option value=7>7si
      <option value=8>8si
      <option value=9>9si
      <option value=10>10si
      <option value=11>11si
      <option value=12>12si
      </select>
      <select name=edata6>
      <option value=10>10
      <option value=20>20
      <option value=30>30
      <option value=40 selected>40
      <option value=50>50
      <option value=00>00
      </select>
      </font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~±âº»±Ý¾×</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#ff1493'>
      <input type=int name=smoney size=10><b>Won</b></font></td>
      </tr>


      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Content</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <textarea name=content rows=10 cols=70></textarea></font></td>
      </tr>


      <tr>
      <td bgcolor=black align=center colspan=4>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=°æ¸Åµî·Ï>
      <input type=reset  value=Áö¿ì±â></font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    function del($no,$tnum,$f,$f2,$root,$putuser)
    {

      echo("
      <html>
      <title>
      Del html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=main_view.php>
      <input type=hidden name=chanl value=del_no>
      <input type=hidden name=tnum value=$no>
      <input type=hidden name=no value=$no>
      <input type=hidden name=f value=$f>
      <input type=hidden name=f2 value=$f2>

      <table border=0 cellspacing=2 cellpadding=2  width=700 >


      <tr>
      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~passw</b></font></td>
      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=password name=passwd size=10></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=Áö¿ì±â>
      </font></td>
      </tr>


      <tr>
      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Name</b></font></td>
      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $putuser[name]</font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    function del_lib($no,$tnum,$f,$f2,$root,$putuser)
    {

      echo("
      <html>
      <title>
      Del_lib html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=main_view.php>
      <input type=hidden name=chanl value=del_lib2>
      <input type=hidden name=tnum value=$no>
      <input type=hidden name=no value=$no>
      <input type=hidden name=f value=$f>
      <input type=hidden name=f2 value=$f2>

      <table border=0 cellspacing=2 cellpadding=2  width=700 >


      <tr>
      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Name</b></font></td>
      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $putuser[name]</font></td>
      </tr>


      <tr>
      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~passw</b></font></td>
      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=password name=passwd size=9></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=Áö¿ì±â>
      </font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    function title_end($putally2,$ally3,$no,$f,$f2)
    {

      echo("
      <html>
      <title>
      end html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <td bgcolor=white align=center width=120>
      <font style='font-size:13px;font-style:italic;color:#blue'><b>$no No</b></font></td>
      <td bgcolor=white align=center width=580>
      <font style='font-size:13px;font-style:italic;color:#black'>
      <b>$putally2[title]</b></font></td>
      </tr>
      </table>

      <table border=0 cellspacing=2 cellpadding=2 width=700 >

      <tr>
      <td bgcolor=#808080 align=center width=135>
      <font style='font-size:13px;font-style:italic;color:#fffff0'><b>³«ÂûÀÚ</b></font></td>
      <td bgcolor=#808080 align=center width=250>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>¸¶°¨½Ã°£</b></font></td>


      <td bgcolor=#808080 align=center width=250>
      <font style='font-size:13px;font-style:italic;color:#fffff0'><b>Tel</b></font></td>
      <td bgcolor=#808080 align=center width=150>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>³«ÂûMoney</b></font></td>
      </tr>
      ");


      for($a=1 ; $a < 2 ; $a++)
      {

        $put2=mysql_fetch_array($ally3);


        if($putally2[smoney]<$put2[bmoney])
        {
          echo("
          <tr>
          <td bgcolor=black align=center><a href = mailto:$put2[email] >
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$put2[name]</b></font></a></td>


          <td bgcolor=black align=center>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$putally2[edate]</b></font></td>


          <td bgcolor=black align=center>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$put2[tel]</b></font></td>
          <td bgcolor=black align=center>
          <font style='font-size:13px;font-style:italic;color:red'>
          <b>$put2[bmoney]</b></font></td>
          </tr>
          ");
        }          
      }


      echo("
      <tr>
      <td bgcolor=#808080 align=center width=135>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>¸ÅµµÀÚ</b></font></td>
      <td bgcolor=#808080 align=center width=250>
      <font style='font-size:13px;font-style:italic;color:#fffff0'><b>¸ÅµµÀÏ</b></font></td>


      <td bgcolor=#808080 align=center width=250>
      <font style='font-size:13px;font-style:italic;color:#fffff0'><b>Tel</b></font></td>
      <td bgcolor=#808080 align=center width=150>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>񃧯Money</b></font></td>
      </tr>


      <tr>
      <td bgcolor=black align=center><a href = mailto:$putally2[email] >
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$putally2[name]</b></font></a></td>


      <td bgcolor=black align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$putally2[wdate]</b></font></td>


      <td bgcolor=black align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$putally2[tel]</b></font></td>


      <td bgcolor=black align=center>
      <font style='font-size:13px;font-style:italic;color:red'>
      <b>$putally2[smoney]</b></font></td>
      </tr>


      <tr>
      <td bgcolor=black > &nbsp </td>
      </tr>


      <tr>
      <td bgcolor=black colspan=4>
      <font style='font-size:15px;font-style:italic;color:#fffff0'>
      ''' °æ¸Å °Ô½ÃÀÚ´Â Á÷Á¢ »èÁ¦ ÇØ¾ß ¸ÞÀÏÀÌ °è¼Ó ¹ß¼Û ¾ÊµË´Ï´Ù.~! </font></td>
      </tr>


      <tr>
      <td bgcolor=black colspan=4>
      <font style='font-size:15px;font-style:italic;color:#fffff0'>
      ''' °è¼Ó ÁøÇàÇÏ·Á¸é ³¯Â¥¸¦ º¯°æ Çϼ¼¿ä.~! </font></td>
      </tr>


      <tr>
      <td bgcolor=black ><a href =main_view.php?chanl=main_view&f=$f&f2=$f2>
      <img src=list.gif border=0></a></td>
      <td bgcolor=black ><a href =main_view.php?chanl=edit_libchal&no=$no&f=$f&f2=$f2>
      <img src=rewrite.gif border=0></a></td>
      <td bgcolor=black ><a href =main_view.php?chanl=del&no=$no&f=$f&f2=$f2>
      <img src=delete2.gif border=0></a></td>
      </tr>
      </table>
      </center>
      </html>
      ");
    }


    function s_mail($putally2,$ally3,$no,$f,$f2)
    {

      for($a=1 ; $a < 2 ; $a++)
      {

        $put2=mysql_fetch_array($ally3);


        if($putally2[smoney]<$put2[bmoney])
        {
          $message = " <b>No</b> $no title : $putally2[title] <br>
          <b>³«ÂûÀÚ</b> $put2[name] <b>¸¶°¨½Ã°£</b> $putally2[edate]
          <b>Tel</b> $put2[tel] <b>³«Âû±Ý¾×</b> $put2[bmoney] <br><br>
          <b>¸ÅµµÀÚ</b> $putally2[name] <b>¸ÅµµÀÏ</b> $putally2[wdate]
          <b>Tel</b> $putally2[tel] <b>±âº»±Ý¾×</b> $putally2[smoney] <br><br>
          <b>°øÁö</b></br>
          ³«Âû ¸ÅÀÏ È®ÀÎ ÈÄ °æ¸Å °Ô½ÃÆÇÀÇ °æ¸Å ±ÛÀ» Á÷Á¢ »èÁ¦Çϼ¼¿ä~!
          ";
        }
      }


      $su = " <b>No $no</b> ³«Âû ";
      $rp = "$put2[email]";
      $rp1 = "$putally2[email]";
      mail($rp , $su ,$message);
      mail($rp1 , $su ,$message);
    }

    ?>

¼Ò½º ¼³¸í

    ÇÔ¼ö Çü½ÄÀ¸·Î µÇ¾î ÀÖÀ¸¸ç °æ¸ÅÀÇ »õ·Î¿î ±â´ÉÀ» Ãß°¡ÇÒ ¼ö ÀÖÀ¸¸ç °¢ È­¸é º°·Î ÇÔ¼ö´Â ºÐ¸®µÇ¾î ÀÖ½À´Ï´Ù.

database Á¢¼Ó°ú °Ë»ö ¸ðµå ¸¸µé±â

    ¼Ò½ºÀÇ Ã³À½ ºÎºÐÀ̸ç mysqlÀÇ Á¢¼Ó queryµéÀÌ ³ª¿­µË´Ï´Ù.
    ÀÌ°ÍÀº °æ¸Å ±ÛÀÇ °Ë»öÀ» À§ÇÑ µ¥ÀÌÅͺ£À̽º queryµµ ÀÖÀ¸¸ç °æ¸Å ¸ÞÀÎ È­¸éÀ» Ãâ·ÂÇÏ´Â queryµµ ÀÖ½À´Ï´Ù.


    <?php

    $connect = mysql_connect('localhost','root','gksmf444');
    mysql_select_db('libchal',$connect);
    /* mysql Á¢¼ÓÀ» À§ÇÑ È£½ºÆ®, À¯Àú, Æнº¿öµå¸¦ ³ª¿­ÇÏ°í µ¥ÀÌÅͺ£À̽º¸¦ ¼±Åà ÇÕ´Ï´Ù.*/


    if($findtype == name)
    {
      $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f
      where name like '%$findname%' order by no ",$connect);
    }

    /* $findtypeÀÌ nameÀÏ ¶§ ÇØ´ç Å×ÀÌºí¿¡¼­ °æ¸Å µî·ÏÀÚ¸¦ °Ë»öÇÕ´Ï´Ù.
       ÀÚ·á½Ç¿¡¼­¿Í °°Àº ·çƾÀ̸ç $f´Â °æ¸Å ¸ÞÎ Å×À̺íÀ» Àü´Þ¹Þ°í, $f2´Â ÀÔÂûÀÚ Å×À̺í À̸§À» Àü´Þ¹Þ½À´Ï´Ù. */


    if($findtype == title)
    {
      $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f
      where title like '%$findname%' order by no ",$connect);
    }
    /* $findtype°¡ titleÀÏ ¶§ °æ¸Å ¸ÞÀÎ Å×ÀÌºí¿¡¼­ Á¦¸ñ¿¡ °üÇØ °Ë»öÇÕ´Ï´Ù. */


    if($findtype == content)
    {
      $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f
      where content like '%$findname%' order by no ",$connect);
    }
    /* $findtypeÀÌ contentÀÏ ¶§ °æ¸Å ¸ÞÀÎ Å×ÀÌºí¿¡¼­ °æ¸Å ³»¿ë¿¡ °üÇؼ­ °Ë»öÇÕ´Ï´Ù. */


    if($findtype == t_c)
    {
      $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f
      where title like '%$findname%' or content like '%$findname%' order by no ",$connect);
    }
    /* $findtypeÀÌ t_cÀÏ ¶§ °æ¸Å ¸ÞÀÎ Å×ÀÌºí¿¡¼­ °æ¸Å Á¦¸ñ°ú ³»¿ë¿¡¼­ Àü´Þ ¹ÞÀº °Ë»ö ´Ü¾î¸¦ °Ë»öÇÕ´Ï´Ù. */


    if(!$findtype)
    {
      $ally = mysql_query("select no,sise,title,hit,edate,wdate,name,email from $f
      order by no ",$connect);//$connection »ý·« ÇßÀ½
    }
      /* $findtypeÀÌ ¾øÀ» °æ¿ì °æ¸Å ¸ÞÀÎ Å×ÀÌºí¿¡¼­ µî·ÏµÈ °æ¸Å ±ÛÀ» ¸ðµÎ query ÇÕ´Ï´Ù. */
   

    $ally4 = mysql_query("select hit,sise from $f where no='$no'",$connect );
    /* ƯÁ¤ ¹øÈ£¿¡ ÇØ´çÇÏ´Â °æ¸Å hit, sise¸¦ °Ë»öÇÕ´Ï´Ù. */


    $ally3 = mysql_query("select tnum,no,bmoney,name,tel,email from $f2
    where tnum ='$no' order by bmoney desc",$connect );
    /* ƯÁ¤ ¹øÈ£¿¡ ÇØ´çÇÏ´Â ÀÔÂûÀÚÀÇ Á¤º¸¸¦ °Ë»öÇÕ´Ï´Ù. */


    $ally2 = mysql_query("select smoney,title,edate,content,wdate,name,email,tel
    from $f where no='$no'",$connect );
    /* ƯÁ¤ ¹øÈ£¿¡ ÇØ´çÇÏ´Â °æ¸ÅÀÇ Á¤º¸¸¦ °Ë»öÇÕ´Ï´Ù. */


    $allylib = mysql_query("select tnum,no,name from $f2 where tnum ='$no'
    order by bmoney desc",$connect );
    /* ƯÁ¤ ¹øÈ£¿¡ ÇØ´çÇÏ´Â ÀÔÂûÀÚ Á¤º¸¸¦ ÀÔÂû ±Ý¾× ¿ª¼øÀ¸·Î Á¤·ÄÇÕ´Ï´Ù. */


    $t_num=mysql_num_rows($ally);
    /* °æ¸Å ¸ÞÀÎ Å×ÀÌºí¿¡ µî·ÏµÈ °æ¸Å ¼ö¸¦ ÇØ´ç º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */


    $putup = mysql_fetch_array($ally4);
    /* ƯÁ¤ ¹øÈ£¿¡ ÇØ´çÇÏ´Â °æ¸Å ½Ã¼¼¿Í Á¶È¸ ¼ö¸¦ ÇØ´ç º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */


    $putup2 = mysql_fetch_array($allylib);
    /* ƯÁ¤ °æ¸Å ÀÔÂûÀÚÀÇ Á¤º¸ ÇØ´ç º¯¼ö¿¡ ¹è¿­·Î ÀúÀåÇÕ´Ï´Ù. */


    $putally2=mysql_fetch_array($ally2);


    mysql_select_db('selectuser',$connect);
    /* ȸ¿ø Á¤º¸ µ¥ÀÌÅͺ£À̽ºÀÎ selectuser µ¥ÀÌÅͺ£À̽º¸¦ ¼±ÅÃÇÕ´Ï´Ù. ±¸Áö ȸ¿ø µ¥ÀÌÅͺ£À̽º¸¦ µû·Î ¸¸µéÁö ¾È°í libchal
      µ¥ÀÌÅͺ£À̽º¿¡ ȸ¿ø Á¤º¸ Å×À̺íÀ» »ý¼ºÇؼ­ »ç¿ëÇÏ¸é ½ºÅ©¸³Æ®ÀÇ ¼Óµµ Çâ»óÀÌ ÀÖÀ» °ÍÀÔ´Ï´Ù. */


    $allyuser = mysql_query("select id,name,tel1,email,passwd from userin
    where id='$username' ",$connect);
    /* Á¢¼ÓÇÑ ¼¼¼Ç¿¡ ÇØ´çÇÏ´Â ID¸¦ ÀÌ¿ëÇؼ­ userin Å×ÀÌºí¿¡¼­ ÇØ´ç ID Á¤º¸¸¦ °Ë»öÇÕ´Ï´Ù.*/


    $putuser = mysql_fetch_array($allyuser);
    /* ƯÁ¤ ȸ¿øÀÇ Á¤º¸¸¦ ¹è¿­·Î ÀúÀåÇÕ´Ï´Ù. */

    ?>

main_view( ) ÇÔ¼ö

    °æ¸Å °Ô½ÃÆÇÀÇ ¸ÞÀÎ È­¸éÀ» Ãâ·ÂÇÏ´Â ÇÔ¼öÀÔ´Ï´Ù. °æ¸Å °Ô½ÃÆÇ ¸ÞÀÎ È­¸éÀ» Âü°íÇϼ¼¿ä.

ÇÔ¼öÀÎÀÚ

    main_view($s_mail,$t_num,$ally,$page,$findtype,$findname,$f,$f2,$root,$username);

    /* °æ¸Å °Ô½ÃÆÇÀÇ ¸ÞÀÎ È­¸éÀ» Ãâ·ÂÇϱâ À§ÇÑ ÇÔ¼öÀÇ ÀÎÀÚµé ÀÔ´Ï´Ù. */


    $s_mail - °æ¸Å°¡ ¸¶°¨ µÇ¾úÀ» °æ¿ì ÇØ´ç °æ¸ÅÀÇ ³»¿ëÀ» Àü´ÞÇÕ´Ï´Ù.
    $t_num - ÃÑ °æ¸Å ±ÛÀÇ ¼ö¸¦ Àü´ÞÇÕ´Ï´Ù.
    $ally - °æ¸Å ¸ÞÀÎ Å×À̺íÀÇ °æ¸Å Á¤º¸¸¦ Àü´ÞÇÕ´Ï´Ù.
    $page - °æ¸Å ¸ÞÀÎ È­¸éÀÇ ÆäÀÌÁö¸¦ Àü´ÞÇÕ´Ï´Ù.
    $findtype - °æ¸ÅÀÇ °Ë»ö Á¶°ÇÀ» Àü´ÞÇÕ´Ï´Ù. Áï, °æ¸Å Á¦¸ñ, µî·ÏÀÚ, ³»¿ë, Á¦¸ñ°ú ³»¿ëÀ» Àü´ÞÇÕ´Ï´Ù.
    $findname - °æ¸Å¿¡¼­ °Ë»öÇÒ ´Ü¾î¸¦ Àü´ÞÇÕ´Ï´Ù.
    $f - °æ¸Å °Ô½ÃÆÇÀÇ ¸ÞÀÎ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù.
    $f2 - °æ¸Å °Ô½ÃÆÇÀÇ ÀÔÂûÀÚ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù.
    $root - admin ·Î±×ÀÎ ¶§ »ý¼ºµÈ ÄíÅ°¸¦ Àü´ÞÇÕ´Ï´Ù.
    $username - »çÀÌÆ® Á¢¼Ó ¶§ »ç¿ëÇÑ ID ¼¼¼ÇÀ» Àü´ÞÇÕ´Ï´Ù.

°æ¸Å ±Û Ãâ·Â Çϱâ

    µî·ÏÇÑ °æ¸Å ±ÛÀ» ÆäÀ̺°·Î Ãâ·ÂÇÏ¸ç °æ¸ÅÀÇ ÁøÇà°ú ¸¶°¨À» ¾Ë·Á ÁÝ´Ï´Ù.


    for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
    {
    /* ÆäÀÌÁö´ç ±Û°ú ÆäÀÌÁö ¸µÅ©, ½ÃÀÛ ÆäÀÌÁö °ªÀ» ÀÌ¿ëÇؼ­ °æ¸Å ±ÛÀ» Ãâ·ÂÇÕ´Ï´Ù. */


      if($pd >= 0 )
      {
        mysql_data_seek($ally,$pd);
        $put=mysql_fetch_array($ally);
        /* °æ¸Å ±ÛÀ» ¼øÂ÷ÀûÀ¸·Î ¹è¿­·Î ÀúÀåÇؼ­ Ãâ·ÂÇÕ´Ï´Ù. */
                
        $wdate = date('Y-m-d H:i:s');
        /* ÇöÀç ³¯Â¥¿Í ½Ã°£À» ÀúÀåÇÕ´Ï´Ù. ÀÌ°ÍÀº °æ¸ÅÀÇ ¸¶°¨ ³¯Â¥¸¦ °¡·Á³»±â À§ÇØ »ç¿ëÇÕ´Ï´Ù. */
                
        $title_link1 = "<a href ='main_view.php?chanl=title&no=$put[no]&f=$f&f2=$f2'>";
        /* ÇØ´ç °æ¸ÅÀÇ ³»¿ëÀ» ¸µÅ©ÇÕ´Ï´Ù. */
                
        $title_link2 = "<a href ='main_view.php?chanl=title_end&no=$put[no]&f=$f&f2=$f2'>";
        /* ÇØ´ç °æ¸ÅÀÇ ¸¶°¨ Ç׸ñÀ» ¸µÅ©ÇÕ´Ï´Ù. */


        if($put[edate] > $wdate)
        {
          $h = "ÁøÇàÁß";
          $title_link = $title_link1;
        }
        /* °æ¸Å µî·Ï ¶§ ¼³Á¤ÇÑ ¸¶°¨ ³¯Â¥°¡ ÇöÀç ³¯Â¥º¸´Ù Ŭ °æ¿ì °æ¸Å ³»¿ëÀ» ¸µÅ©ÇÏ°í "ÁøÇàÁß" º¯¼ö¸¦ ¼³Á¤ÇÕ´Ï´Ù. */

                
        if($put[edate] < $wdate)
        {
          $h = "¸¶°¨";
          $title_link = $title_link2;
          $s_mail;
        }
        /* °æ¸Å ¸¶°¨ ³¯Â¥°¡ ÇöÀç ³¯Â¥ º¸´Ù ÀÛÀ» °æ¿ì °æ¸Å ¸¶°¨ È­¸éÀ» ¸µÅ©ÇÏ°í, "¸¶°¨" º¯¼ö¸¦ ¼³Á¤ÇÏ¸ç ¸ÅµµÀÚ¿Í
           ³«ÂûÀÚ¿"Ô ¸ÞÀÏÀ»($s_mail) ¹ß¼ÛÇÕ´Ï´Ù. */


        echo("
        <tr>
        <td bgcolor=black>
        <font style='font-size:13px;font-style:italic;color:white'>
        $put[no]</font></td>
        <td bgcolor=black>
        /* °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ Ãâ·ÂÇÕ´Ï´Ù. */
                
        $title_link
        <font style='font-size:13px;font-style:italic;color:white'>
        <b>$put[title]</b></font></a></td>
        /* °æ¸Å Á¦¸ñÀ» Ãâ·ÂÇÕ´Ï´Ù. */
                
        <td bgcolor=black align=center>
        <a href = mailto:$put[email] >
        <font style='font-size:13px;font-style:italic;color:white'>
        <b>$put[name]</b></font></a></td>
        /* °æ¸Å µî·ÏÀÚ À̸§°ú ¸ÞÀÏ ÁÖ¼Ò¸¦ ¸µÅ©ÇÕ´Ï´Ù. */


        <td bgcolor=black align=center>
        <font style='font-size:13px;font-style:italic;color:#ff1493'>
        <b>$put[sise]</b></font></td>
        /* ÇØ´ç °æ¸ÅÀÇ ÀÔÂûÀÚ ¼ö¸¦ Ãâ·ÂÇÕ´Ï´Ù. */
                
        <td bgcolor=black align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$put[hit]</b></font></td>
        /* ÇØ´ç °æ¸ÅÀÇ Á¶È¸ ¼ö¸¦ Ãâ·ÂÇÕ´Ï´Ù. */


        <td bgcolor=black align=center>
        <font style='font-size:13px;font-style:italic;color:#008000'>
        <b>$h</b></font></td>
        /* ÇØ´ç °æ¸ÅÀÇ ÁøÇà ¿©ºÎ¸¦ Ãâ·ÂÇÕ´Ï´Ù. ÀÌ ºÎºÐÀº ÀÔÂû °¡´É ±Ý¾×À» Ç¥½ÃÇÏ´Â ¹æ¹ýµµ ÀÖ½À´Ï´Ù. */
        <td bgcolor=black align=center>
        <font style='font-size:13px;font-style:italic;color:#9400d3'>
        <b>$put[edate]</b></font></td>
        /* ÇØ´ç °æ¸ÅÀÇ ¸¶°¨ ³¯Â¥¸¦ Ãâ·ÂÇÕ´Ï´Ù. */
        </tr>
        ");
      }
    }

´Ù¸¥ È­¸é ¸µÅ© ¸¸µé±â

    °æ¸Å °Ô½ÃÆÇ ¸¶Áö¸· ºÎºÐ¿¡ °æ¸Å ±Û µî·Ï°ú Ȩ, admin °"â ¸µÅ©¸¦ ¸¸µå´Â ºÎºÐÀÔ´Ï´Ù.


    echo("
    </td>
    </tr>
    </center>
    </table>
    <br>
    <center>
    <table border=0 cellspacing=2 cellpadding=2 width=700 >
    <tr>
    <td bgcolor=black width=100>
    <a href =main_view.php?chanl=new_libchal&f=$f&f2=$f2>
    <img src=write.gif border=0>
    </a></td>
    /* »õ·Î¿î °æ¸Å ±ÛÀ» µî·ÏÇÏ´Â È­¸éÀ» À̹ÌÁö·Î ¸µÅ©ÇÕ´Ï´Ù. */

    <td bgcolor=black width=100>
    <a href =userin.php?chanl=main_view&username=$username>
    <img src=home.gif border=0>
    </a></td>
    /* »çÀÌÆ® ¸ÞÀÎ ÆäÀÌÁö À̵¿ ¸µÅ©¸¦ ¸¸µì´Ï´Ù. */


    <td bgcolor=black width=100>
    <a href =db_view.php?chanl=rootin>
    <img src=admin.gif border=0></a></td>
    /* admin ¿µ¿ª ·Î±×ÀÎ È­¸é ¸µÅ©¸¦ ¸¸µì´Ï´Ù. */
        
    <td bgcolor=black align=right width=150>
    <form method=post action=main_view.php>
    <input type=hidden name=chanl size=14 value=main_view>
    <input type=hidden name=f value=$f>
    <input type=hidden name=f2 value=$f2>
    <select name=findtype>
    <option value=name selected>Name
    <option value=title>Title
    <option value=content>Content
    <option value=t_c>Titl+Cont
    </select>
    /* formÀÇ select¹®À» ÀÌ¿ëÇؼ­ °Ë»ö ¸ðµå¸¦ ¸¸µì´Ï´Ù. °Ë»ö Ç׸ñÀº $findtype·Î Àü´ÞÇÕ´Ï´Ù. */
        
    </font></td>
    <td bgcolor=black width=150>
    <input type=text name=findname size=14>
    /* °Ë»öÇÒ ´Ü¾î¸¦ $findname º¯¼ö·Î Àü´ÞÇÕ´Ï´Ù. */
    </td>


    <td bgcolor=black width=100>
    <input type=submit value=Find>
    /* °Ë»ö Ç׸ñ($findtype)°ú °Ë»ö ´Ü¾î($findname)À» Àü´ÞÇϱâ À§ÇØ submit ¹öÆ°À» »ý¼ºÇÕ´Ï´Ù. */
        
    </td>
    </tr>
    </table>
    </center>
    </html>
    ");

edit_libchal($putally2,$no,$f,$f2,$putuser) ÇÔ¼ö

    µî·ÏµÈ °æ¸Å ±ÛÀÇ ³»¿ëÀ» ¼öÁ¤ÇÕ´Ï´Ù.

    $putally2 - ƯÁ¤ °æ¸ÅÀÇ Á¤º¸¸¦ ¹è¿­·Î ÀúÀåÇؼ­ Àü´ÞÇÕ´Ï´Ù.
    $no - ƯÁ¤ °æ¸ÅÀÇ ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù.
    $putuser - ƯÁ¤ IDÀÇ Á¤º¸¸¦ ¹è¿­·Î ÀúÀåÇؼ­ Àü´ÞÇÕ´Ï´Ù.

form¹® ¸¸µé±â

    ÇØ´ç °æ¸ÅÀÇ ¼öÁ¤ Ç׸ñÀ» µ¥ÀÌÅͺ£À̽º¿¡ ÀúÀåÇϱâ À§ÇØ ÀÎÀÚ¸¦ Àü´ÞÇÏ´Â form¹®À» ¸¸µì´Ï´Ù. 


    <form method=post action=main_view.php>
    <input type=hidden name=chanl value=edit_libchal_in>
    /* main_view.php ÆÄÀÏÀÇ $chanl=edit_libchal_in Ç׸ñÀ» ½ÇÇàÇÕ´Ï´Ù. */


    <input type=hidden name=f value=$f>
    <input type=hidden name=f2 value=$f2>
    /* ÇØ´ç °æ¸ÅÀÇ ¸ÞÀÎ Å×À̺í À̸§°ú ÀÔÂûÀÚ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù. */


    <input type=hidden name=no value=$no>
    /* ÇØ´ç °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ Àü´Þ ÇÕ´Ï´Ù. */

view_title($putally2,$ally3,$no,$f,$f2,$putuser) ÇÔ¼ö

    ƯÁ¤ °æ¸Å ±ÛÀ» Ŭ¸¯ÇÏ¸é º¸¿©ÁÖ´Â Ç׸ñÀÔ´Ï´Ù.
    ¿©±â¿¡´Â °æ¸ÅÀÇ ¼¼ºÎÀûÀÎ ³»¿ë°ú ÀÔÂûÀÚ ¼øÀ§, °æ¸Å »èÁ¦, ÀÔÂû µîÀÇ ±â´ÉÀÌ ÀÖ½À´Ï´Ù.

    $putally2 - ƯÁ¤ °æ¸ÅÀÇ Á¤º¸¸¦ ¹è¿­·Î ÀúÀåÇؼ­ Àü´ÞÇÕ´Ï´Ù.
    $ally3 - ƯÁ¤ °æ¸ÅÀÇ ÀÔÂûÀÚ Á¤º¸(ÀÔÂû±Ý¾×À» ³»¸²Â÷¼øÀ¸·Î Á¤·Ä)¸¦ ¹è¿­·Î ÀúÀåÇؼ­ Àü´Þ ÇÕ´Ï´Ù.
    $no - ƯÁ¤ °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù.
        
    ÀÌÈÄ º¯¼ö´Â ¾ÕÀÇ ÇÔ¼ö¿Í µ¿ÀÏÇÕ´Ï´Ù.

¼±ÅÃÇÑ °æ¸Å ±Û Á¤º¸ º¸¿©ÁÖ±â

    °æ¸ÅÀÇ ¼¼ºÎ Á¤º¸ È­¸é¿¡¼­ ÇØ´ç °æ¸Å¿¡ ´ëÇÑ ¼¼ºÎÀûÀÎ Á¤º¸¸¦ º¸¿© ÁÖ±â À§ÇØ ¸¸µì´Ï´Ù.


    $content=nl2br($putally2[content]) ;
    /* ÇØ´ç °æ¸ÅÀÇ ¼³¸í ºÎºÐ¿¡¼­ nl ºÎºÐÀ» <br>·Î º¯È¯Çؼ­ $content º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù.*/


    <tr>
    <td bgcolor=#808080 align=center width=100>
    <font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>$putally2[edate]:¸¶°¨</b></font></td>
    /* ÇØ´ç °æ¸ÅÀÇ ¸¶°¨ ½Ã°£À» Ãâ·ÂÇÕ´Ï´Ù. */


    <td bgcolor=#808080 align=center width=200><a href = mailto:$putally2[email] >
    <font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>name:$putally2[name]</b></font></a></td>
    /* ÇØ´ç °æ¸ÅÀÇ µî·ÏÀÚ¸¦ Ãâ·ÂÇÏ°í ¸ÞÀÏ ÁÖ¼Ò¸¦ ¸µÅ©ÇÕ´Ï´Ù. */


    <td bgcolor=#808080 align=center width=280>
    <font style='font-size:13px;font-style:italic;color:red'>
    <b>񃧯money:$putally2[smoney]</b></font></td>
    /* ÇØ´ç °æ¸ÅÀÇ ±âº» ±Ý¾×À» Ãâ·ÂÇÕ´Ï´Ù. */
        
    </tr>
    <tr>
    <table border=0 cellspacing=2 cellpadding=2 width=700 height=250>
    <td bgcolor=black valign=top colspan=3 width=700 height=250>
    <font style='font-size:13px;font-style:italic;color:blue'><b>$content</b></font></td>
    /* ÇØ´ç °æ¸ÅÀÇ ¼³¸íÀ» Ãâ·ÂÇÕ´Ï´Ù. */
    </tr>

ÀÔÂûÀÚ ¼øÀ§ º¸¿©ÁÖ±â

    °æ¸Å ¼¼ºÎ È­¸é ÇÏ´Ü¿¡ ÇØ´ç °æ¸Å¿¡ ÀÔÂûÇÑ ÀÔÂûÀÚÀÇ ¼øÀ§¸¦ º¸¿© ÁÝ´Ï´Ù.


    for($a=1 ; $a < 5 ; $a++)
    {
      $put2=mysql_fetch_array($ally3);
      /* ÇØ´ç °æ¸Å ÀÔÂûÀÚÀÇ Á¤º¸¸¦ ¹è¿­·Î ÀúÀåÇÕ´Ï´Ù.*/


      if($put[smoney]<$put2[bmoney])
      {
      /* ÇØ´ç °æ¸ÅÀÇ ±âº» ±Ý¾×ÀÌ ÀÔÂû ±Ý¾×º¸´Ù ÀÛÀ» ¶§ ½ÇÇàÇÕ´Ï´Ù.*/

        echo("
        <tr>
        <td bgcolor=black align=center width=150>
        <font style='font-size:13px;font-style:italic;color:#fffff0'><b>$a</b></td>
        /* for¹®¿¡ ÀÇÇØ $a´Â Â÷·Ê·Î 5º¸´Ù ÀÛÀ» ¶§±îÁö ¼ýÀÚ¸¦ Ãâ·ÂÇÕ´Ï´Ù. */


        <td bgcolor=black align=center width=150><a href = mailto:$put2[email] >
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$put2[name]</b></font></a></td>
        /* ÀÔÂûÀÚÀÇ À̸§À» Ãâ·ÂÇÏ°í ¸ÞÀÏ ÁÖ¼Ò¸¦ ¸µÅ©ÇÕ´Ï´Ù. */


        <td bgcolor=black align=center width=200>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$put2[tel]</b></font></td>
        /* ÀÔÂûÀÚÀÇ ÀüÈ­ ¹øÈ£¸¦ Ãâ·ÂÇÕ´Ï´Ù. */


        <td bgcolor=black align=center ><font style='font-size:13px;font-style:italic;color:red'>
        <b>$put2[bmoney]</b></font></td>
        /* ÀÔÂûÀÚÀÇ ÀÔÂû±Ý¾×À» Ãâ·ÂÇÕ´Ï´Ù.
           ÀÌ ºÎºÐÀº ÀÔÂû ±Ý¾×ÀÌ Á¦ÀÏ ³ôÀº »ç¶÷ÀÇ °"ݸ¸ Ãâ·ÂÇÏ°í ÀÔÂûÀÚÀÇ À̸§Àº È­¸é¿¡ Ãâ·ÂÇÏÁö ¾Ê´Â ¹æ¹ýµµ
           ÀÖÁö¸¸ ¿©±â¼­´Â ÀÔÂûÀÚÀÇ Á¤º¸¸¦ ¸ðµÎ °ø°³ Çß½À´Ï´Ù. */
        </tr>
        ");
      }
    }

´Ù¸¥ È­¸é ¸µÅ© ¹öÆ° ¸¸µé±â

    °æ¸Å ¼¼ºÎ Ç׸ñ¿¡¼­ ÀÔÂû, °æ¸Å ¸ÞÀÎ È­¸é, °æ¸Å ¼öÁ¤Çϱâ, °æ¸Å Áö¿ì±â, ÀÔÂû »èÁ¦·Î À̵¿ÇÏ´Â ¹öÆ°À»
    ¸¸µì´Ï´Ù.   °¢ ¹öÆ°Àº ¾Õ¿¡ ³ª¿­ÇÑ ¼øÀ¸·Î Á¤·ÄµÇ¾î ÀÖ½À´Ï´Ù.


    <tr>
    <td bgcolor=black >
    <a href =main_view.php?chanl=input_newlibchal&tnum=$no&f=$f&f2=$f2>
    <img src=write.gif border=0></a></td>
    /* ÇØ´ç °æ¸Å ÀÔÂû È­¸éÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. */


    <td bgcolor=black ><a href =main_view.php?chanl=main_view&f=$f&f2=$f2>
    <img src=list.gif border=0></a></td>
    /* °æ¸Å ¸ÞÀÎ È­¸éÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. */
    <td bgcolor=black ><a href =main_view.php?chanl=edit_libchal&no=$no&f=$f&f2=$f2>
    <img src=rewrite.gif border=0></a></td>
    /* ÇØ´ç °æ¸Å ¼öÁ¤ È­¸éÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. */


    <td bgcolor=black ><a href =main_view.php?chanl=del&no=$no&f=$f&f2=$f2>
    <img src=delete1.gif border=0></a></td>
    /* ÇØ´ç °æ¸Å Áö¿ì±â È­¸éÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. */


    <td bgcolor=black ><a href =main_view.php?chanl=del_lib&no=$no&f=$f&f2=$f2>
    <img src=delete2.gif border=0></a></td>
    </tr>
    /* ÇØ´ç °æ¸Å ÀÔÂû »èÁ¦ È­¸éÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. */

input_newlibchal($tnum,$f,$f2,$putuser) ÇÔ¼ö

    ÇØ´ç °æ¸Å¿¡ ÀÔÂûÀ» ÇÏ´Â È­¸éÀÔ´Ï´Ù.
        
    $putuser º¯¼öÀÇ Á¤º¸¸¦ ÀÌ¿ëÇؼ­ ÀÔÂûÀÚÀÇ Á¤º¸¸¦ º¸¿© ÁÖ¸ç ÀÔÂû ±Ý¾× ºÎºÐ¸¸ ÀÔ·ÂÇÏ¸é µË´Ï´Ù.
    $tnum - ÇØ´ç °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù.

form¹® ¸¸µé±â

    ÀÔÂû È­¸é¿¡¼­ ÀÔÂû ±Ý¾×À» Àü´ÞÇÏ°í ³ª¸ÓÁö Å×À̺í Á¤º¸¸¦ Àü´ÞÇÕ´Ï´Ù.


    <form method=post action=main_view.php>
    <input type=hidden name=chanl value=input_newlibchal>
    <input type=hidden name=chanl2 value=input_newlibchal2>
    /* main_view.php ÆÄÀÏÀÇ $chanl= input_newlibchal , $chanl2= input_newlibchal2ÀÎ Ç׸ñÀ» ½ÇÇàÇÕ´Ï´Ù. */
    <input type=hidden name=tnum value=$tnum>
    /* ÇØ´ç °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ ÀÔÂû ¹øÈ£ º¯¼ö·Î($tnum) Àü´ÞÇÕ´Ï´Ù. */
    <input type=hidden name=no value=$tnum>
    /* ÇØ´ç °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù. */


    <input type=hidden name=f value=$f>
    <input type=hidden name=f2 value=$f2>
    /* °æ¸ÅÀÇ ¸ÞÀÎ Å×À̺í À̸§°ú ÀÔÂûÀÚ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù. */

ÀÔÂûÀÚ Á¤º¸¿Í ÀÔÂû ±Ý¾× ÀԷ¶õ ¸¸µé±â

    ·Î±×ÀÎÇÑ ID ¼¼¼ÇÀ» ÀÌ¿ëÇؼ­ ÀÔÂûÀÚÀÇ Á¤º¸¸¦ Ãâ·ÂÇÏ°í ÀÔÂû ±Ý¾× ÀԷ¶õÀ» ¸¸µì´Ï´Ù.


    <tr>
    <td width=50 bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Name</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    $putuser[name]</font></td>
    /* ÀÔÂûÀÚÀÇ À̸§À» Ãâ·ÂÇÕ´Ï´Ù. */


    <td width=100 bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~E-mail</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    $putuser[email]</font></td>
    </tr>
    /* ÀÔÂûÀÚÀÇ ¸ÞÀÏ ÁÖ¼Ò¸¦ Ãâ·ÂÇÕ´Ï´Ù. */
    <tr>
    <td width=100 bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Tel</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    $putuser[tel1]</font></td>
    /* ÀÔÂûÀÚÀÇ ÀüÈ­ ¹øÈ£¸¦ Ãâ·ÂÇÕ´Ï´Ù. */


    <td width=100 bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~ÀÔÂû±Ý¾×</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=bmoney size=10>won</font></td>
    </tr>
    /* ÀÔÂûÀÚÀÇ ÀÔÂû ±Ý¾× ÀԷ¶õÀ» ¸¸µì´Ï´Ù. */

input_view($f,$f2,$connect,$putuser) ÇÔ¼ö

    »õ·Î¿î °æ¸Å¸¦ µî·ÏÇÏ´Â È­¸éÀÔ´Ï´Ù. ÇÔ¼öÀÇ Àü´Þ ÀÎÀÚ´Â ¾ÕÀÇ ÇÔ¼öµé°ú °°½À´Ï´Ù.

form¹® ¸¸µé±â

    °æ¸ÅÀÇ ÀÔ·Â Ç׸ñµéÀ» Àü´ÞÇϱâ À§ÇØ form¹®À» »ç¿ëÇÕ´Ï´Ù.


    <form method=post action=main_view.php>
    <input type=hidden name=chanl value=input_new>
    /* main_view.php ÆÄÀÏÀÇ $chanl=input_newÀÎ Ç׸ñÀ» ½ÇÇàÇÕ´Ï´Ù. */


    <input type=hidden name=f value=$f>
    <input type=hidden name=f2 value=$f2>
    /* ÇØ´ç °æ¸ÅÀÇ ¸ÞÀÎ Å×À̺í À̸§°ú ÀÔÂûÀÚ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù. */

ID Á¤º¸ Ãâ·Â°ú ÀÔ·Â Ç׸ñ ¸¸µé±â

    »çÀÌÆ® Á¢¼Ó ¶§ »ç¿ëÇÑ IDÀÇ ¼¼¼ÇÀ» ÀÌ¿ëÇؼ­ °æ¸Å µî·ÏÀÚÀÇ Á¤º¸¸¦ Ãâ·ÂÇÏ°Ô ÇÏ°í ³ª¸ÓÁö °æ¸Å ÀԷ¶õÀ» ¸¸µì´Ï´Ù.


    <table border=0 cellspacing=2 cellpadding=2 width=700 >
    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Title</b></font></td>


    <td bgcolor=black align=left><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=title size=44> </font></td>
    </tr>
    /* °æ¸ÅÀÇ Á¦¸ñÀ» ÀÔ·ÂÇÏ´Â Ç׸ñÀÔ´Ï´Ù. $title·Î Àü´ÞÇÕ´Ï´Ù. */


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Name</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    $putuser[name]</font></td>
    </tr>
    /* °æ¸Å µî·ÏÀÚÀÇ À̸§À» È­¸é¿¡ Ãâ·ÂÇÕ´Ï´Ù. */


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~E-mail</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    $putuser[email]</font></td>
    </tr>
    /* °æ¸Å µî·ÏÀÚÀÇ ¸ÞÀÏ ÁÖ¼Ò¸¦ È­¸é¿¡ Ãâ·ÂÇÕ´Ï´Ù. */


    <tr>
    <td bgcolor=#808080>
    <font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Tel</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    $putuser[tel1]</font></td>
    </tr>
    /* °æ¸Å µî·ÏÀÚÀÇ ÀüÈ­¹øÈ£¸¦ È­¸é¿¡ Ãâ·ÂÇÕ´Ï´Ù.  ¸¶°¨½Ã°£ ÀÔ·ÂÀÇ °æ¿ì select¹®À» ³ª¿­ÇÏ´Â ¹æ¹ýÀ» »ç¿ëÇß½À´Ï´Ù. */


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~±âº»±Ý¾×</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#ff1493'>
    <input type=int name=smoney size=10><b>Won</b></font></td>
    </tr>
    /* °æ¸ÅÀÇ ±âº» ±Ý¾×À» ÀÔ·ÂÇÏ´Â Ç׸ñÀÔ´Ï´Ù. $smoney·Î Àü´ÞÇÕ´Ï´Ù. */


    <tr>
    <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Content</b></font></td>
    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <textarea name=content rows=10 cols=70></textarea></font></td>
    </tr>
    /* °æ¸ÅÀÇ ¼¼ºÎÀûÀÎ ³»¿ëÀ» Àû´Â Ç׸ñÀÔ´Ï´Ù. $content·Î Àü´ÞÇÕ´Ï´Ù. */


    <tr>
    <td bgcolor=black align=center colspan=4>
    <font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=submit value=°æ¸Åµî·Ï>
    <input type=reset  value=Áö¿ì±â></font></td>
    </tr>
    /* ÀÔ·Â Ç׸ñµéÀ» Àü´ÞÇϱâ À§ÇÑ "°æ¸Åµî·Ï" ¹öÆ°À» »ý¼ºÇÏ°í, »õ·ÎÀÌ ÀÔ·ÂÇϱâ À§ÇÑ "Áö¿ì±â" ¹öÆ°À» »ý¼ºÇÕ´Ï´Ù. */

del($no,$tnum,$f,$f2,$root,$putuser) ÇÔ¼ö

    µî·ÏÇÑ °æ¸Å¸¦ Áö¿ì±â À§ÇØ Æнº¿öµå ÀÔ·Â È­¸éÀ» Ãâ·ÂÇÏ´Â ÇÔ¼öÀÔ´Ï´Ù.

    $no - ÇØ´ç °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù.
    $tnum - °æ¸Å °íÀ¯ ¹øÈ£¿¡ ÀÔÂûÇÑ ÀÔÂû ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù.

form¹® ¸¸µé±â

    ÇØ´ç °æ¸Å¿Í ÀÔÂûÀÚ¸¦ Áö¿ì±â À§ÇØ ¿©·¯ Á¤º¸¸¦ Àü´ÞÇÕ´Ï´Ù.


    <form method=post action=main_view.php>
    <input type=hidden name=chanl value=del_no>
    /* main_view.php ÆÄÀÏÀÇ $chanl= del_noÀÎ Ç׸ñÀ» ½ÇÇàÇÕ´Ï´Ù. */


    <input type=hidden name=tnum value=$no>
    /* ÇØ´ç °æ¸Å ¹øÈ£¸¦ ÀÔÂûÀÚ ¹øÈ£¿¡ »ç¿ëÇÕ´Ï´Ù. ÀÌ°ÍÀº ÇØ´ç °æ¸Å¿¡ ÀÔÂûÇÑ ÀÔÂûÀÚ¸¸À» »èÁ¦Çϱâ À§ÇÔÀÔ´Ï´Ù. */


    <input type=hidden name=no value=$no>
    /* ÇØ´ç °æ¸Å ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù. */


    <input type=hidden name=f value=$f>
    <input type=hidden name=f2 value=$f2>
    /* °æ¸Å ¸ÞÀÎ Å×À̺í À̸§°ú ÀÔÂûÀÚ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù. */

Æнº¿öµå ÀԷ¶õ ¸¸µé±â

    <tr>
    <td bgcolor=#808080 width=74><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~passw</b></font></td>
    <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=password name=passwd size=10></font></td>
    /* ÇØ´ç °æ¸Å µî·ÏÀÚÀÇ Æнº¿öµå ÀÔ·Â Ç׸ñÀÔ´Ï´Ù. Type´Â passwordÀÔ´Ï´Ù. */


    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=submit value=Áö¿ì±â>
    /* Æнº¿öµå¿Í ³ª¸ÓÁö Ç׸ñµéÀ» Àü´ÞÇÏ´Â "Áö¿ì±â" ¹öÆ°À» »ý¼ºÇÕ´Ï´Ù. */


    </font></td>
    </tr>
    <tr>
    <td bgcolor=#808080 width=74><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Name</b></font></td>
    <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
    $putuser[name]</font></td>
    </tr>
    /* »çÀÌÆ®¸¦ ·Î±×ÀÎÇÑ IDÀÇ »ç¿ëÀÚ À̸§À» Ãâ·ÂÇÕ´Ï´Ù. */

del_lib($no,$tnum,$f,$f2,$root,$putuser) ÇÔ¼ö

    ƯÁ¤ °æ¸Å¿¡ ÀÔÂûÇÑ ÀÔÂûÀÚ°¡ ÀÔÂûÀ» »èÁ¦Çϱâ À§ÇÑ È­¸éÀÔ´Ï´Ù.
    ÇÔ¼öÀÇ Àü´Þ ÀÎÀÚ´Â °æ¸Å »èÁ¦ È­¸éÀ» Ãâ·ÂÇÏ´Â ÇÔ¼ö¿Í °°½À´Ï´Ù.

form¹® ¸¸µé±â

    ÀÔÂûÀ» »èÁ¦Çϱâ À§ÇØ ÀÔÂû µî·ÏÀÚÀÇ Æнº¿öµå¿Í ³ª¸ÓÁö Á¤º¸¸¦ Àü´ÞÇÏ´Â form¹®À» ¸¸µì´Ï´Ù.


    <form method=post action=main_view.php>
    <input type=hidden name=chanl value=del_lib2>
    /* main_view.php ÆÄÀÏÀÇ $chanl= del_lib2ÀÎ Ç׸ñÀ» ½ÇÇàÇÕ´Ï´Ù. */

  
    <input type=hidden name=tnum value=$no>
    <input type=hidden name=no value=$no>
    /* ÀÔÂûÀÚÀÇ ¹øÈ£¿Í ÇØ´ç °æ¸ÅÀÇ °íÀ¯ ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù. */

     
    <input type=hidden name=f value=$f>
    <input type=hidden name=f2 value=$f2>
    /* °æ¸Å ¸ÞÀÎ Å×À̺í À̸§°ú ÀÔÂûÀÚ Å×À̺í À̸§À» Àü´ÞÇÕ´Ï´Ù. */

Æнº¿öµå ÀԷ¶õ°ú Á¢¼ÓÀÚ Ãâ·ÂÇϱâ

    ÀÔÂû »èÁ¦¸¦ À§ÇÑ Æнº¿öµå ÀԷ¶õÀ» ¸¸µé°í ÇöÀç ÀÌ Ç׸ñÀ» Ŭ¸¯ÇÑ »ç¿ëÀÚ¸¦ Ãâ·ÂÇÕ´Ï´Ù.


    <td bgcolor=#808080 width=74><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Name</b></font></td>
    <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
    $putuser[name]</font></td>
    </tr>
    /* »çÀÌÆ®¿¡ Á¢¼ÓÇÑ ID ¼¼¼Ç¿¡ ÇØ´çÇÏ´Â »ç¿ëÀÚ À̸§À» Ãâ·ÂÇÕ´Ï´Ù. */


    <tr>
    <td bgcolor=#808080 width=74><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~passw</b></font></td>
    <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=password name=passwd size=9></font></td>
    /* ÀÔÂû »èÁ¦¸¦ À§ÇÑ Æнº¿öµå ÀÔ·Â Ç׸ñÀÔ´Ï´Ù. */


    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=submit value=Áö¿ì±â>
    </font></td>
    /* Æнº¿öµå¿Í ³ª¸ÓÁö Á¤º¸¸¦ Àü´ÞÇÏ´Â "Áö¿ì±â" ¹öÆ°À» »ý¼ºÇÕ´Ï´Ù. */

title_end($putally2,$ally3,$no,$f,$f2) ÇÔ¼ö

    °æ¸Å°¡ ¸¶°¨ÇßÀ» °æ¿ì ÇØ´ç °æ¸ÅÀÇ Á¦¸ñÀ» Ŭ¸¯ÇÏ¸é º¸¿©ÁÖ´Â È­¸éÀÔ´Ï´Ù.

    $putally2 - ÇØ´ç °æ¸ÅÀÇ Á¤º¸¸¦ ¹è¿­·Î ÀúÀåÇؼ­ Àü´ÞÇÕ´Ï´Ù.
    $ally3 - ÇØ´ç °æ¸Å ÀÔÂûÀÚÀÇ Á¤º¸¸¦ ¹è¿­·Î ÀúÀåÇؼ­ Àü´ÞÇÕ´Ï´Ù.

³«ÂûÀÚ Ãâ·Â Çϱâ

    °æ¸Å°¡ ¸¶°¨ÇßÀ» °æ¿ì ³«ÂûÀÚÀÇ Ãâ·ÂÀ» º¸¿© ÁÖ´Â ºÎºÐÀÔ´Ï´Ù.


    for($a=1 ; $a < 2 ; $a++)
    {
    /* ÀÌ for¹®Àº ¾ÕÀÇ °æ¸Å ¼¼ºÎ Á¤º¸ º¸±â¿¡¼­ »ç¿ëÇÑ ±¸¹®ÀÌÁö¸¸ $a°¡ 2º¸´Ù ÀÛÀ» ¶§±îÁö¸¸ ¼öÇàÇÕ´Ï´Ù.
       ÀÌ°ÍÀº ¿ÀÁ÷ ÀÔÂûÀÚÁß ÇÑ »ç¶÷¸¸ Ãâ·ÂÇÏ°Ô ÇÏ·Á´Â °ÍÀÔ´Ï´Ù. */


      $put2=mysql_fetch_array($ally3);


      if($putally2[smoney]<$put2[bmoney])
      {

        echo("
        <tr>
        <td bgcolor=black align=center><a href = mailto:$put2[email] >
        <font style='font-size:13px;font-style:italic;color:#fffff0'>


        <b>$put2[name]</b></font></a></td>
        /* ±âº» ±Ý¾×ÀÌ ÀÔÂû ±Ý¾× º¸´Ù ÀÛÀ» °æ¿ì ÀÔÂûÀÚÀÇ À̸§À» Ãâ·ÂÇÕ´Ï´Ù. */


        <td bgcolor=black align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$putally2[edate]</b></font></td>
        /* ¸¶°¨ ³¯Â¥¸¦ Ãâ·ÂÇÕ´Ï´Ù. */


        <td bgcolor=black align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$put2[tel]</b></font></td>
        /* ÀÔÂûÀÚÀÇ ÀüÈ­¹øÈ£¸¦ Ãâ·ÂÇÕ´Ï´Ù. */


        <td bgcolor=black align=center>
        <font style='font-size:13px;font-style:italic;color:red'>
        <b>$put2[bmoney]</b></font></td>
        </tr>
        /* ÀÔÂûÀÚÀÇ ÀÔÂû ±Ý¾×À» Ãâ·ÂÇÕ´Ï´Ù. */
        ");
      }
    }

s_mail($putally2,$ally3,$no,$f,$f2) ÇÔ¼ö

    ÇØ´ç °æ¸Å°¡ ¸¶°¨µÇ¸é ¸ÅµµÀÚ¿Í ³«ÂûÀÚ¿"Ô ¸ÞÀÏÀ» º¸³»´Â ÇÔ¼öÀÔ´Ï´Ù.

³«ÂûÀÚ¿Í ¸ÅµµÀÚ¿"Ô º¸³¾ ¸Þ½ÃÁö ¸¸µé±â

    for($a=1 ; $a < 2 ; $a++)
    {
      $put2=mysql_fetch_array($ally3);


      if($putally2[smoney]<$put2[bmoney])
      {
        $message = " <b>No</b>  $no  <b>title</b> : $putally2[title]<br>
        <b>³«ÂûÀÚ</b> $put2[name] <b>¸¶°¨½Ã°£</b> $putally2[edate]<br>
        <b>Tel</b> $put2[tel]  <b>³«Âû±Ý¾×</b>  $put2[bmoney]<br>
        <b>¸ÅµµÀÚ</b> $putally2[name] <b>¸ÅµµÀÏ</b> $putally2[wdate]<br>
        <b>Tel</b> $putally2[tel] <b>±âº»±Ý¾×</b> $putally2[smoney] <br><br>


        <b>°øÁö</b><br>
        ³«Âû ¸ÅÀÏ È®ÀÎ ÈÄ °æ¸Å °Ô½ÃÆÇÀÇ °æ¸Å ±ÛÀ» Á÷Á¢ »èÁ¦ Çϼ¼¿ä~!";
      }
    }
    /* ÀÔÂûÀÚ Áß Á¦ÀÏ ³ôÀº ±Ý¾×ÀÇ ÀÔÂûÀÚ 1¸íÀÇ Á¤º¸¸¦ $message º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */

¸ÞÀÏ º¸³»±â

    ³«ÂûÀÚ¿Í ¸ÅµµÀÚÀÇ Á¤º¸¸¦ ¸ÞÀÏ·Î °¢°¢ º¸³À´Ï´Ù.

    $su = " No $no ³«Âû ";
    /* ³«Âû ¹øÈ£¸¦ ¸ÞÀÏ Á¦¸ñ($su)¿¡ ÀúÀåÇÕ´Ï´Ù. */

    $rp = "$put2[email]";
    /* ³«ÂûÀÚÀÇ ¸ÞÀÏ ÁÖ¼Ò¸¦ ÇØ´ç º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */

    $rp1 = "$putally2[email]";
    /* ¸ÅµµÀÚÀÇ ¸ÞÀÏ ÁÖ¼Ò¸¦ ÇØ´ç º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */

    mail($rp , $su ,$message);
    mail($rp1 , $su ,$message);
    /* ¸ÅµµÀÚ¿Í ³«ÂûÀÚ¿"Ô ¸ÞÀÏÀ» º¸³À´Ï´Ù. */

main_view.php Àüü ÄÚµå

    <?php

    session_start();

    //////////////////////////////////////////////////
    //
    //    ÀÏÀÚ : 2000.2.15 am 5
    //   ÀÛ¼ºÀÚ: skycry (hong il)
    //
    //
    //   method : main_view
    //
    //////////////////////////////////////////////////
    ?>


    <?php

    if($username)
    {
      include('func_all.php');
      if($chanl == new_libchal && $username != guest)
      {
        input_view($f,$f2,$connect,$putuser) ;
        mysql_close($connect);
      }


      if($chanl == input_new && $username != guest)
      {

        if($edata4 == am && $edata5 == 12)
        {
          $ap = "00" ;
        }
                
        if($edata4 == pm && $edata5 == 12)
        {
          $ap = "12" ;
        }

        if($edata4 == am)
        {
          $ap = $edata5 ;
        }
 
        if($edata4 == pm)
        {
          $ap = $edata5 +"12" ;
        }


        $edate = "$edata1-$edata2-$edata3-$ap-$edata6";
        error_view($title,$smoney,$edate,$content,$f,$f2);


        mysql_select_db('libchal',$connect);//function
        $max = mysql_query("select max(no) from $f ",$connect );
        $new_no = mysql_result($max,0,0);
        $no = $new_no + "1" ;


        if(!(int)$smoney)
        {
          echo("
          <script>
          window.alert('±Ý¾×À» ´Ù½Ã ÀÔ·Â Çϼ¼¿ä..')
          history.go(-1)
          </script>
          ");
          exit;
        }


        $wdate = date("y-m-d");


        mysql_query("insert into $f(no,title,name,email,tel,smoney,content,edate,wdate)
        values('$no','$title','$putuser[name]','$putuser[email]','$putuser[tel1]',
        '$smoney','$content','$edate','$wdate')",$connect);
        echo("
        <html>
        <body>
        <center>
        <form method=post action=main_view.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>±ÛÀÌ µî·Ï µÇ¾ú½À´Ï´Ù</b></font>
        <input type=hidden name=chanl value=main_view>
        <input type=hidden name=f value=$f>
        <input type=hidden name=f2 value=$f2>
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");

        mysql_close($connect);
      }


      if($chanl == input_newlibchal && $username != guest)
      {

        if($chanl2 == input_newlibchal2 && $username != guest)
        {

          if(!(int)$bmoney || !$bmoney)
          {
            echo("
            <script>
            window.alert('±Ý¾×À» ´Ù½Ã ÀÔ·Â Çϼ¼¿ä..')
            history.go(-1)
            </script>
            ");
            exit;
          }


          if($putup2[name] == $putuser[name])
          {
            echo("
            <script>
            window.alert('ÀÔÂûÀº Çѹø¸¸ °¡´É ÇÕ´Ï´Ù.')
            history.go(-1)
            </script>
            ");
            exit;
          }


          if($putally2[smoney] >= $bmoney)
          {
            echo("
            <script>
            window.alert('ÀÔÂûÀº ±âº» ±Ý¾× º¸´Ù ³ô¾Æ¾ß ÇÕ´Ï´Ù..')
            history.go(-1)
            </script>
            ");
            exit;
          }


          mysql_select_db('libchal',$connect);
          $sise = $putup[sise] + "1" ;


          mysql_query("insert into $f2(name,bmoney,tel,email,tnum)
          values('$putuser[name]','$bmoney','$putuser[tel1]','$putuser[email]','$tnum')",$connect);


          mysql_query("update $f set sise='$sise'  where no='$tnum'",$connect);

 
          echo("
          <html>
          <body>
          <center>
          <form method=post action=main_view.php>
          <font style='font-size:13px;font-style:italic;color:#808080'>
          <b>±ÛÀÌ µî·Ï µÇ¾ú½À´Ï´Ù</b></font>


          <input type=hidden name=chanl value=main_view>
          <input type=hidden name=f value=$f>
          <input type=hidden name=f2 value=$f2>
          <input type=submit value=È®ÀÎ>
          </form>
          </center>
          </body>
          </html>
          ");
        }
        else
        {
          input_newlibchal($tnum,$f,$f2,$putuser) ;
        }

        mysql_close($connect);
      }


      if($chanl == edit_libchal && $username != guest)
      {
        edit_libchal($putally2,$no,$f,$f2,$putuser) ;
        mysql_close($connect);
      }


      if($chanl == edit_libchal_in && $username != guest)
      {
        if($edata4 == am && $edata5 == 12)
        {
          $ap = "00" ;
        }
        if($edata4 == pm && $edata5 == 12)
        {
          $ap = "12" ;
        }
        if($edata4 == am)
        {
          $ap = $edata5 ;
        } 
        if($edata4 == pm)
        {
          $ap = $edata5 +"12" ;
        }


        $edate = "$edata1-$edata2-$edata3-$ap-$edata6";
        error_view($title,$smoney,$edate,$content,$f,$f2);


        $input=mysql_query("select password('$passwd') ",$connect );
        $inputpassw = mysql_result($input,0,0);


        if($putuser[passwd] == $inputpassw)
        {

          if(!(int)$smoney)
          {
            echo("
            <script>
            window.alert('±Ý¾×À» ´Ù½Ã ÀÔ·Â Çϼ¼¿ä..')
            history.go(-1)
            </script>
            ");
            exit;
          }

          mysql_select_db('libchal',$connect);//function
          mysql_query("update $f set title='$title', smoney='$smoney' , edate='$edate'
          , content='$content' where no = '$no'",$connect);
          mysql_close;
        }
        else
        {
          echo("
          <script>
          window.alert('passw°¡ Ʋ·È½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
          </script>
          ");
          exit;
        }


        echo("
        <html>
        <body>
        <center>
        <form method=post action=main_view.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>±ÛÀÌ ¼öÁ¤ µÇ¾ú½À´Ï´Ù</b></font>
        <input type=hidden name=no value=$no>
        <input type=hidden name=chanl value=main_view>
        <input type=hidden name=f value=$f>
        <input type=hidden name=f2 value=$f2>
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");
        mysql_close($connect);
      }


      if($chanl == title)
      {
        mysql_select_db('libchal',$connect);//function
        mysql_query("update $f set hit = '$putup[hit]'+1 where no = '$no'",$connect) ;
        view_title($putally2,$ally3,$no,$f,$f2,$putuser) ;
      }


      if($chanl == main_view)
      {
        $s_mail = s_mail($putally2,$ally3,$no,$f,$f2);


        mysql_select_db('adminp',$connect);
        mysql_query("update admin set sum='$t_num' where mview = '$f'",$connect);
        main_view($s_mail,$t_num,$ally,$page,$findtype,$findname,$f,$f2,$root,$username,
        $putuser);
        mysql_close($connect);
      }


      if($chanl == del)
      {
        del($no,$tnum,$f,$f2,$root,$putuser);
      }

      if($chanl == del_no && $username != guest)
      {

        $input=mysql_query("select password('$passwd') ",$connect );
        $inputpassw = mysql_result($input,0,0);


      if($putuser[passwd] == $inputpassw || $root)
      {
        mysql_select_db('libchal',$connect);//function
        $mldel = "delete from $f where no=$no && name='$putuser[name]'";
        $rsult = mysql_query($mldel,$connect);
        $ml2del = "delete from $f2 where tnum=$tnum && name='$putuser[name]'";
        $rsult2 = mysql_query($ml2del,$connect);
      }
      else
      {
        echo("
        <script>
        window.alert('passw°¡ Ʋ¸³´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
        }


        echo("
        <html>
        <body>
        <center>
        <form method=post action=main_view.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>°æ¸Å°¡ »èÁ¦ µÇ¾ú½À´Ï´Ù</b></font>
        <input type=hidden name=no value=$no>
        <input type=hidden name=chanl value=main_view>
        <input type=hidden name=f value=$f>
        <input type=hidden name=f2 value=$f2>
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");
        mysql_close($connect);
      }


      if($chanl == del_lib)
      {
        del_lib($no,$tnum,$f,$f2,$root,$putuser);
      }


      if($chanl == del_lib2 && $username != guest)
      {

        $input=mysql_query("select password('$passwd') ",$connect );
        $inputpassw = mysql_result($input,0,0);


        if($putuser[passwd] == $inputpassw || $root)
        {
          mysql_select_db('libchal',$connect);//function
          $ml2del = "delete from $f2 where name='$putuser[name]' && tnum='$no' ";
          $rsult2 = mysql_query($ml2del,$connect);
        }
        else
        {
          echo("
          <script>
          window.alert('passw°¡ Ʋ·È½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
          </script>
          ");
          exit;
        }


        echo("
        <html>
        <body>
        <center>
        <form method=post action=main_view.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>ÀÔÂûÀÌ »èÁ¦ µÇ¾ú½À´Ï´Ù</b></font>
        <input type=hidden name=no value=$no>
        <input type=hidden name=chanl value=main_view>
        <input type=hidden name=f value=$f>
        <input type=hidden name=f2 value=$f2>
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");


        mysql_close($connect);
      }


      if($chanl == title_end)
      {
        title_end($putally2,$ally3,$no,$f,$f2);
        mysql_close($connect);
      }


      if($chanl == new_libchal && $username == guest 
         || $chanl == input_newlibchal && $username == guest ||
            $chanl == edit_libchal && $username == guest
         || $chanl == del && $username == guest ||
            $chanl == del_lib && $username == guest)
      {
        echo("
        <script>
        window.alert('guest´Â ÀÌ¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.')
        history.go(-1)
        </script>
        ");
        exit;
      }
    }
    else
    {
      echo("
      <script>
      window.alert('Login Çϼ¼¿ä.')
      history.go(-1)
      </script>
      ");
      exit;
    }

    ?>

¼Ò½º ¼³¸í

    func_all.phpÀÇ ÇÔ¼ö¸¦ ´Ù¾çÇÑ ¹æ¹ýÀ¸·Î ºê¶ó¿ìÀú¿¡ Ãâ·ÂÇÏ°í ¿©·¯ ÀÔ·Â Ç׸ñ µîÀ» µ¥ÀÌÅͺ£À̽º¿¡ ÀúÀåÇÕ´Ï´Ù.

¼¼¼Ç ¼³Á¤

    »çÀÌÆ®¿¡ µî·ÏµÈ ID³ª guest·Î ·Î±×ÀÎ ÇßÀ» °æ¿ì »ý¼ºµÈ ¼¼¼ÇÀ» ÀÌ¿ëÇؼ­ °æ¸Å °Ô½ÃÆÇÀÇ ±â´ÉÀ» ¼öÇàÇÒ ¼ö
    ÀÖ°Ô ÇÏ´Â ºÎºÐÀÔ´Ï´Ù.


    session_start();
    /* ¼¼¼ÇÀ» ½ÃÀÛÇÕ´Ï´Ù. */


    if($username)
    {
    /* ¼¼¼ÇÀÌ ÀÖÀ» °æ¿ì ÇØ´ç if¹® ³»¿ëÀ» ¼öÇàÇÕ´Ï´Ù. if($username){ ¿Í else{ »çÀÌ¿¡ °¢È­¸éÀ» Ãâ·ÂÇÏ´Â ÇÔ¼ö¸¦ »ç¿ëÇÕ´Ï´Ù.
       ÀÌ°°Àº ¹æ¹ýÀº °æ¸Å °Ô½ÃÆÇÀÇ ÀÌ¿ëÀ» µî·ÏµÈ ID¿Í guest¸¸ÀÌ Á¢¼Ó °¡´É Çϵµ·Ï ÇÏ´Â °ÍÀÔ´Ï´Ù. */

      include('func_all.php');
      /* ÇÔ¼ö ÆÄÀÏÀ» Æ÷ÇÔÇÕ´Ï´Ù. */
    }
    else
    {
      echo("
      <script>
      window.alert('LoginÇϼ¼¿ä.')
      history.go(-1)
      </script>
      ");
      exit;
    }
    /* main_view.phpÀÇ ¸¶Áö¸· ºÎºÐ¿¡ Á¸ÀçÇÏ¸ç ¼¼¼ÇÀÌ ¾øÀ» °æ¿ì Ãâ·ÂÇÏ´Â ºÎºÐÀÔ´Ï´Ù. */

»õ·Î¿î °æ¸Å µî·ÏÇϱâ

    »õ·Î¿î °æ¸Å¸¦ µî·ÏÇÏ´Â È­¸éÀ» Ãâ·ÂÇÕ´Ï´Ù.


    if($chanl == new_libchal && $username != guest)
    {
    /* $chanlÀÌ new_libchalÀÌ°í ¼¼¼ÇÀÌ guest°¡ ¾Æ´Ò °æ¿ì »õ·Î¿î °æ¸Å µî·Ï È­¸éÀ» ½ÇÇàÇÕ´Ï´Ù. */
      input_view($f,$f2,$connect,$putuser) ;
      mysql_close($connect);
    }

»õ °æ¸Å µ¥ÀÌÅͺ£À̽º ÀúÀåÇϱâ

    »õ·Î¿î °æ¸Å ÀÔ·Â È­¸é¿¡¼­ ÀÔ·ÂÇÑ Ç׸ñÀ» µ¥ÀÌÅͺ£À̽º¿¡ ÀúÀåÇÏ´Â ºÎºÐÀÔ´Ï´Ù.


    if($chanl == input_new && $username != guest)
    {
    /* $chanlÀÌ input_newÀÌ°í ¼¼¼ÇÀÌ guest°¡ ¾Æ´Ò °æ¿ì ½ÇÇàÇÕ´Ï´Ù. */
      if($edata4 == am && $edata5 == 12)
      {
        $ap = "00" ;
      }
      if($edata4 == pm && $edata5 == 12)
      {
        $ap = "12" ;
      }
      if($edata4 == am)
      {
        $ap = $edata5 ;
      }
      if($edata4 == pm)
      {
        $ap = $edata5 +"12" ;
      }
      /* À§ Á¶°Ç ¹®Àº °æ¸Å ¸¶°¨ ³¯Â¥¸¦ ¼³Á¤ÇÏ´Â ºÎºÐÀ̸ç Am°ú PmÀ» ±¸ºÐÇÕ´Ï´Ù. */


      $edate = "$edata1-$edata2-$edata3-$ap-$edata6";
      /* $edate º¯¼ö¿¡ ³¯Â¥ Á¤º¸¸¦ Çϳª·Î ÀúÀåÇÕ´Ï´Ù. */
   

      error_view($title,$smoney,$edate,$content,$f,$f2);
      /* °æ¸Å ÀÔ·Â Ç׸ñ Áß °ø¹é Ç׸ñÀÌ ÀÖÀ¸¸é ¿¡·¯¸¦ Ãâ·ÂÇÕ´Ï´Ù. */


      mysql_select_db('libchal',$connect);
      $max = mysql_query("select max(no) from $f ",$connect );
      $new_no = mysql_result($max,0,0);
      $no = $new_no + "1" ;
      /* °æ¸Å ¸ÞÀÎ Å×ÀÌºí¿¡¼­ ¸¶Áö¸· °æ¸Å °íÀ¯¹øÈ£¸¦ °Ë»öÇÏ°í +1Çؼ­ »õ·Î¿î °æ¸Å °íÀ¯¹øÈ£¸¦ ¸¸µì´Ï´Ù. */


      if(!(int)$smoney)
      {
        echo("
        <script>
        window.alert('±Ý¾×À» ´Ù½Ã ÀÔ·ÂÇϼ¼¿ä..')
        history.go(-1)
        </script>
        ");
        exit;
      }
      /* °æ¸Å ±âº» ±Ý¾×ÀÌ Á¤¼ö°¡ ¾Æ´Ò °æ¿ì ¿¡·¯ È­¸éÀ» Ãâ·ÂÇÕ´Ï´Ù. */


      $wdate = date("y-m-d");
      /* ÇöÀç ³¯Â¥¸¦ ÇØ´ç º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */
          
          
      mysql_query("insert into $f(no,title,name,email,tel,smoney,content,edate,wdate)
      values('$no','$title','$putuser[name]','$putuser[email]','$putuser[tel1]',
      '$smoney','$content','$edate','$wdate')",$connect);
      /* °æ¸Å ¸ÞÀÎ Å×ÀÌºí¿¡ »õ °æ¸Å ÀÔ·Â »çÇ×À» ÀúÀåÇÕ´Ï´Ù. */


      echo("
      <html>
      <body>
      <center>
      <form method=post action=main_view.php>
      <font style='font-size:13px;font-style:italic;color:#808080'>
      <b>±ÛÀÌ µî·ÏµÇ¾ú½À´Ï´Ù</b></font>
      <input type=hidden name=chanl value=main_view>
      <input type=hidden name=f value=$f>
      <input type=hidden name=f2 value=$f2>
      <input type=submit value=È®ÀÎ>
      </form>
      </center>
      </body>
      </html>
      ");
      /* »õ °æ¸Å Ç׸ñÀ» ÀúÀåÇÏ°í È®ÀÎ È­¸éÀ» Ãâ·ÂÇÕ´Ï´Ù. */

      mysql_close($connect);
    }

ÀÔÂû Ç׸ñ Ãâ·ÂÇϱâ

    ÇØ´ç °æ¸Å¿¡ ÀÔÂûÀ» ÇÒ °æ¿ì ÀÔÂû ±Ý¾×À» ÀÔ·ÂÇÏ´Â È­¸éÀ» Ãâ·ÂÇÏ°í , ´Ù½Ã ÇØ´ç Á¤º¸¸¦ µ¥ÀÌÅͺ£À̽º¿¡
    ÀúÀåÇÏ´Â ºÎºÐÀ» ¸¸µì´Ï´Ù.


    if($chanl == input_newlibchal && $username != guest)
    {
    /* $chanlÀÌ input_newlibchalÀÌ°í ¼¼¼ÇÀÌ guest°¡ ¾Æ´Ò °æ¿ì ÀÔÂû µî·Ï È­¸éÀ» Ãâ·ÂÇÕ´Ï´Ù. */

      if($chanl2 == input_newlibchal2 && $username != guest)
      {
      /*   $chanl=input_newlibchal , $chanl= input_newlibchal2ÀÌ°í ¼¼¼ÇÀÌ guest°¡ ¾Æ´Ò ¶§ ¾Æ·¡ Ç׸ñÀ» ½ÇÇàÇÕ´Ï´Ù. */


        if(!(int)$bmoney || !$bmoney)
        {
          echo("
          <script>
          window.alert('±Ý¾×À» ´Ù½Ã ÀÔ·ÂÇϼ¼¿ä..')
          history.go(-1)
          </script>
          ");
          exit;
        }


        if($putup2[name] == $putuser[name])
        {
          echo("
          <script>
          window.alert('ÀÔÂûÀº Çѹø¸¸ °¡´ÉÇÕ´Ï´Ù.')
          history.go(-1)
          </script>
          ");
          exit;
        }
        /* ÀÔÂûÀÚ¿Í ±âÁ¸¿¡ µî·ÏµÈ ÀÔÂûÀÚ¿Í °°À» °æ¿ì ¿¡·¯ È­¸éÀ» Ãâ·ÂÇÕ´Ï´Ù. */


        if($putally2[smoney] >= $bmoney)
        {
          echo("
          <script>
          window.alert('ÀÔÂûÀº ±âº» ±Ý¾×º¸´Ù ³ô¾Æ¾ß ÇÕ´Ï´Ù..')
          history.go(-1)
          </script>
          ");
          exit;
        }
        /* ÀÔÂû ±Ý¾×ÀÌ ±âº» ±Ý¾×º¸´Ù ÀÛÀ» °æ¿ì Ãâ·ÂÇÕ´Ï´Ù. */


        mysql_select_db('libchal',$connect);//function
        $sise = $putup[sise] + "1" ;
        /* ÀÔÂûµî·Ï ȸ¼ö¸¦ $sise¿¡ ÀúÀåÇÕ´Ï´Ù. */


        mysql_query("insert into $f2(name,bmoney,tel,email,tnum)
        values('$putuser[name]','$bmoney','$putuser[tel1]','$putuser[email]','$tnum')",$connect);
        /* ÀÔÂûÀÚ Å×ÀÌºí¿¡ Àü´Þ ¹ÞÀº ÀÔÂû Ç׸ñµéÀ» ÀúÀåÇÕ´Ï´Ù. */


        mysql_query("update $f set sise='$sise'  where no='$tnum'",$connect);
        /* $siseÀÇ °ªÀ» ÀúÀåÇÕ´Ï´Ù. */


        echo("
        <html>
        <body>
        <center>
        <form method=post action=main_view.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>±ÛÀÌ µî·Ï µÇ¾ú½À´Ï´Ù</b></font>
        <input type=hidden name=chanl value=main_view>
        <input type=hidden name=f value=$f>
        <input type=hidden name=f2 value=$f2>
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");
      }
      /* ÀÔÂû µî·ÏÀ» ¸¶Ä"í È®ÀÎ È­¸éÀ» Ãâ·ÂÇÕ´Ï´Ù. */
      else
      {
        input_newlibchal($tnum,$f,$f2,$putuser) ;
      }
      /* ÀÔÂû µî·Ï È­¸éÀÔ´Ï´Ù. */

      mysql_close($connect);
    }

°æ¸Å ¼öÁ¤ È­¸é Ãâ·Â°ú µ¥ÀÌÅͺ£À̽º ¼öÁ¤

    µî·ÏµÈ °æ¸Å¸¦ ¼öÁ¤ÇÏ´Â È­¸éÀ» Ãâ·ÂÇÏ°í ÇØ´ç Å×À̺íÀÇ ³»¿ëÀ» ¼öÁ¤ÇÏ´Â ·çƾÀÔ´Ï´Ù.



    if($chanl == edit_libchal_in && $username != guest)
    {
    /* $chanl=edit_libchal_inÀÌ°í ¼¼¼ÇÀÌ guest°¡ ¾Æ´Ò °æ¿ì ½ÇÇàÇÕ´Ï´Ù. */


      $input=mysql_query("select password('$passwd') ",$connect );
      $inputpassw = mysql_result($input,0,0);
      /* Àü´Þ ¹ÞÀº Æнº¿öµå¸¦ ¾ÏȣȭÇÕ´Ï´Ù. */


      if($putuser[passwd] == $inputpassw)
      {
      /* Àü´Þ ¹ÞÀº Æнº¿öµå¿Í ÇØ´ç °æ¸Å µî·ÏÀÚÀÇ Æнº¿öµå°¡ °°À» °æ¿ì ½ÇÇàÇÕ´Ï´Ù. */


        if(!(int)$smoney)
        {
          echo("
          <script>
          window.alert('±Ý¾×À» ´Ù½Ã ÀÔ·Â Çϼ¼¿ä..')
          history.go(-1)
          </script>
          ");
          exit;
        }


        mysql_select_db('libchal',$connect);
        mysql_query("update $f set title='$title', smoney='$smoney' , edate='$edate'
        , content='$content' where no = '$no'",$connect);
        /* ÇØ´ç °æ¸Å Å×ÀÌºí¿¡¼­ Àü´Þ ¹ÞÀº ¼öÁ¤ Ç׸ñµéÀ» ÀÔ·ÂÇÕ´Ï´Ù. */
        mysql_close;
      }
      else
      {
        echo("
        <script>
        window.alert('passw°¡ Ʋ·È½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit; 
      }
      /* Àü´Þ ¹ÞÀº Æнº¿öµå¿Í µî·ÏÀÚ Æнº¿öµå°¡ °°Áö ¾ÈÀ¸¸é À§ È­¸éÀ» Ãâ·ÂÇÕ´Ï´Ù. */

°æ¸Å ¼¼ºÎ Á¤º¸ Ãâ·Â

    °æ¸Å ¸ÞÀÎ È­¸é¿¡¼­ ƯÁ¤ °æ¸ÅÀÇ Á¦¸ñÀ» Ŭ¸¯ÇÏ¸é º¸¿©ÁÖ´Â È­¸éÀ» ¸¸µì´Ï´Ù.



    if($chanl == title)
    {
    /* $chanlÀÌ titleÀÏ °æ¿ì ½ÇÇàÇÕ´Ï´Ù. */


      mysql_select_db('libchal',$connect);
      mysql_query("update $f set hit = '$putup[hit]'+1 where no = '$no'",$connect) ;
      /* °æ¸Å ¸ÞÀÎ Å×ÀÌºí¿¡¼­ ÇØ´ç °æ¸ÅÀÇ Á¶ ȸ¼ö¸¦ +1 Çؼ­ ÀúÀåÇÕ´Ï´Ù. */


      view_title($putally2,$ally3,$no,$f,$f2,$putuser) ;
      /* °æ¸Å ¼¼ºÎ È­¸éÀ» Ãâ·ÂÇÕ´Ï´Ù. */
    }

°æ¸Å ¸ÞÀÎ È­¸é Ãâ·Â

    if($chanl == main_view)
    {
    /* $chanl ÀÌ main_view ÀÏ °æ¿ì ½ÇÇàÇÕ´Ï´Ù. */


      $s_mail = s_mail($putally2,$ally3,$no,$f,$f2);
      /* ¸ÞÀÏ ÇÔ¼ö¸¦ $s_mail º¯¼ö¿¡ ÀúÀåÇÕ´Ï´Ù. */


      mysql_select_db('adminp',$connect);


      mysql_query("update admin set sum='$t_num' where mview = '$f'",$connect);
      /* admin ¿µ¿ªÀÇ ÇØ´ç °æ¸Å °Ô½ÃÆÇÀÇ ÃÑ ±Û ¼ö¸¦ ÀúÀåÇÕ´Ï´Ù. */


      main_view($s_mail,$t_num,$ally,$page,$findtype,$findname,$f,$f2,$root,
      $username,$putuser);
      /* ¸ÞÀÎ È­¸éÀ» Ãâ·ÂÇÕ´Ï´Ù. */
          
      mysql_close($connect);
    }

ÀÔÂû »èÁ¦ ·çƾ

    ÇØ´ç °æ¸Å¿¡ µî·ÏÇÑ ÀÔÂûÀÚÀÇ ÀÔÂûÀ» »èÁ¦ÇÏ´Â ·çƾÀÔ´Ï´Ù.



    if($chanl == del_lib2 && $username != guest)
    {
    /* $chanlÀÌ del_lib2ÀÌ°í ¼¼¼ÇÀÌ guest°¡ ¾Æ´Ò °æ¿ì ½ÇÇàÇÕ´Ï´Ù. */


      $input=mysql_query("select password('$passwd') ",$connect );
      $inputpassw = mysql_result($input,0,0);
      /* Àü´Þ ¹ÞÀº Æнº¿öµå¸¦ ¾ÏȣȭÇÕ´Ï´Ù. */


      if($putuser[passwd] == $inputpassw || $root)
      {
      /* Àü´Þ ¹ÞÀº Æнº¿öµå¿Í µî·ÏµÈ Æнº¿öµå°¡ °°°Å³ª admin ÄíÅ°°¡ ÀÖÀ» °æ¿ì ½ÇÇàÇÕ´Ï´Ù.*/

        mysql_select_db('libchal',$connect);
        $ml2del = "delete from $f2 where name='$putuser[name]' && tnum='$no' ";
        $rsult2 = mysql_query($ml2del,$connect);
        /* ÀÔÂûÀÚ Å×ÀÌºí¿¡¼­ ÇØ´ç À¯ÀúÀÇ ÀÔÂûÀ» »èÁ¦ÇÕ´Ï´Ù. */
      }
      else
      {
        echo("
        <script>
        window.alert('passw°¡ Ʋ·È½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }
      /* Àü´Þ µÇ¾î¿Â Æнº¿öµå¿Í µî·ÏµÈ Æнº¿öµå°¡ ´Ù¸¦ °æ¿ì Ãâ·ÂÇÏ´Â È­¸éÀÔ´Ï´Ù. */

guest ÀÌ¿ë ºÒ°¡ Ç׸ñ

    guest·Î ·Î±×ÀÎ ÇßÀ» °æ¿ì °æ¸Å °Ô½ÃÆÇÀÇ ±â´É Áß »ç¿ë ÇÏÁö ¸øÇÏ´Â ºÎºÐÀ» ¼³Á¤ÇÕ´Ï´Ù.


    if($chanl == new_libchal && $username == guest ||
       $chanl == input_newlibchal && $username == guest ||
       $chanl == edit_libchal && $username == guest ||
       $chanl == del && $username == guest ||
       $chanl == del_lib && $username == guest)
    {
    /* ¼¼¼ÇÀÌ guestÀÌ°í $chanlÀÌ »õ·Î¿î °æ¸Å µî·Ï , ÀÔÂû , ¼öÁ¤ , °æ¸Å »èÁ¦ , ÀÔÂû »èÁ¦ ºÎºÐ¿¡ ÇØ´ç ÇÒ °æ¿ì ½ÇÇàÇÕ´Ï´Ù. */

      echo("
      <script>
      window.alert('guest´Â ÀÌ¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.')
      history.go(-1)
      </script>
      ");
      exit;
    }


    ´ÙÀ½Àå¿¡´Â ¼îÇÎ ¸ôÀ» ±¸ÇöÇØ º¸°Ú½À´Ï´Ù.

15. ¼îÇÎ ¸ô ¸¸µé±â

¼îÇÎ ¸ôÀº ƯÁ¤ »óÇ°À» ±¸¸ÅÀÚµéÀÌ À¥ »ó¿¡¼­ ½ÇÁ¦·Î ¼îÇÎÀ» ÇÏ´Â °Í°ú °°ÀÌ ±¸Çö ÇÏ´Â °ÍÀÌ Áß¿ä ÇÕ´Ï´Ù.    ¸ÕÀú ±¸¸ÅÀÚµéÀº ÇØ´ç »çÀÌÆ®ÀÇ °èÁ¤ÀÌ ÀÖ¾î¾ß ÇÏ°í ½ÇÁ¦ ¼îÇÎÀ» ÇÒ ¶§¿Í °°ÀÌ ¹Ù±¸´Ï Ç׸ñÀ» ¸¸µì´Ï´Ù.    ¹Ù±¸´Ï´Â ±¸¸ÅÀÚÀÇ ¼±Åà ¹°°ÇÀ» Àӽ÷ΠÀúÀå Çϸç ÁÖ¹® ¶§ ¼±º° ÇÒ ¼ö ÀÖ½À´Ï´Ù.    ÁÖ¹®¼­ÀÇ °æ¿ì ȸ¿ø °¡ÀÔ ¶§ ÀÛ¼ºÇÑ Á¤º¸¸¦ ÀÌ¿ëÇØ ÀúÀå µÇ¸ç ¹ÞÀ» ÁÖ¼Ò´Â º¯°æ °¡´É ÇØ¾ß ÇÕ´Ï´Ù.    ±×¸®°í,ÇØ´ç »çÀÌÆ®ÀÇ ¸ÞÀÎ È­¸é¿¡ ƯÁ¤ »óÇ°À¸·ÎÀÇ À̵¿ ¸µÅ©°¡ Á¸Àç ÇÕ´Ï´Ù.

15.1 ¼îÇÎ ¸ô Å×ÀÌºí ¸¸µé±â

    ¼îÇÎ ¸ô Å×À̺íÀº ÃÑ 3°³ÀÇ Å×À̺í·Î ±¸¼º µË´Ï´Ù.
    Â÷·Ê·Î pduct(Á¦Ç°ÀÇ Á¤º¸ ÀúÀå) , shopuser(±¸¸ÅÀÚ°¡ ¼±ÅÃÇÑ ¹°Ç° Á¤º¸) , sub(ÁÖ¹®¼­) ÀÔ´Ï´Ù. 
    Shopuser Å×À̺íÀº ¹Ù±¸´Ï ¿ªÇÒÀ» Çϸç ÇØ´ç Á¦Ç°ÀÇ °¡°Ý°ú ¼ö·® µîÀÇ Á¤º¸¸¦ ÀúÀå ÇÕ´Ï´Ù. °æ¸Å¿Í ÀÚ·á½Ç
    °Ô½ÃÆÇ°ú´Â ´Þ¸® ¼îÇθô Å×À̺íÀº admin¿µ¿ª¿¡¼­ »õ·Ó°Ô ¸¸µå´Â ±â´ÉÀÌ ¾øÀ¸¸ç Á÷Á¢ ¸¸µé¾î Áà¾ß ÇÕ´Ï´Ù.
    º¸´Ù ´Ù¾çÇÏ°í admin Áß½ÉÀÇ ¼îÇÎ ¸ôÀ» ±¸¼º Çϱâ À§Çؼ­´Â »óÇ°ÀÇ °¡°Ý°ú ±¸¸Å ´Ü°¡ , ¹°Ç° ±¸ÀԽà ¸¶Áøµî
    »óÇ° ÇϳªÀÇ Á¤º¸¸¦ °ü¸®ÀÚ Ãø¸é¿¡¼­ ±¸¼º ÇØ¾ß ÇÕ´Ï´Ù.
    ¹°·Ð °¢ ¹°Ç°ÀÇ ºê¶ó¿ìÀú Ãâ·Â°ú °ü·ÃµÈ ÀÏ·ÃÀÇ ÀÛ¾÷ ¶ÇÇÑ °£´ÜÇÏ°Ô °ü¸® ÇÒ ¼ö ÀÖ¾î¾ß ÇÕ´Ï´Ù.

µ¥ÀÌÅÍ º£À̽º ¸¸µé±â

    mysql>create databases shop ;

    ¼îÇÎ ¸ô¿¡ »ç¿ëÇÒ Å×À̺íÀ» »ý¼º Çϱâ À§ÇÑ µ¥ÀÌÅÍ º£À̽º¸¦ ¸¸µì´Ï´Ù.
    Âü°í·Î ÀÌÀü ÀÚ·á½Ç°ú °æ¸Å °Ô½ÃÆÇ¿¡ »ç¿ëÇÑ µ¥ÀÌÅÍ º£À̽º´Â libchal Çϳª·Î »ç¿ë Çß¾ú½À´Ï´Ù. 

Å×ÀÌºí ¸¸µé±â

    ./mysql -u root -p shop < shop.sql 

    CDÀÇ shop.sql ÆÄÀÏÀ» ÀÌ¿ëÇؼ­ ¼îÇÎ ¸ô¿¡ »ç¿ëÇÒ 3°³ÀÇ Å×À̺íÀ» »ý¼º ÇÕ´Ï´Ù.
    »õ·Î¿î Çʵå¿Í ·¹Äڵ带 Ãß°¡ , ¼öÁ¤ Çϱâ À§Çؼ­ ÀÌ ÆÄÀÏÀ» »ç¿ë ÇÏ´Â ¹æ¹ýµµ ÀÖ½À´Ï´Ù.

Å×ÀÌºí ±¸¼º ÀÎÀÚ

    ¼îÇÎ ¸ô Å×À̺íÀº ÃÑ 3°³ ÀÌ¸ç ½ºÅ©¸³Æ® ÆÄÀÏÀº 2°³·Î ÀÌ·ç¾î Áý´Ï´Ù.
    Å×À̺íÀº »óÇ°ÀÇ Á¤º¸¸¦ ÀúÀåÇÏ´Â Å×À̺í°ú ¼îÇÎÇÑ ¹°°ÇÀ» ÀúÀåÇÏ´Â Å×À̺í, ÁÖ¹®¼­ Å×À̺í·Î ÀÌ·ç¾î Áý´Ï´Ù.

»óÇ°ÀÇ Á¤º¸¸¦ ÀúÀåÇÏ´Â Å×À̺í(pduct)

    »óÇ°ÀÇ À̹ÌÁö¿Í ¼³¸í °¡°Ý µîÀ» ÀúÀå ÇÕ´Ï´Ù.

    image - BLOB ŸÀÔ ÀÌ¸ç °ü¸®ÀÚ°¡ µî·ÏÇÑ À̹ÌÁö¸¦ ¹ÙÀ̳ʸ® ÇüÅ·ΠÀúÀå ÇÕ´Ï´Ù.
    price - »óÇ° °¡°ÝÀ» ÀúÀåÇÕ´Ï´Ù.
    pdname - »óÇ°ÀÇ À̸§À» ÀúÀåÇÕ´Ï´Ù.
    cont - »óÇ°ÀÇ ¼³¸íÀ» ÀúÀåÇÕ´Ï´Ù.
    sel - »óÇ°ÀÇ Á¾¸ñ Äڵ带 ÀúÀåÇÕ´Ï´Ù. Á¾¸ñ ÄÚµå´Â °ü¸®ÀÚ°¡ »óÇ°À» ºÐ·ùÇϱâ À§ÇØ ÀÓÀÇ·Î ºÎ¿©ÇÏ´Â ¼ýÀÚÀÔ´Ï´Ù.

¼±ÅÃÇÑ »óÇ°À» ÀúÀå ÇÏ´Â Å×À̺í(shopuser)

    ±¸¸ÅÀÚ°¡ ¼îÇÎÀ» Çϸ鼭 ¼±ÅÃÇÑ ¹°°ÇÀ» º¼ ¼ö ÀÖ´Â Å×À̺íÀÌ°í, ÀÏ¸í ¹Ù±¸´Ï¶ó°í ÇÕ´Ï´Ù.

    user - »çÀÌÆ® ·Î±×ÀÎ ¶§ »ç¿ëÇÑ ID ¼¼¼ÇÀ» ÀúÀåÇÕ´Ï´Ù.
    pduct - ¼±ÅÃÇÑ »óÇ° À̸§À» ÀúÀåÇÕ´Ï´Ù.
    num - ¼±ÅÃÇÑ »óÇ°ÀÇ ¼ö·®À» ÀúÀåÇÕ´Ï´Ù.
    price - »óÇ°ÀÇ °¡°ÝÀ» ÀúÀåÇÕ´Ï´Ù.
    bprice - »óÇ°ÀÇ ´Ü°¡¸¦ ÀúÀåÇÕ´Ï´Ù.

»óÇ° ÁÖ¹®À» ÀúÀå ÇÏ´Â Å×À̺í(sub)

    ±¸¸ÅÀÚ°¡ »óÇ°À» ¹Ù±¸´Ï¿¡ ´ãÀº ÈÄ ÀÌ°ÍÀ» ÁÖ¹®Çϱâ À§ÇØ ÀÛ¼ºÇÑ ÁÖ¹®¼­ÀÇ ³»¿ëÀ» ÀúÀå ÇÕ´Ï´Ù.
    ÀÌ°ÍÀº °¢ ±¸¸ÅÀÚÀÇ ID ¼¼¼ÇÀ» ÀÌ¿ëÇÏ´Â ¹æ¹ýÀ̸ç, °¢ ±¸¸ÅÀÚÀÇ ÁÖ¹® ÇöȲÀ» ¸¸µé±â À§ÇØ ÀÌ Å×À̺íÀ»
    »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.

    user - ID ¼¼¼ÇÀ» ÀúÀåÇÕ´Ï´Ù.
    wdate - ±¸¸Å ½Åû¼­ ÀÛ¼º³¯Â¥¸¦ ÀúÀåÇÕ´Ï´Ù.
    pduct - ½ÅûÇÑ »óÇ°À» ÀúÀåÇÕ´Ï´Ù.
    price - »óÇ°ÀÇ ÃÑ °¡°ÝÀ» ÀúÀåÇÕ´Ï´Ù.
    bprice - ÇØ´ç »óÇ°ÀÇ ´Ü°¡¸¦ ÀúÀåÇÕ´Ï´Ù.
    num - ¼±ÅÃÇÑ »óÇ°ÀÇ ÃÑ ¼ö·®À» ÀúÀåÇÕ´Ï´Ù.
    inmoney - °áÀ縦 À§ÇÑ ÀºÇàÀ̸§À» ÀúÀåÇÕ´Ï´Ù.
    name - ±¸¸ÅÀÚÀÇ À̸§À» ÀúÀåÇÕ´Ï´Ù.
    address - »óÇ°À» ¹ÞÀ» ÁÖ¼Ò¸¦ ÀúÀåÇÕ´Ï´Ù.

15.2 ¼îÇÎ ¸ô °Ô½ÃÆÇ ¼Ò½º ¸¸µé±â

¼îÇÎ ¸ôÀÇ ¼Ò½º´Â °¢ È­¸éÀ» º¸¿©ÁÖ´Â ÇÔ¼ö Çü½ÄÀÇ shop_e.php ÆÄÀÏ°ú ÇÔ¼ö¸¦ ÀÌ¿ëÇØ È­¸é¿¡ Ãâ·ÂÇÏ´Â shop.php ÆÄÀÏÀÌ ÀÖ½À´Ï´Ù.    ±×¸®°í ¼îÇÎ ¸ôÀº »óÇ°ÀÇ À̹ÌÁö¸¦ ºê¶ó¿ìÀú¿¡ Ãâ·Â ÇÏ´Â ºÎºÐÀÌ Á¸Àç ÇÕ´Ï´Ù.    ÀÌ°ÍÀ» HTML·Î ÀÏÀÏÀÌ ¸µÅ©¸¦ ¸¸µé¾î Ãâ·Â ÇÏ´Â ¹æ¹ýµµ Á¸ÀçÇÕ´Ï´Ù.¸ °ü¸®ÀÚÀÇ °æ¿ì Á¤¸» ¹ø°Å·Î¿î ÀÏÀÔ´Ï´Ù.    ¿©±â¼­´Â À̹ÌÁö¸¦ Mysql¿¡ ÀúÀåÇؼ­ »ç¿ë Çß½À´Ï´Ù.    ÀúÀåµÈ À̹ÌÁö¸¦ Ãâ·Â Çϱâ À§ÇØsajin.php ÆÄÀÏÀ» »ç¿ë ÇÕ´Ï´Ù.

shop_e.php Àüü ÄÚµå

    <?php

    $connect = mysql_connect('localhost','root','gksmf444');

    mysql_select_db('shop',$connect);


    function add_pd($table,$username,$pdname,$num,$price,$connect,$sel)
    {
      $ally=mysql_query("select user,pduct,num,price,bprice from shopuser
      where user='$username' and pduct='$pdname'",$connect);

      $nums=mysql_fetch_array($ally);


      if($nums == 0)
      {
        mysql_query("insert into
        $table values('$username','$pdname','$num','$price','$price')",$connect);
      }
      else
      {
        $num = $num + $nums[num];
        $price = $price + $nums[price];
 
        mysql_query("update $table set num='$num',price='$price'
        where user='$username' and pduct='$pdname'",$connect);
      }
    }


    function del_pd($username,$pdname,$connect,$sel)
    {
      $ally=mysql_query("select user,pduct,num,price,bprice from shopuser
      where user='$username' and pduct='$pdname'",$connect);

      $nums=mysql_fetch_array($ally);


      if($nums[num] == 1)
      {
        mysql_query("delete from shopuser where pduct='$pdname'
        and user='$username'",$connect);
      }
      else
      {
        $numx = $nums[num] - "1";
        $pricex = $nums[price] - $nums[bprice];

        mysql_query("update shopuser set num='$numx',price='$pricex'
        where user='$username' and pduct='$pdname'",$connect);
      }
    }


    function main_shop($connect,$shop,$username,$sel)
    {
      $ally = mysql_query("select pdname,price,cont,sel from pduct
      where sel='$sel'",$connect);


      $t_num=mysql_num_rows($ally);


      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <table border=0 cellspacing=2 cellpadding=2 width=600 >
      <tr>
      <th bgcolor=gray colspan=4 align=center>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b> ¸¾¿¡µå´Â »óÇ°À» °ñ¶óºÁ¿ä ¾ó¸¥..</b></font></th>
      </tr>
      ");


      if(!$t_num)
      {      
        echo ("
        <tr>
        <th bgcolor=black colspan=4>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>µî·ÏµÈ »óÇ°ÀÌ ¾ö½º¿ä...  ^^;</b></font></th>
        </tr>
        </center>
        </table>
        </html>
        ");
      }
      else
      {
        for($pd=$t_num ; $pd > 0 ; $pd--)
        {
          $put=mysql_fetch_array($ally);
          $cont = nl2br($put[cont]);


          echo("
          <tr>
          <td bgcolor=gray colspan=4>
          </tr>
          <tr>
          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:blue'>
          <img src=sajin.php?sel=$sel&pdname=$put[pdname] border=0></font></td>


          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$cont</b></font></a></td>


          <td bgcolor=black>
          &nbsp
          </td>
          </tr>


          <tr>
          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:blue'>
          $put[pdname]</font></td>


          <td bgcolor=black align=center>
          <font style='font-size:13px;font-style:italic;color:red'>
          <b>$put[price]¿ø</b></font></td>


          <td bgcolor=black width=50>
          <form method=post action=shop.php>
          <input type=text name=num size=4 value=1>
          <input type=hidden name=pdname value=$put[pdname]>
          <input type=hidden name=price value=$put[price]>
          <input type=hidden name=user value=$username>
          <input type=hidden name=table value=shopuser>
          <input type=hidden name=chanl value=shop_e>
          <input type=hidden name=sel value=$sel>
          <input type=submit value=´ã±â>
          </form>
          </td>
          </tr>
          ");
        }
      }


      echo("
      <tr>
      <td bgcolor=black colspan=7>&nbsp;</td>
      </tr>
      <tr>
      <td bgcolor=black colspan=7 align=center>
      ");


      echo("
      </td>
      </tr>
      </center>
      </table>
      <br>
      <center>

      <table border=0 cellspacing=2 cellpadding=2 width=700 >

      <tr>
      <td bgcolor=black width=100>
      <a href =shop.php?chanl=item_show&sel=$sel>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>¹Ù±¸´Ï</b></font></a></td>


      <td bgcolor=black width=100>
      <a href =userin.php?chanl=main_view&username=$username>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Home</b></font></a></td>


      <td bgcolor=black width=100>
      <a href =shop.php?chanl=sub2&sel=$sel>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>ÁÖ¹® ³»¿ª/Ãë¼Ò</b></font></a></td>


      <td bgcolor=black width=100>
      <a href =db_view.php?chanl=rootin>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>

      <b>Admin</b></font></a></td>


      </tr>
      </table>
      </center>
      </html>
      ");
    }


    function item_show($table,$username,$connect,$sel)
    {
      $ally = mysql_query("select user,pduct,num,price,bprice from shopuser
      where user='$username'  ",$connect);


      $t_num=mysql_num_rows($ally);


      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>

      <table border=0 cellspacing=2 cellpadding=2 width=800 >

      <tr>
      <th bgcolor=gray colspan=6 align=center>
      <font style='font-size:12px;font-style:italic;color:#red'>
      <b>¼îÇÎ ÁýÇÕ¼Ò ¹Ù±¸´Ï ÀÔ´Ï´Ù.Àå¹Ù±¸´ÏÁ®^^;</b></font></th>
      </tr>


      <tr>
      <td bgcolor=black width=200 align=center>
      <font style='font-size:13px;font-style:italic;color:blue'>
      <b>Á¦Ç°¸í</b></font></td>


      <td bgcolor=black width=100 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>¼ö·®</b></font></a></td>


      <td bgcolor=black width=200 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>´Ü°¡</b></font></a></td>


      <td bgcolor=black width=200 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>ÇÕ°è</b></font></a></td>


      <td bgcolor=black width=100 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>º¿´Ù¸®</b></font></a></td>
      </tr>
      ");


      for($pd=$t_num ; $pd > 0 ; $pd--)
      {
        $put=mysql_fetch_array($ally);
        $total = $total+($put[bprice] * $put[num]);


        echo("
        <tr>
        <td bgcolor=black width=200 align=center>
        <font style='font-size:13px;font-style:italic;color:blue'>
        $put[pduct]</font></td>


        <td bgcolor=black width=100 align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$put[num]ea</b></font></td>


        <td bgcolor=black align=center width=200>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$put[bprice]¿ø</b></font></td>


        <td bgcolor=black align=center width=200>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$put[price]¿ø</b></font>
        </td>


        <td bgcolor=black align=left width=100>
        <form method=post action=shop.php>
        <input type=hidden name=pdname value=$put[pduct]>
        <input type=hidden name=chanl value=del_pd>
        <input type=hidden name=sel value=$sel>
        <input type=submit value=Åбâ>
        </form>
        </td>
        ");
      }


      echo("
      </tr>
      </table>


      <table border=0 cellspacing=2 cellpadding=2 width=800 >

      <tr>
      <td bgcolor=black align=center width=200>
      <a href =shop.php?sel=$sel>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>¼îÇÎ °è¼ÓÇϱâ</b></font></a></td>


      <td bgcolor=black align=center width=200>
      <a href =shop.php?chanl=sub&sel=$sel>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>ÁÖ¹®Çϱâ</b></font></a></td>


      <td bgcolor=black align=right width=200>
      <font style='font-size:13px;font-style:italic;color:blue'>
      <b>Ãѱݾ×</b></font></td>


      <td bgcolor=black align=center width=200>
      <font style='font-size:13px;font-style:italic;color:red'>
      <b>$total ¿ø</b></font></td>
      </tr>
      </table>
      </center>
      </html>
      ");
    }


    function error_view($edate,$address,$inmoney,$name)
    {

      if(!$address)
      {
        echo("
        <script>
        window.alert('address°¡ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }


      if(!$inmoney)
      {
        echo("
        <script>
        window.alert('ÀÔ±ÝÇÒ ÀºÇàÀÌ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }


      if(!$edate)
      {
        echo("
        <script>
        window.alert('¸¶°¨ÀÏÀÌ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }


      if(!$name)
      {
        echo("
        <script>
        window.alert('nameÀÌ ¾ø½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
        history.go(-1)
        </script>
        ");
        exit;
      }
    }

    ?>

¼Ò½º ¼³¸í

    ¼îÇÎÀÇ °¢ È­¸éÀ» ÇÔ¼ö Çü½ÄÀ¸·Î ¸¸µé¾ú°í »çÀÌÆ®¿¡ µû¶ó ´Ù¾çÇÑ È­¸éÀ» Ãß°¡ ÇÒ ¼ö ÀÖ½À´Ï´Ù.
    ¹°·Ð Á¶°Ç ¹® ³ª¿­ Çü½ÄÀ» »ç¿ëÇؼ­ °¢ È­¸éÀ» Ç¥Çö ÇÒ ¼ö ÀÖ½À´Ï´Ù.

µ¥ÀÌÅÍ º£À̽º Á¢¼Ó

    $connect = mysql_connect('localhost','root','gksmf444');
    /* mysql Á¢¼ÓÀ» À§ÇÑ È£½ºÆ® À̸§ , °èÁ¤ , ºñ¹Ð ¹øÈ£ ÀÔ´Ï´Ù. */

 
    mysql_select_db('shop',$connect);
   /* shop µ¥ÀÌÅÍ º£À̽º¸¦ ¼±Åà ÇÕ´Ï´Ù. */

add_pd($table,$username,$pdname,$num,$price,$cont,$connect,$sel) ÇÔ¼ö

    ±¸¸ÅÀÚ°¡ ¼±ÅÃÇÑ ¹°°ÇÀ» ´ã´Â ¹Ù±¸´Ï ÇÔ¼ö ÀÔ´Ï´Ù. 

ÇÔ¼ö ÀÎÀÚ

    function add_pd($table,$username,$pdname,$num,$price,$connect,$sel)
    {

 
    $table - Å×À̺í À̸§À» Àü´Þ ÇÕ´Ï´Ù.
             ³ªÁß¿¡ ´Ù¾çÇÑ Å×ÀÌºí »ç¿ëÀ» ¿ëÀÌÇÏ°Ô ÇÏ°í ¿©·¯ °³ÀÇ ¼îÇÎ ¹Ù±¸´Ï Ç׸ñÀ» Ãß°¡ ÇÒ ¼ö ÀÖ½À´Ï´Ù.
    $username - »ç¿ëÀÚÀÇ ID ¼¼¼ÇÀ» Àü´ÞÇÕ´Ï´Ù.
    $pdname - ¼±ÅÃÇÑ »óÇ° À̸§À» Àü´ÞÇÕ´Ï´Ù.
    $num - ¼±ÅÃÇÑ »óÇ°ÀÇ ¼ö·®À» Àü´ÞÇÕ´Ï´Ù.
    $price - ¼±ÅÃÇÑ »óÇ°ÀÇ °¡°ÝÀ» Àü´ÞÇÕ´Ï´Ù.
    $connect - µ¥ÀÌÅÍ º£À̽º Á¢¼Ó Ç׸ñÀ» Àü´ÞÇÕ´Ï´Ù.
    $sel - ±¸¸Å Á¦Ç°ÀÇ Á¾¸ñ ¹øÈ£¸¦ Àü´ÞÇÕ´Ï´Ù.

µ¥ÀÌÅÍ º£À̽º Query ¸¸µé±â

    $ally=mysql_query("select user,pduct,num,price,bprice from shopuser 
    where user='$username' and pduct='$pdname'",$connect);
    /* ¹Ù±¸´Ï Å×À̺í(shopuser)¿¡¼­ ÇØ´ç ±¸¸ÅÀÚ¿Í »óÇ°À̸§ÀÌ Á¸ÀçÇÏ¸é ±¸¸ÅÀÚ, »óÇ°À̸§, ¼ö·®, °¡°Ý, 
       ´Ü°¡ µîÀÇ Á¤º¸¸¦ °Ë»ö ÇÕ´Ï´Ù. */

    $nums=mysql_fetch_array($ally);
    /* À§ ¹Ù±¸´Ï Å×À̺íÀÇ Á¤º¸¸¦ $nums º¯¼ö¿¡ ¹è¿­·Î ÀúÀå ÇÕ´Ï´Ù. */   

¹Ù±¸´Ï¿¡ »óÇ° ´ã±â

    if($nums == 0)
    {
      mysql_query("insert into $table
      values('$username','$pdname','$num','$price','$price')",$connect);
    }
    /* ¹Ù±¸´Ï Å×ÀÌºí¿¡ ¾Æ¹«·± Á¤º¸µµ ¾øÀ» °æ¿ì ±¸¸ÅÀÚ°¡ ¼±ÅÃÇÑ »óÇ°ÀÇ Á¤º¸¸¦ ÇØ´ç Å×ÀÌºí¿¡ ÀúÀå ÇÕ´Ï´Ù. */
    else
    {
      $num = $num + $nums[num];
      $price = $price + $nums[price];
      /* $num , $priceÀÇ °ªÀ» ±âÁ¸ÀÇ °ª°ú ´õÇÕ´Ï´Ù. ÀÌ°ÍÀº ÇØ´ç ID ¼¼¼ÇÀ» °¡Áø ±¸¸ÅÀÚ°¡ ¼±ÅÃÇÑ ¹°°ÇÀÌ
         Á¸ÀçÇÒ °æ¿ì ±âÁ¸¿¡ ÀÖ´ø »óÇ°ÀÇ ¼ö·®°ú °¡°ÝÀ» ´õÇÏ´Â °ÍÀÔ´Ï´Ù. */


      mysql_query("update $table set num='$num',price='$price'
      where user='$username' and pduct='$pdname'",$connect);
    }
    /* ¼öÁ¤µÈ $num °ú $price¸¦ ÇØ´ç Å×ÀÌºí¿¡ ÀúÀå ÇÕ´Ï´Ù.*/
    }

del_pd($username,$pdname,$connect,$sel) ÇÔ¼ö

    ¼îÇÎ ¸ôÀÇ °¢ Á¾¸ñ¿¡ ÇØ´çÇÏ´Â ¸ÞÀÎ È­¸éÀ» Ãâ·Â ÇÕ´Ï´Ù. $sel º¯¼ö°¡ Á¦Ç°ÀÇ Á¾¸ñ ¹øÈ£¸¦ Àü´Þ ÇÕ´Ï´Ù.

µ¥ÀÌÅÍ º£À̽º Query ¸¸µé±â

    $ally=mysql_query("select user,pduct,num,price,bprice from shopuser
    where user='$username' and pduct='$pdname'",$connect);
    /* shopuserÅ×ÀÌºí¿¡¼­ ÇØ´ç ID ¼¼¼Ç°ú »óÇ°¿¡ ´ëÇÏ¿© Á¤º¸¸¦ °Ë»ö ÇÕ´Ï´Ù. */

    $nums=mysql_fetch_array($ally);
    /* ÇØ´ç Å×À̺íÀÇ Á¤º¸¸¦ $nums¿¡ ¹è¿­·Î ÀúÀå ÇÕ´Ï´Ù. */

¹Ù±¸´Ï »óÇ° Á¦°ÅÇϱâ

    if($nums[num] == 1)
    {

      mysql_query("delete from shopuser where pduct='$pdname'
      and user='$username'",$connect);
    }
    /* ¹Ù±¸´Ï¿¡ ÇØ´ç »óÇ°ÀÌ Çϳª Á¸Àç ÇÒ °æ¿ì Å×ÀÌºí¿¡¼­ ¿ÏÀüÈ÷ »èÁ¦ ÇÕ´Ï´Ù. */
    else
    {
      $numx = $nums[num] - "1";
      $pricex = $nums[price] - $nums[bprice];
      /* ¹Ù±¸´Ï¿¡ ÇØ´ç »óÇ°ÀÌ Çϳª ÀÌ»óÀÏ °æ¿ì ÇØ´ç »óÇ°ÀÇ ¼ö·®À» Çϳª »èÁ¦ ÇÏ°í ÃÑ °¡°Ý¿¡¼­ ÇØ´ç »óÇ°ÀÇ ´Ü°¡¸¦ »©ÁÝ´Ï´Ù.  */

      mysql_query("update shopuser set num='$numx',price='$pricex'
      where user='$username' and pduct='$pdname'",$connect);
    }
    /* ¼öÁ¤µÈ $numx ¿Í $pricex¸¦ ÇØ´ç Å×ÀÌºí¿¡ ÀúÀå ÇÕ´Ï´Ù. */

main_shop($connect,$shop,$username,$sel) ÇÔ¼ö

    ¼îÇÎ ¸ôÀÇ °¢ Á¾¸ñ¿¡ ÇØ´çÇÏ´Â ¸ÞÀÎ È­¸éÀ» Ãâ·Â ÇÕ´Ï´Ù. $sel º¯¼ö°¡ Á¦Ç°ÀÇ Á¾¸ñ ¹øÈ£¸¦ Àü´Þ ÇÕ´Ï´Ù.

µ¥ÀÌÅÍ º£À̽º Query ¸¸µé±â

    $ally = mysql_query("select pdname,price,cont,sel from pduct where sel='$sel'",$connect);
    /* »óÇ° Á¤º¸ Å×À̺í(pduct)¿¡¼­ ÇØ´ç Á¾¸ñÀÇ »óÇ° Á¤º¸¸¦ °Ë»ö ÇÕ´Ï´Ù. 
       °Ë»ö Çʵå´Â »óÇ° À̸§ , °"Ý , »óÇ° ¼³í , »óÇ° Á¾¸ñ ¹øÈ£ ÀÔ´Ï´Ù. */


    $t_num=mysql_num_rows($ally);
    /* »óÇ° Á¤º¸ Å×ÀÌºí¿¡ Á¸ÀçÇÏ´Â »óÇ°ÀÇ ¼ö¸¦ ÇØ´ç º¯¼ö¿¡ ÀúÀå ÇÕ´Ï´Ù. */

»óÇ° Á¤º¸ È­¸é Ãâ·Â Çϱâ

    if(!$t_num)
    {
      echo ("
      <tr>
      <th bgcolor=black colspan=4>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>µî·ÏµÈ »óÇ°ÀÌ ¾ö½º¿ä...  ^^;</b></font></th>
      </tr>
      </center>
      </table>
      </html>
      ");
    }
    /* »óÇ° Á¤º¸ Å×ÀÌºí¿¡ µî·ÏµÈ »óÇ°ÀÌ ¾øÀ» °æ¿ì Ãâ·Â ÇÏ´Â È­¸é ÀÔ´Ï´Ù. */
    else
    {
      for($pd=$t_num ; $pd > 0 ; $pd--)
      {
      /* »óÇ° Á¤º¸ Å×ÀÌºí¿¡ µî·ÏµÈ »óÇ°ÀÌ ÀÖÀ» °æ¿ì ½ÇÇà ÇÕ´Ï´Ù.
         ÇØ´ç for¹®Àº Å×ÀÌºí¿¡ Á¸Àç ÇÏ´Â »óÇ°ÀÇ ¼ö¸¦ ÀÌ¿ëÇؼ­ ±× ¼ö ¸¸Å­ ¹Ýº¹ÇÕ´Ï´Ù. */


        $put=mysql_fetch_array($ally);
        /* ÇØ´ç Á¾¸ñÀÇ »óÇ° Á¤º¸¸¦ $t_num º¯¼ö¿¡ ¹è¿­·Î ÀúÀå ÇÕ´Ï´Ù. */


        $cont = nl2br($put[cont]);
        /* µ¥ÀÌÅÍ º£À̽º¿¡ ÀúÀåµÈ »óÇ°ÀÇ ¼³¸íÀ» ºê¶ó¿ìÀú¿¡ Ãâ·Â Çϱâ À§ÇØ nlÀ» <br>·Î ¹Ù²ß´Ï´Ù. */

        echo("
        <tr>
        <td bgcolor=gray colspan=4>
        </tr>
        <tr>
        <td bgcolor=black>
        <font style='font-size:13px;font-style:italic;color:blue'>
        <img src=sajin.php?sel=$sel&pdname=$put[pdname] border=0></font></td>
        /* ÇØ´ç »óÇ°ÀÇ À̹ÌÁö¸¦ Ãâ·Â ÇÕ´Ï´Ù. sajin.php ÆÄÀÏ¿¡ Ãâ·Â µÇ´Â À̹ÌÁö¸¦ Ãâ·Â ÇÕ´Ï´Ù.*/
        <td bgcolor=black>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$cont</b></font></a></td>
        /* ÇØ´ç »óÇ°¿¡ ´ëÇÑ ¼³¸íÀ» Ãâ·Â ÇÕ´Ï´Ù. */


        <td bgcolor=black>
        &nbsp
        </td>
        </tr>
        

        <tr>
        <td bgcolor=black>
        <font style='font-size:13px;font-style:italic;color:blue'>
        $put[pdname]</font></td>
        /* ÇØ´ç »óÇ°ÀÇ °¡°ÝÀ» Ãâ·Â ÇÕ´Ï´Ù. */


        <td bgcolor=black align=center>
        <font style='font-size:13px;font-style:italic;color:red'>
        <b>$put[price]¿ø</b></font></td>
        /* ÇØ´ç »óÇ°ÀÇ °¡°ÝÀ» Ãâ·Â ÇÕ´Ï´Ù. */


        <td bgcolor=black width=50>
        <form method=post action=shop.php>
        <input type=text name=num size=4 value=1>
        <input type=hidden name=pdname value=$put[pdname]>
        <input type=hidden name=price value=$put[price]>
        <input type=hidden name=user value=$username>
        <input type=hidden name=table value=shopuser>
        <input type=hidden name=chanl value=shop_e>
        <input type=hidden name=sel value=$sel>
        <input type=submit value=´ã±â>
        </form>
        /* °¢ »óÇ°ÀÇ ¼ö·®À» ¼±ÅÃÇÏ°í ¹Ù±¸´Ï¿¡ Àü´ÞÇÏ´Â "´ã±â" ¹öÆ°À» »ý¼º ÇÕ´Ï´Ù.
           »óÇ° ¼ö·®Àº shop.php ÆÄÀÏ¿¡ ÀüÞ ÇÏ¸ç ±âº» ¼ö·®Àº 1°³ÀÔ´Ï´Ù.
           Àü´Þ ÀÎÀÚ´Â »óÇ° À̸§ , »óÇ° °"Ý , ID ¼¼¼Ç , Å×À̺í À̸§(»õ·Î¿î ¼îÇÎ ¸ôÀ» ¸¸µé °æ¿ì Àû¿ë) , 
           ÇØ´ç ÀÎÀÚ¸¦ Àû¿ëÇÒ chanl , »óÇ° Á¾¸ñ ¹øÈ£¸¦ Àü´Þ ÇÕ´Ï´Ù. */


        </td>
        </tr>
        "); 
      }
    }

´Ù¸¥ È­¸é ¸µÅ© ¸¸µé±â

    echo("
    </td>
    </tr>
    </center>
    </table>
    <br>
    <center>
    <table border=0 cellspacing=2 cellpadding=2 width=700 >
    <tr>
    <td bgcolor=black width=100>
    <a href =shop.php?chanl=item_show&sel=$sel>
    <font style='font-size:13px;font-style:italic;color:#ffd700'>
    <b>¹Ù±¸´Ï</b></font></a></td>
    /* ¼±ÅÃÇÑ ¹°°ÇÀ» º¸¿©ÁÖ´Â ¹Ù±¸´Ï ¸µÅ©¸¦ ¸¸µì´Ï´Ù.
       Shop.php ÆÄÀÏÀÇ chanlÀÌ item_show Ç׸ñÀ» ½ÇÇà ÇÏ¸ç »óÇ°ÀÇ Á¾¸ñ ¹øÈ£µµ Àü´ÞÇÕ´Ï´Ù. */


    <td bgcolor=black width=100>
    <a href =userin.php?chanl=main_view&username=$username>
    <font style='font-size:13px;font-style:italic;color:#ffd700'>
    <b>Home</b></font></a></td>
    /* »çÀÌÆ® ¸ÞÀÎ È­¸éÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. ÇØ´ç ID ¼¼¼ÇÀ» Àü´Þ Çؼ­ ¸ÞÀÎ È­¸é¿¡ ·Î±×ÀÎ »óŸ¦ º¸¿© ÁÝ´Ï´Ù. */

    <td bgcolor=black width=100>
    <a href =shop.php?chanl=sub2&sel=$sel>
    <font style='font-size:13px;font-style:italic;color:#ffd700'>
    <b>ÁÖ¹® ³»¿ª/Ãë¼Ò</b></font></a></td>
    /* ÁÖ¹® ³»¿ªÀ» Ãë¼ÒÇÏ´Â È­¸éÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. */


    <td bgcolor=black width=100>
    <a href =db_view.php?chanl=rootin>
    <font style='font-size:13px;font-style:italic;color:#ffd700'>
    <b>Admin</b></font></a></td>
    /* »çÀÌÆ®ÀÇ Àü¹ÝÀûÀÎ Á¦¾î¸¦ ÇÏ´Â admin ¿µ¿ªÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. */
    </tr>
    </table>
    </center>
    </html>
    ");

item_show($table,$username,$connect,$sel) ÇÔ¼ö

    ¼±ÅÃÇÑ »óÇ°À» º¸¿©ÁÖ´Â ¹Ù±¸´Ï Ç׸ñ ÀÔ´Ï´Ù. ÇÔ¼ö ÀÎÀÚ´Â À§ ´Ù¸¥ ÇÔ¼öÀÇ ³»¿ë°ú °°½À´Ï´Ù.

µ¥ÀÌÅÍ º£À̽º Query ¸¸µé±â

    $ally = mysql_query("select user,pduct,num,price,bprice from shopuser
    where user='$username'  ",$connect);
    /* shopuser Å×ÀÌºí¿¡¼­ ·Î±×ÀÎ ÇÑ ID ¼¼¼Ç¿¡ ÇØ´ç ÇÏ´Â Á¤º¸¸¦ °Ë»ö ÇÕ´Ï´Ù. */

    $t_num=mysql_num_rows($ally);
    /* ÇØ´ç ID ¼¼¼ÇÀÇ °Ë»ö ¼ö·®À» $t_num º¯¼ö¿¡ ÀúÀå ÇÕ´Ï´Ù. */

¹Ù±¸´Ï¿¡ ´ãÀº »óÇ° Ãâ·Â Çϱâ

    for($pd=$t_num ; $pd > 0 ; $pd--)
    {
    /* shopuser Å×ÀÌºí¿¡ Á¸ÀçÇÏ´Â ÇØ´ç IDÀÇ ¸ðµç »óÇ°À» Ãâ·Â ÇÕ´Ï´Ù. */


      $put=mysql_fetch_array($ally);
      $total = $total+($put[bprice] * $put[num]);
      /* ¼±ÅÃÇÑ »óÇ°ÀÇ ÃÑ °¡°ÝÀ» ±¸ÇÕ´Ï´Ù. $total = ±âÁ¸ÀÇ total + ( ÇØ´ç »óÇ° ´Ü°¡ * ÇØ´ç »óÇ° ¼ö·®) À¸·Î ±¸ÇØÁý´Ï´Ù. */


      echo("
      <tr>
      <td bgcolor=black width=200 align=center>
      <font style='font-size:13px;font-style:italic;color:blue'>
      $put[pduct]</font></td>
      /* ÇØ´ç »óÇ°ÀÇ À̸§À» Ãâ·Â ÇÕ´Ï´Ù. */
      <td bgcolor=black width=100 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$put[num]ea</b></font></td>
      /* ÇØ´ç »óÇ°ÀÇ ¼ö·®À» Ãâ·Â ÇÕ´Ï´Ù. */


      <td bgcolor=black align=center width=200>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$put[bprice]¿ø</b></font></td>
      /* ÇØ´ç »óÇ°ÀÇ ±âº» ´Ü°¡¸¦ Ãâ·Â ÇÕ´Ï´Ù. */


      <td bgcolor=black align=center width=200>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$put[price]¿ø</b></font>
      /* ÇØ´ç »óÇ°ÀÇ ÃÑ ±Ý¾×À» Ãâ·Â ÇÕ´Ï´Ù. */
      </td>
      <td bgcolor=black align=left width=100>
      <form method=post action=shop.php>
      <input type=hidden name=pdname value=$put[pduct]>
      <input type=hidden name=chanl value=del_pd>
      <input type=hidden name=sel value=$sel>
      <input type=submit value=Åбâ>
      /* ¼±ÅÃÇÑ »óÇ°À» »èÁ¦ ÇÏ´Â "Åбâ" ¹öÆ°À» »ý¼º ÇÕ´Ï´Ù.
         shop.phpÀÇ chanl=del_pd Ç׸ñÀ» ½ÇÇà ÇÏ¸ç »óÇ° À̸§ú »óÇ° Á¾¸ñÀ» Àü´ÞÇÕ´Ï´Ù. */
      </form>
      </td>
      ");
    }

´Ù¸¥ È­¸é ¸µÅ© ¸¸µé±â

    ¹Ù±¸´Ï È­¸é¿¡¼­´Â ´Ù½Ã ¼îÇÎÀ» °è¼ÓÇÏ´Â ¹öÆ°°ú »óÇ°À» ÁÖ¹®ÇÏ´Â Ç׸ñ , ÃÑ ±Ý¾× µîÀÌ Á¸Àç ÇÕ´Ï´Ù.


    echo("
    </tr>
    </table>


    <table border=0 cellspacing=2 cellpadding=2 width=800 >
    <tr>
    <td bgcolor=black align=center width=200>
    <a href =shop.php?sel=$sel>
    <font style='font-size:13px;font-style:italic;color:#ffd700'>
    <b>¼îÇÎ °è¼ÓÇϱâ</b></font></a></td>
    /* ÇØ´ç ¼îÇÎÀÇ ¸ÞÀÎ È­¸éÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. */


    <td bgcolor=black align=center width=200>
    <a href =shop.php?chanl=sub&sel=$sel>
    <font style='font-size:13px;font-style:italic;color:#ffd700'>
    <b>ÁÖ¹®Çϱâ</b></font></a></td>
    /* ¹Ù±¸´Ï¿¡ ´ãÀº »óÇ°À» ÁÖ¹® Çϱâ À§ÇÑ ¸µÅ© ÀÔ´Ï´Ù. shop.php ÆÄÀÏÀÇ chanl=subÇ׸ñÀ» ½ÇÇà ÇÏ¸ç »óÇ° Á¾¸ñÀ» Àü´ÞÇÕ´Ï´Ù. */


    <td bgcolor=black align=right width=200>
    <font style='font-size:13px;font-style:italic;color:blue'>
    <b>Ãѱݾ×</b></font></td>


    <td bgcolor=black align=center width=200>
    <font style='font-size:13px;font-style:italic;color:red'>
    <b>$total ¿ø</b></font></td>
    /* ¹Ù±¸´Ï¿¡ ´ãÀº »óÇ°ÀÇ ÃÑ ±Ý¾×À» Ãâ·Â ÇÕ´Ï´Ù. */


    </tr>
    </table>
    </center>
    </html> ");

shop.php Àüü ÄÚµå

    <?php
    session_start();
    ?>


    <?

    include('shop_e.php');

    if(!$username || $username == guest)
    {
      echo("
      <script>
      window.alert('Login Çϼ¼¿ä. Guest°Å³ª ID°¡ ¾øÀ¸½Å ºÐÀº ȸ¿ø °¡ÀÔÀ» Çϼ¼¿ä')
      history.go(-1)
      </script>
      ");
      exit;
    }
    else
    {
      if(!$chanl)
      {
        main_shop($connect,$shop,$username,$sel);
      }


      if($chanl==shop_e)
      {
        add_pd($table,$username,$pdname,$num,$price,$connect,$sel);
        main_shop($connect,$shop,$username,$sel);
      }


      if($chanl ==item_show)
      {
        item_show($table,$username,$connect,$sel);
      }


      if($chanl == del_pd)
      {
        del_pd($username,$pdname,$connect,$sel);
        item_show($table,$username,$connect,$sel);
      }


      if($chanl == sub)
      {
        $ally = mysql_query("select user from shopuser where user='$username'  ",$connect);
        $t_num=mysql_num_rows($ally);


        if(!$t_num)
        {
          echo("
          <script>
          window.alert('¼±ÅÃÇÑ »óÇ°ÀÌ ¾ø½À´Ï´Ù.')
          history.go(-1)
          </script>
          ");
          exit;
        }


        mysql_select_db('selectuser',$connect);
        $ally = mysql_query("select resident,email,tel1,id from userin
        where id='$username'",$connect);
        $put=mysql_fetch_array($ally);


        echo("
        <html>
        <title>
        sub html
        </title>
        <body bgcolor=black>
        <center>
        <img src=skyt1.jpg border=0>
        <br>


        <form method=post action=shop.php>
        <input type=hidden name=chanl value=sub_e>
        <input type=hidden name=sel value=$sel>


        <table border=0 cellspacing=2 cellpadding=2 width=700 >
        <tr><font style='font-size:13px;font-style:italic;color:#fffff0'>
        (* Ãß°¡ ÁÖ¹®½Ã '½ÅûÇÕ´Ï´Ù'¸¸ Ŭ¸¯ ÇÏ¸é µË´Ï´Ù.)</font>
        <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~¹ÞÀ»ÁÖ¼Ò</b></font></td>


        <td bgcolor=black align=left><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <input type=text name=address size=44></font></td>
        </tr>
        <tr>


        <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~Name</b></font></td>


        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <input type=text name=name size=10></font></td>
        </tr>
        <tr>


        <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~ÁֹιøÈ£</b></font></td>


        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
        $put[resident]</font></td>
        </tr>
        <tr>


        <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~Id</b></font></td>


        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
        $put[id]</font></td>
        </tr>
        <tr>

        <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~ÀÔ±ÝÀºÇà</b></font></td>


        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <select name=inmoney>
          <option value=±¹¹ÎÀºÇà selected>±¹¹ÎÀºÇà
          <option value=ÇѺûÀºÇà>ÇѺûÀºÇà
          <option value=Á¶ÈïÀºÇà>Á¶ÈïÀºÇà
          <option value=¿ì¸®ÀºÇà>¿ì¸®ÀºÇà
        </select>
        </font></td>
        </tr>
        <tr>


        <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~E-mail</b></font></td>


        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
        $put[email]</font></td>
        </tr>
        <tr>
        <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~Tel</b></font></td>

        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
        $put[tel1]</font></td>
        </tr>
        <tr>


        <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~¹è´Þ½Ã°£</b></font></td>


        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <select name=edata1>
          <option value=2000 selected>Y2K
          <option value=2001>Y21
        </select>
        <select name=edata2>
          <option value=1>1mon
          <option value=2>2mon
          <option value=3>3mon
          <option value=4 selected>4mon
          <option value=5>5mon
          <option value=6>6mon
          <option value=7>7mon
          <option value=8>8mon
          <option value=9>9mon
          <option value=10>10mon
          <option value=11>11mon
          <option value=12>12mon
          </select>
          <select name=edata3>
          <option value=1>1day
          <option value=2>2day
          <option value=3>3day
          <option value=4>4day
          <option value=5>5day
          <option value=6>6day
          <option value=7>7day
          <option value=8>8day
          <option value=9>9day
          <option value=10>10day
          <option value=11>11day
          <option value=12>12day
          <option value=13>13day
          <option value=14 selected>14day
          <option value=15>15day
          <option value=16>16day
          <option value=17>17day
          <option value=18>18day
          <option value=19>19day
          <option value=20>20day
          <option value=21>21day
          <option value=22>22day
          <option value=23>23day
          <option value=24>24day
          <option value=25>25day
          <option value=26>26day
          <option value=27>27day
          <option value=28>28day
          <option value=29>29day
          <option value=30>30day
          <option value=31>31day
        </select>
        <select name=edata4>
          <option value=am>A.m
          <option value=pm selected>P.m
        </select>
        <select name=edata5>
          <option value=1>1si
          <option value=2>2si
          <option value=3 selected>3si
          <option value=4>4si
          <option value=5>5si
          <option value=6>6si
          <option value=7>7si
          <option value=8>8si
          <option value=9>9si
          <option value=10>10si
          <option value=11>11si
          <option value=12>12si
        </select>
        <select name=edata6>
          <option value=10>10
          <option value=20>20
          <option value=30>30
          <option value=40 selected>40
          <option value=50>50
          <option value=00>00
        </select>
        </font></td>
        </tr>
        </table>
        <br><br>
        <table border=0 cellspacing=2 cellpadding=2 width=700 >
        <tr>


        <td bgcolor=black align=center width=200>
        <a href =shop.php?user=$username&sel=$sel>
        <font style='font-size:13px;font-style:italic;color:#ffd700'>
        <b>¼îÇÎ °è¼ÓÇϱâ</b></font></a></td>
        

        <td bgcolor=black align=center width=200>
        <a href =shop.php?user=$user&chanl=item_show&sel=$sel>
        <font style='font-size:13px;font-style:italic;color:#ffd700'>
        <b>¹Ù±¸´Ï</b></font></a></td>


        <td bgcolor=black align=center ><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <input type=submit value=½ÅûÇÕ´Ï´Ù.>
        <input type=reset  value=Áö¿ì±â></font></td>
        </tr>
        </table>
        </form>
        </center>
        </body>
        </html>
        ");
      }


      if($chanl == sub_e)
      {
        $ally=mysql_query("select user,pduct,num,price,bprice from shopuser
        where user='$username'",$connect);

        $t_num=mysql_num_rows($ally);


        if($edata4 == am && $edata5 == 12)
        {
          $ap = "00" ;
        }
        if($edata4 == pm && $edata5 == 12)
        {
          $ap = "12" ;
        }
        if($edata4 == am)
        {
          $ap = $edata5 ;
        }
        if($edata4 == pm)
        {
          $ap = $edata5 +"12" ;
        }
        $edate = "$edata1-$edata2-$edata3-$ap-$edata6";
  

        for($pd=$t_num ; $pd > 0 ; $pd--)
        {
          $put=mysql_fetch_array($ally);
          $ally2=mysql_query("select * from sub where user='$username'
          and pduct='$put[pduct]'",$connect);


          $put2=mysql_fetch_array($ally2);


          if($put2[pduct] != $put[pduct])
          {
            $numall = $put[num] ;

            error_view($edate,$address,$inmoney,$name);

            mysql_query("insert into sub values('$username','$edate','$put[pduct]',
            '$put[price]','$put[bprice]','$numall','$inmoney','$name','$address')",$connect);
          }
          else
          {
            $numall = $put[num] + $put2[num] ;

            mysql_query("update sub set num='$numall'
            where user='$username' and pduct='$put2[pduct]'",$connect);
          }
        }  


        echo("
        <html>
        <body>
        <center>
        <form method=post action=shop.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>½Åû µÇ¾ú½À´Ï´Ù</b></font>


        <input type=hidden name=chanl value=sub2>
        <input type=hidden name=sel value=$sel>
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");
      }


      if($chanl == sub2)
      {
        $ally=mysql_query("select * from sub where user='$username' ",$connect);


        mysql_select_db('selectuser',$connect);
        $ally2=mysql_query("select resident,tel1,id from userin
        where id='$username' ",$connect);


        $put=mysql_fetch_array($ally2);
        $t_num2=mysql_num_rows($ally);


        if(!$t_num2)
        {  
          echo("
          <script>
          window.alert('ÁÖ¹®ÇÑ »óÇ°ÀÌ ¾ø½À´Ï´Ù.')
          history.go(-1)
          </script>
          ");
          exit;
        }


        echo("
        <html>
        <title>
        sub html
        </title>


        <body bgcolor=black>
        <center>
        <img src=skyt1.jpg border=0>
        <br>

        <table border=0 cellspacing=2 cellpadding=2 width=600>

        <tr>
        <td bgcolor=white colspan=5 align=center colspan=2>
        <font style='font-size:13px;font-style:italic;color:black'>
        <b> °è»ê¼­~</b></font></td>
        </tr>
        <tr>


        <td bgcolor=#808080 align=center width=200>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~Ç°¸í</b></font></td>
      

        <td bgcolor=#808080 align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~¼ö·®</b></font></td>


        <td bgcolor=#808080 align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~´Ü°¡</b></font></td>


        <td bgcolor=#808080 align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~Èñ¸Á µµÂøÀÏ</b></font></td>
        </tr>
        ");


        for($pd=$t_num2 ; $pd >= 1 ; $pd--)
        {
          $put2=mysql_fetch_array($ally);
          $total = $total+($put2[bprice] * $put2[num]);

  
          echo("
          <tr>


          <td bgcolor=black align=center>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$put2[pduct]</b></font></td>


          <td bgcolor=black align=center>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$put2[num]ea</b></font></td>


          <td bgcolor=black align=center>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$put2[bprice]¿ø</b></font></td>


          <td bgcolor=black align=center>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$put2[wdate]</b></font></td>
          </tr>
          ");
        }


        echo("
        </table>
        <table border=0 cellspacing=2 cellpadding=2 width=600>
        <tr>


        <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~¹ÞÀ»ÁÖ¼Ò</b></font></td>


        <td bgcolor=black align=left><font style='font-size:13px;font-style:italic;color:#fffff0'>
        $put2[address]</font></td>
        </tr>
        <tr>


        <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~Name</b></font></td>


        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
        $put2[name]</font></td>
        </tr>
        <tr>


        <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~Id</b></font></td>


        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
        $put[id]</font></td>
        </tr>
        <tr>


        <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~ÁֹιøÈ£</b></font></td>


        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
        $put[resident]</font></td>
        </tr>
        <tr>


        <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~ÀÔ±ÝÀºÇà</b></font></td>


        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
        $put2[inmoney] ¿¹±ÝÁÖ:cry 444-44-44-444</font></td>
        </tr>
        <tr>

        <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~Tel</b></font></td>


        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
        $put[tel1]</font></td>
        </tr>
        <tr>


        <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~Ãѱݾ×</b></font></td>


        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:red'>
        <b>$total</b>¿ø</font></td>
        </tr>
        </table>
        <br>

        <table border=0 cellspacing=2 cellpadding=2 width=700 >


        <td bgcolor=black align=center width=200>
        <a href =shop.php?user=$username&sel=$sel>
        <font style='font-size:13px;font-style:italic;color:#ffd700'>
        <b>¼îÇÎ °è¼ÓÇϱâ</b></font></a></td>


        <td bgcolor=black align=center width=200>
        <a href =shop.php?chanl=item_show&sel=$sel>
        <font style='font-size:13px;font-style:italic;color:#ffd700'>
        <b>¹Ù±¸´Ï</b></font></a></td>


        <td bgcolor=black align=center width=200>
        <a href =shop.php?chanl=del&sel=$sel>
        <font style='font-size:13px;font-style:italic;color:#ffd700'>
        <b>ÁÖ¹®Ãë¼Ò</b></font></a></td>
        </tr>
        </table>
        </center>
        </body>
        </html>
        ");
      }


      if($chanl == del )
      {
        mysql_query("delete from sub where user='$username' ",$connect);
        mysql_query("delete from shopuser where user='$username'",$connect);


        echo("
        <html>
        <body>
        <center>
        <form method=post action=shop.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>½ÅûÀÌ »èÁ¦ µÇ¾ú½À´Ï´Ù</b></font>
        <input type=hidden name=sel value=$sel>
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");
      }
    }

    ?>

¼Ò½º ¼³¸í

    shop.php ÆÄÀÏÀº shop_e.php ÆÄÀÏÀÇ ÇÔ¼ö¸¦ ÀÌ¿ëÇؼ­ È­¸é¿¡ Ãâ·Â ÇÏ´Â ·çƾ°ú ID ¼¼¼ÇÀ» ÀÌ¿ëÇÑ »ç¿ëÀÚ
    Á¢±ÙÀ» ¼³Á¤ ÇÕ´Ï´Ù.   ¼¼¼ÇÀÇ °æ¿ì °¡ÀÔÀÚÀÇ ID¸¦ ±×´ë·Î »ç¿ëÇؼ­ ¸¸µé±â ¶§¹®¿¡ ¹®Á¦Á¡ÀÌ ÀÖÀ» ¼ö
    ÀÖ½À´Ï´Ù.   Áï rand( ) ÇÔ¼ö¸¦ »ç¿ëÇؼ­ °¢ IDº° ¼¼¼ÇÀ» ¹«ÀÛÀ§ ¼ö·Î ¼³Á¤ ÇÏ´Â ¹æ¹ýÀ» »ç¿ëÇÏ¸é º¸´Ù 
    ¾ÈÀüÇÒ ¼ö ÀÖ½À´Ï´Ù.   ÀÌ°ÍÀº ÄíÅ°µµ ¸¶Âù°¡Áö ÀÔ´Ï´Ù. ¸¸¾à ¾î¶² »ç¿ëÀÚ°¡ ½ºÅ©¸³Æ®¸¦ ÀÌ¿ëÇؼ­ ÇØ´ç
    IDÀÇ ¼¼¼ÇÀ» »ý¼ºÇÏ°í Á¢±Ù ÇÑ´Ù¸é ¹®Á¦°¡ µÉ ¼ö ÀÖ½À´Ï´Ù.

ID ¼¼¼Ç ¼³Á¤

    <?php
    session_start();
    ?>
    /* ¼¼¼ÇÀ» ½ÃÀÛ ÇÕ´Ï´Ù. ·Î±×ÀÎÇÑ ID ¼¼¼ÇÀ» ½ÃÀÛ ÇÕ´Ï´Ù. */


    <?

    include('shop_e.php');
    /* shop_e.php ÆÄÀÏÀÇ ÇÔ¼ö¸¦ Æ÷ÇÔ ÇÕ´Ï´Ù. */

    if(!$username || $username == guest)
    {
      echo("
      <script>
      window.alert('Login Çϼ¼¿ä. Guest°Å³ª ID°¡ ¾øÀ¸½Å ºÐÀº ȸ¿ø °¡ÀÔÀ» Çϼ¼¿ä')
      history.go(-1)
      </script>");
      exit;
      }
      else
      {
      /* ID ¼¼¼ÇÀÌ ¾ø°Å³ª ·Î±×ÀÎÇÑ ID ¼¼¼ÇÀÌ guest ÀÏ °æ¿ì ¼îÇÎ ¸ôÀ» »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.
         ±× ¹ÛÀÇ °æ¿ì ¼îÇÎ ¸ôÀÇ ¸ðµç È­¸éÀ» º¼ ¼ö ÀÖ½À´Ï´Ù.
         Áï ¼¼¼ÇÀÇ ¿µ¿ªÀº if( ){    ~   }else{  ¼îÇÎ ¸ôÀÇ °¢ È­¸é }  ÀÔ´Ï´Ù.*/

¸ÞÀÎ È­¸é Ãâ·Â

    if(!$chanl)
    {
      main_shop($connect,$shop,$username,$sel);
    }
    /* chanl ÀÌ ¾øÀ» °æ¿ì ¼îÇÎ ¸ôÀÇ ¸ÞÀÎ È­¸éÀ» Ãâ·Â ÇÕ´Ï´Ù. */

»óÇ° ¹Ù±¸´Ï ´ã±â

    if($chanl==shop_e)
    {
      add_pd($table,$username,$pdname,$num,$price,$connect,$sel);
      main_shop($connect,$shop,$username,$sel);
    }
    /* chanlÀÌ shop_eÀÏ °æ¿ì ±¸¸ÅÀÚ°¡ ¼±ÅÃÇÑ »óÇ°À» ÇØ´ç ¹Ù±¸´Ï¿¡ ÀúÀå ÇÏ°í ´Ù½Ã ¼îÇÎ ¸ô ¸ÞÀÎ È­¸éÀ¸·Î À̵¿ ÇÕ´Ï´Ù. */

¹Ù±¸´Ï »óÇ° º¸¿©ÁÖ±â

    if($chanl ==item_show)
    {
      item_show($table,$username,$connect,$sel);
    }
    /* chanlÀÌ item_showÀÏ ¶§ ±¸¸ÅÀÚ°¡ ¼±ÅÃÇÑ »óÇ°À» ´ãÀº ¹Ù±¸´ÏÀÇ ³»¿ëÀ» Ãâ·Â ÇÕ´Ï´Ù. */

¹Ù±¸´Ï »óÇ° »èÁ¦ Çϱâ

    if($chanl == del_pd)
    {
      del_pd($username,$pdname,$connect,$sel);
      item_show($table,$username,$connect,$sel);
    }
    /* chanlÀÌ del_pdÀÏ ¶§ ¼±ÅÃÇÑ »óÇ°À» ¹Ù±¸´Ï¿¡¼­ »èÁ¦ ÇÏ°í ´Ù½Ã ¹Ù±¸´ÏÀÇ ³²Àº »óÇ°À» Ãâ·Â ÇÕ´Ï´Ù. */

»óÇ° ÁÖ¹®Çϱâ

    if($chanl == sub)
    {
    /* chanlÀÌ subÀÏ °æ¿ì ¾Æ·¡ÀÇ Ç׸ñÀ» ½ÇÇà ÇÕ´Ï´Ù. */

      $ally = mysql_query("select user from shopuser where user='$username'  ",$connect);
      $t_num=mysql_num_rows($ally);
      /* ¹Ù±¸´Ï(shopuser Å×À̺í)¿¡¼­ ÇØ´ç ID°¡ ¼±ÅÃÇÑ »óÇ°ÀÌ ÀÖ´ÂÁö °Ë»ö ÇÕ´Ï´Ù. */


      if(!$t_num)
      {
        echo("
        <script>
        window.alert('¼±ÅÃÇÑ »óÇ°ÀÌ ¾ø½À´Ï´Ù.')
        history.go(-1)
        </script>
        ");
        exit;
      }
      /* ¹Ù±¸´Ï¿¡ ¼±ÅÃÇÑ »óÇ°ÀÌ Çϳªµµ ¾øÀ» °æ¿ì Ãâ·Â ÇÏ´Â È­¸é ÀÔ´Ï´Ù. */


      mysql_select_db('selectuser',$connect);
      /* ·Î±×ÀÎÇÑ ID ¼¼¼ÇÀÇ »ç¿ëÀÚ Á¤º¸¸¦ °¡Á® ¿À±â À§ÇØ selectuser µ¥ÀÌÅÍ º£À̽º¸¦ ¼±Åà ÇÕ´Ï´Ù. */


      $ally = mysql_query("select resident,email,tel1,id from userin
      where id='$username'",$connect);
      /* ÇØ´ç ID ¼¼¼ÇÀ» °¡Áø ±¸¸ÅÀÚÀÇ Á¤º¸¸¦ °Ë»ö ÇÕ´Ï´Ù. */


      $put=mysql_fetch_array($ally);
      /* ±¸¸ÅÀÚÀÇ Á¤º¸¸¦ ¹è¿­·Î ÀúÀå ÇÕ´Ï´Ù. */


      echo("
      <html>
      <title>
      sub html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>


      <form method=post action=shop.php>
      <input type=hidden name=chanl value=sub_e>


      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr><font style='font-size:13px;font-style:italic;color:#fffff0'>
      (* Ãß°¡ ÁÖ¹®½Ã '½ÅûÇÕ´Ï´Ù'¸¸ Ŭ¸¯ ÇÏ¸é µË´Ï´Ù.)</font>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~¹ÞÀ»ÁÖ¼Ò</b></font></td>


      <td bgcolor=black align=left><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=address size=44></font></td>
      /* »óÇ°À» ¹ÞÀ» ÁÖ¼Ò¸¦ ÀÔ·Â ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù. */


      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Name</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=name size=10></font></td>
      /* ÇØ´ç ±¸¸ÅÀÚÀÇ ½ÇÁ¦ À̸§À» ÀÔ·Â ÇÏ´Â °÷ÀÔ´Ï´Ù. */


      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~ÁֹιøÈ£</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $put[resident]</font></td>
      /* ÇØ´ç ±¸¸ÅÀÚÀÇ ÁֹΠ¹øÈ£¸¦ ÀÔ·Â ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù. */


      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Id</b></font></td>

      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $put[id]</font></td>
      /* ÇØ´ç ±¸¸ÅÀÚÀÇ ·Î±×ÀÎ ¶§ »ç¿ëÇÑ ID¸¦ Ãâ·Â ÇÕ´Ï´Ù. */

      </tr>
      <tr>

      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~ÀÔ±ÝÀºÇà</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <select name=inmoney>
        <option value=±¹¹ÎÀºÇà selected>±¹¹ÎÀºÇà
        <option value=ÇѺûÀºÇà>ÇѺûÀºÇà
        <option value=Á¶ÈïÀºÇà>Á¶ÈïÀºÇà
        <option value=¿ì¸®ÀºÇà>¿ì¸®ÀºÇà
      </select>
      </font></td>
      /* »óÇ° ´ë±ÝÀ» °áÁ¦ Çϱâ À§ÇÑ ÀºÇàÀ» ¼±ÅÃÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù. */

      </tr>
      <tr>

      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~E-mail</b></font></td>

      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $put[email]</font></td>
      /* ÇØ´ç ±¸¸ÅÀÚÀÇ ¸ÞÀÏ ÁÖ¼Ò¸¦ Ãâ·Â ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù. */

      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Tel</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $put[tel1]</font></td>
      /* ÇØ´ç ±¸¸ÅÀÚÀÇ ÀüÈ­¹øÈ£¸¦ Ãâ·Â ÇÕ´Ï´Ù. */


      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~¹è´Þ½Ã°£</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <select name=edata1>
      <option value=2000 selected>Y2K
      <option value=2001>Y21
      </select>
      <select name=edata2>
        <option value=1>1mon
        <option value=2>2mon
        <option value=3>3mon
        <option value=4 selected>4mon
        <option value=5>5mon
        <option value=6>6mon
        <option value=7>7mon
        <option value=8>8mon
        <option value=9>9mon
        <option value=10>10mon
        <option value=11>11mon
        <option value=12>12mon
      </select>
        <select name=edata3>
        <option value=1>1day
        <option value=2>2day
        <option value=3>3day
        <option value=4>4day
        <option value=5>5day
        <option value=6>6day
        <option value=7>7day
        <option value=8>8day
        <option value=9>9day
        <option value=10>10day
        <option value=11>11day
        <option value=12>12day
        <option value=13>13day
        <option value=14 selected>14day
        <option value=15>15day
        <option value=16>16day
        <option value=17>17day
        <option value=18>18day
        <option value=19>19day
        <option value=20>20day
        <option value=21>21day
        <option value=22>22day
        <option value=23>23day
        <option value=24>24day
        <option value=25>25day
        <option value=26>26day
        <option value=27>27day
        <option value=28>28day
        <option value=29>29day
        <option value=30>30day
        <option value=31>31day
      </select>
      <select name=edata4>
        <option value=am>A.m
        <option value=pm selected>P.m
      </select>
      <select name=edata5>
        <option value=1>1si
        <option value=2>2si
        <option value=3 selected>3si
        <option value=4>4si
        <option value=5>5si
        <option value=6>6si
        <option value=7>7si
        <option value=8>8si
        <option value=9>9si
        <option value=10>10si
        <option value=11>11si
        <option value=12>12si
      </select>
      <select name=edata6>
        <option value=10>10
        <option value=20>20
        <option value=30>30
        <option value=40 selected>40
        <option value=50>50
        <option value=00>00
      </select>
      </font></td>
      /* select¹®À» ÀÌ¿ëÇØ »óÇ°À» ¹ÞÀ» ³¯Â¥¿Í ½Ã°£À» ÀÔ·Â ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù. */


      </tr>
      </table>
      <br><br>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>


      <td bgcolor=black align=center width=200>
      <a href =shop.php?user=$username&sel=$sel>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>¼îÇÎ °è¼ÓÇϱâ</b></font></a></td>
      /* ÇØ´ç »óÇ° Á¾¸ñÀÇ ¼îÇÎ ¸ÞÀÎ È­¸éÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. */


      <td bgcolor=black align=center width=200>
      <a href =shop.php?user=$user&chanl=item_show&sel=$sel>

      <font style='font-size:13px;font-style:italic;color:#ffd700'>

      <b>¹Ù±¸´Ï</b></font></a></td>

      /* ÇØ´ç ±¸¸ÅÀÚÀÇ ¹Ù±¸´Ï·Î ¸µÅ© ÇÕ´Ï´Ù. */


      <td bgcolor=black align=center ><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=½ÅûÇÕ´Ï´Ù.>
      <input type=reset  value=Áö¿ì±â></font></td>
      /* À§ ÀÔ·Â »çÇ×À» ÁÖ¹®¼­ Å×ÀÌºí¿¡ Àü´Þ ÇÏ´Â "½ÅûÇÕ´Ï´Ù" ¹öÆ°À» »ý¼º ÇÕ´Ï´Ù. */
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }

½ÅûÇÑ »óÇ° Á¤º¸ ÀúÀå Çϱâ

    if($chanl == sub_e)
    {
      /* chanlÀÌ sub_eÀÏ ¶§ ¾Æ·¡ Ç׸ñÀ» ½ÇÇà ÇÕ´Ï´Ù. */


      $ally=mysql_query("select user,pduct,num,price,bprice from shopuser
      where user='$username'",$connect);
      /* ¹Ù±¸´Ï Å×ÀÌºí¿¡¼­ ÇØ´ç ±¸¸ÅÀÚ°¡ ¼±ÅÃÇÑ »óÇ° Á¤º¸¸¦ °Ë»ö ÇÕ´Ï´Ù. */


      $t_num=mysql_num_rows($ally);
      /* ¹Ù±¸´ÏÀÇ »óÇ° ¼ö·®À» °Ë»öÇÏ°í $t_num º¯¼ö¿¡ ÀúÀå ÇÕ´Ï´Ù. */


      if($edata4 == am && $edata5 == 12)
      {
        $ap = "00" ;
      }
      if($edata4 == pm && $edata5 == 12)
      {
        $ap = "12" ;
      }
      if($edata4 == am)
      {
        $ap = $edata5 ;
      }
      if($edata4 == pm)
      {
        $ap = $edata5 +"12" ;
      }
     

      $edate = "$edata1-$edata2-$edata3-$ap-$edata6";
      /* »óÇ° ¹è´Þ ³¯Â¥¿Í ½Ã°£À» am ,pm ¿©ºÎ¸¦ °Ë»ö ÇÏ°í $edate º¯¼ö¿¡ ÀúÀå ÇÕ´Ï´Ù. */


      for($pd=$t_num ; $pd > 0 ; $pd--)
      {
      /* ¹Ù±¸´ÏÀÇ »óÇ° ¼ö·® ¸¸Å­ ·çÇÁ¸¦ ¹Ýº¹ ÇÕ´Ï´Ù. */


        $put=mysql_fetch_array($ally);
        /* ¹Ù±¸´ÏÀÇ »óÇ° Á¤º¸¸¦ ¹è¿­·Î ÀúÀå ÇÕ´Ï´Ù. */


        $ally2=mysql_query("select * from sub where user='$username'
        and pduct='$put[pduct]'",$connect);
        /* ÇØ´ç ±¸¸ÅÀÚÀÇ ÇØ´ç »óÇ°ÀÌ ÁÖ¹® Å×À̺í(sub)¿¡ Á¸Àç ÇÏ´ÂÁö °Ë»ö ÇÕ´Ï´Ù. */


        $put2=mysql_fetch_array($ally2);
        /* ÇØ´ç ±¸¸ÅÀÚÀÇ ÇØ´ç »óÇ°ÀÇ Á¤º¸¸¦ $put2 º¯¼ö¿¡ ¹è¿­·Î ÀúÀå ÇÕ´Ï´Ù. */


        if($put2[pduct] != $put[pduct])
        {
        /* ÁÖ¹®¼­ Å×À̺í(sub)¿¡ ÇØ´ç ±¸¸ÅÀÚ°¡ ÀÌÀü¿¡ ½ÅûÇÑ »óÇ°ÀÌ ¾øÀ» °æ¿ì ½ÇÇà ÇÕ´Ï´Ù. */

          $numall = $put[num] ;

          error_view($edate,$address,$inmoney,$name);


          mysql_query("insert into sub values('$username','$edate','$put[pduct]',
          '$put[price]','$put[bprice]','$numall','$inmoney','$name','$address')",$connect);
          /* ÇØ´ç ±¸¸ÅÀÚ°¡ ½ÅûÇÑ »õ·Î¿î »óÇ°ÀÇ Á¤º¸¸¦ sub Å×ÀÌºí¿¡ ÀúÀå ÇÕ´Ï´Ù. */
        }
        else
        {
        /* ÇØ´ç ±¸¸ÅÀÚ°¡ »õ·Ó°Ô ½ÅûÇÑ »óÇ°ÀÌ sub Å×ÀÌºí¿¡ Á¸ÀçÇÒ °æ¿ì ½ÇÇà ÇÕ´Ï´Ù. */


          $numall = $put[num] + $put2[num] ;


          mysql_query("update sub set num='$numall'
          where user='$username' and pduct='$put2[pduct]'",$connect);
          /* sub Å×À̺íÀÇ »óÇ°°ú »õ·Ó°Ô ½ÅûÇÑ »óÇ°ÀÌ °°À¸¹Ç·Î °»½ÅÇؼ­ sub Å×ÀÌºí¿¡ ÀúÀå ÇÕ´Ï´Ù. */

        }
      }


      echo("
      <html>
      <body>
      <center>
      <form method=post action=shop.php>
      <font style='font-size:13px;font-style:italic;color:#808080'>
      <b>½Åû µÇ¾ú½À´Ï´Ù</b></font>
      <input type=hidden name=chanl value=sub2>
      <input type=hidden name=sel value=$sel>
      <input type=submit value=È®ÀÎ>
      </form>
      </center>
      </body>
      </html>
      ");
      /* ¸ðµç »óÇ°ÀÇ ÁÖ¹® ÀÔ·ÂÀ» ÇÏ°í ÁÖ¹® ÇöȲ È­¸éÀ¸·Î ¸µÅ©ÇÏ´Â "È®ÀÎ" ¹öÆ°À» »ý¼º ÇÕ´Ï´Ù.*/
    }

ÁÖ¹® ÇöȲ ¸¸µé±â

    if($chanl == sub2)
    {
    /* chanlÀÌ sub2ÀÏ °æ¿ì ½ÇÇà ÇÕ´Ï´Ù. */


      $ally=mysql_query("select * from sub where user='$username' ",$connect);
      /* ÇØ´ç ±¸¸ÅÀÚ°¡ ÁÖ¹®ÇÑ »óÇ° Á¤º¸¸¦ sub Å×ÀÌºí¿¡¼­ °Ë»ö ÇÕ´Ï´Ù. */


      mysql_select_db('selectuser',$connect);
      /* ÇØ´ç ±¸¸ÅÀÚ°¡ »ç¿ëÇÑ ID ¼¼¼ÇÀÇ Á¤º¸¸¦ °Ë»öÇϱâ À§ÇØ selectuser µ¥ÀÌÅÍ º£À̽º¸¦ ¼±Åà ÇÕ´Ï´Ù. */


      $ally2=mysql_query("select resident,tel1,id from userin
      where id='$username' ",$connect);
      /* ÇØ´ç ID ¼¼¼ÇÀ» °¡Áø ±¸¸ÅÀÚÀÇ Á¤º¸¸¦ °Ë»ö ÇÕ´Ï´Ù. */


      $put=mysql_fetch_array($ally2);
      /* ÇØ´ç ID ¼¼¼ÇÀÇ Á¤º¸¸¦ $put º¯¼ö¿¡ ÀúÀå ÇÕ´Ï´Ù. */


      $t_num2=mysql_num_rows($ally);
      /* ÇØ´ç ±¸¸ÅÀÚ°¡ ½ÅûÇÑ »óÇ°ÀÇ ¼ö·®À» $t_num2 º¯¼ö¿¡ ÀúÀå ÇÕ´Ï´Ù.*/


      if(!$t_num2)
      {
        echo("
        <script>
        window.alert('ÁÖ¹®ÇÑ »óÇ°ÀÌ ¾ø½À´Ï´Ù.')
        history.go(-1)
        </script>
        ");
        exit;
      }
      /* ÇØ´ç ±¸¸ÅÀÚ°¡ ½ÅûÇÑ »óÇ°ÀÌ ¾øÀ» °æ¿ì Ãâ·ÂÇÏ´Â È­¸é ÀÔ´Ï´Ù. */


      echo("
      <html>
      <title>
      sub html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>


      <table border=0 cellspacing=2 cellpadding=2 width=600>
      <tr>


      <td bgcolor=white colspan=5 align=center colspan=2>
      <font style='font-size:13px;font-style:italic;color:black'>
      <b> °è»ê¼­~</b></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080 align=center width=200>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Ç°¸í</b></font></td>


      <td bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~¼ö·®</b></font></td>


      <td bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~´Ü°¡</b></font></td>


      <td bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Èñ¸Á µµÂøÀÏ</b></font></td>
      </tr>
      ");


      for($pd=$t_num2 ; $pd >= 1 ; $pd--)
      {
      /* ÇØ´ç ±¸¸ÅÀÚ°¡ ½ÅûÇÑ »óÇ°ÀÇ ¼ö·® ¸¸Å­ ·çÇÁ¸¦ ¹Ýº¹ ÇÕ´Ï´Ù. */


        $put2=mysql_fetch_array($ally);
        /* ÇØ´ç ±¸¸ÅÀÚ°¡ ½ÅûÇÑ »óÇ°ÀÇ Á¤º¸¸¦ $put2 º¯¼ö¿¡ ÀúÀå ÇÕ´Ï´Ù. */


        $total = $total+($put2[bprice] * $put2[num]);
        /* ÁÖ¹®ÇÑ »óÇ°ÀÇ ÃÑ °¡°ÝÀ» ±¸ÇÕ´Ï´Ù. */


        echo("
        <tr>
        <td bgcolor=black align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$put2[pduct]</b></font></td>
        /* ÁÖ¹®ÇÑ »óÇ° À̸§À» Ãâ·Â ÇÕ´Ï´Ù. */


        <td bgcolor=black align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$put2[num]ea</b></font></td>
        /* ÁÖ¹®ÇÑ »óÇ°ÀÇ ¼ö·®À» Ãâ·Â ÇÕ´Ï´Ù. */


        <td bgcolor=black align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$put2[bprice]¿ø</b></font></td>
        /* ÁÖ¹®ÇÑ »óÇ°ÀÇ ±âº» ´Ü°¡¸¦ Ãâ·Â ÇÕ´Ï´Ù. */


        <td bgcolor=black align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$put2[wdate]</b></font></td>
        </tr>
        /* ÁÖ¹®ÇÑ »óÇ°ÀÇ Èñ¸Á µµÂø ³¯Â¥¸¦ Ãâ·Â ÇÕ´Ï´Ù. */
        ");
      }


      echo("
      </table>
      <table border=0 cellspacing=2 cellpadding=2 width=600>
      <tr>


      <td bgcolor=#808080>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~¹ÞÀ»ÁÖ¼Ò</b></font></td>


      <td bgcolor=black align=left>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      $put2[address]</font></td>
      /* ÁÖ¹®ÇÑ »óÇ°À» ¹ÞÀ» ÁÖ¼Ò¸¦ Ãâ·Â ÇÕ´Ï´Ù. */


      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Name</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $put2[name]</font></td>
      /* »óÇ°À» ÁÖ¹®ÇÑ ±¸¸ÅÀÚ À̸§À» Ãâ·Â ÇÕ´Ï´Ù. */


      </tr>
      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Id</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $put[id]</font></td>
      /* »óÇ°À» ÁÖ¹®ÇÑ ±¸¸ÅÀÚÀÇ ID¸¦ Ãâ·Â ÇÕ´Ï´Ù. */


      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~ÁֹιøÈ£</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $put[resident]</font></td>
      /* »óÇ°À» ÁÖ¹®ÇÑ ±¸¸ÅÀÚÀÇ ÁֹΠ¹øÈ£¸¦ Ãâ·Â ÇÕ´Ï´Ù. */


      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~ÀÔ±ÝÀºÇà</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $put2[inmoney] ¿¹±ÝÁÖ:cry 444-44-44-444</font></td>
      /* »óÇ°ÀÇ ´ë±Ý °áÁ¦¸¦ À§ÇÑ ÀºÇàÀ» Ãâ·Â ÇÕ´Ï´Ù. */


      </tr>
      <tr>

      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Tel</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      $put[tel1]</font></td>
      /* »óÇ°À» ½ÅûÇÑ ±¸¸ÅÀÚÀÇ ÀüÈ­¹øÈ£¸¦ Ãâ·Â ÇÕ´Ï´Ù. */


      </tr>
      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Ãѱݾ×</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:red'>
      <b>$total</b>¿ø</font></td>
      </tr>
      /* ±¸¸ÅÀÚ°¡ ½ÅûÇÑ »óÇ°ÀÇ ÃÑ ±Ý¾×À» Ãâ·Â ÇÕ´Ï´Ù. */


      </table>
      <br>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <td bgcolor=black align=center width=200>
      <a href =shop.php?user=$username&sel=$sel>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>¼îÇÎ °è¼ÓÇϱâ</b></font></a></td>
      /* ÇØ´ç Á¾¸ñÀÇ ¼îÇÎ ¸ÞÀÎ È­¸éÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. */
      <td bgcolor=black align=center width=200>
      <a href =shop.php?chanl=item_show&sel=$sel>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>¹Ù±¸´Ï</b></font></a></td>


      <td bgcolor=black align=center width=200>
      <a href =shop.php?chanl=del&sel=$sel>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>ÁÖ¹®Ãë¼Ò</b></font></a></td>
      /* ÁÖ¹®ÇÑ »óÇ°ÀÇ ÁÖ¹® Ãë¼Ò È­¸éÀ¸·Î ¸µÅ© ÇÕ´Ï´Ù. */


      </tr>
      </table>
      </center>
      </body>
      </html>
      ");
    }

16. Admin ¿µ¿ª ¸¸µé±â

admin ¿µ¿ªÀº ÀÚ·á½Ç , °æ¸Å , ¼îÇÎ ¸ô , µ¥ÀÌÅÍ º£À̽º¿Í °ü·ÃÇØ °ü¸®ÀÚ°¡ ¼öÁ¤ÇÏ´Â ºÎºÐÀÌ¸ç ·Î±×ÀÎÀ» °ÅÃÄ Á¢±ÙÀÌ °¡´É ÇÕ´Ï´Ù.    AdminÀÇ ·Î±×ÀÎÀº ÄíÅ°¸¦ ºÎ¿© Çؼ­ admin ¿©ºÎ¸¦ È®ÀÎ ÇÕ´Ï´Ù.    ¸¸¾à ´Ù¸¥ ¹æ¹ýÀ¸·Î µ¥ÀÌÅÍ º£À̽ºÀÇ Á¢±Ù ¼³Á¤À» ÇÏ·Á¸é inc ÆÄÀÏ·Î µû·Î ¼³Á¤Çؼ­ »ç¿ëÇÏ´Â ¹æ¹ýµµ ÀÖ½À´Ï´Ù.

16.1 Admin Å×ÀÌºí ¸¸µé±â

    Å×À̺íÀº ÀÚ·á½Ç°ú °æ¸Å °Ô½ÃÆÇÀÇ Á¤º¸¸¦ ÀúÀå Çϴµ¥ »ç¿ë Çϸç ÀÚ·á½Ç , °æ¸Å Å×À̺í°ú ´Þ¸® Á÷Á¢ ¿©±â¼­
    »ý¼º ÇØ¾ß ÇÕ´Ï´Ù. 

µ¥ÀÌÅÍ º£À̽º ¸¸µé±â

    mysql"create databases adminp ;

    ÀÚ·á½Ç°ú °æ¸Å °Ô½ÃÆÇÀÇ Á¤º¸¸¦ ÀúÀåÇÑ µÎ°³ÀÇ Å×À̺íÀ» »ý¼º Çϱâ À§ÇØ adminp µ¥ÀÌÅÍ º£À̽º¸¦ ¸¸µì´Ï´Ù.

Å×ÀÌºí ¸¸µé±â

    ./mysql -u root -p adminp < adminp.sql

    adminp µ¥ÀÌÅÍ º£À̽º¿¡ CDÀÇ adminp.sql ÆÄÀÏÀ» ÀÌ¿ëÇؼ­ admin(°æ¸Å °Ô½ÃÆÇ Á¤º¸) , file(ÀÚ·á½Ç °Ô½ÃÆÇ Á¤º¸)
    Å×À̺íÀ» »ý¼º ÇÕ´Ï´Ù. 

Å×ÀÌºí ±¸¼º ÀÎÀÚµé

    admin ¿µ¿ª¿¡¼­ ÀÚ·á½Ç , °æ¸Å °Ô½ÃÆÇÀÇ Á¤º¸¸¦ º¸¿© ÁÖ±â À§ÇØ ÀúÀå ÇÏ´Â ºÎºÐÀÇ ÀÎÀÚµéÀÌ ÀÖÀ¸¸ç µ¥ÀÌÅÍ
    º£À̽º¿Í ȸ¿ø °ü¸® , ¼îÇÎ ¸ôÀÇ °æ¿ì admin ¿µ¿ª¿¡¼­ »ç¿ëÇÒ Å×À̺íÀº ¾ø½À´Ï´Ù.
    ÇÏÁö¸¸ ÀÌ ºÎºÐ ¿ª½Ã Å×À̺íÀ» »ç¿ëÇؼ­ º¸´Ù ü°èÀûÀÌ°í °ü¸®ÀÚ Ãø¸éÀÇ adminÀ» ±¸¼ºÇØ¾ß ÇÒ °Í ÀÔ´Ï´Ù. 
    ÀÌ°ÍÀº »çÀÌÆ®ÀÇ ´ëÇüÈ­¿¡¼­´Â ²À ÇÊ¿ä ÇÒ °ÍÀÔ´Ï´Ù.

°æ¸Å admin Å×À̺í(admin)

    °æ¸Å °Ô½ÃÆÇÀÇ ¹øÈ£¸¦ »ý¼ºÇÏ´Â Çʵå¿Í °Ô½ÃÆÇÀÇ ±Û¼ö µîÀ» º¸¿©ÁÖ°í ¾ÕÀ¸·Î °è¼ÓÀûÀÎ Ãß°¡¸¦ ¿øÇÒ °æ¿ì
    µ¥ÀÌÅͺ£À̽º adminÀ» ÀÌ¿ëÇØ Çʵ带 Ãß°¡ ÇÏ¸é µË´Ï´Ù.

 

    No - °æ¸Å °Ô½ÃÆÇÀÇ ¹øÈ£ ÀÔ´Ï´Ù.
    Title - °Ô½ÃÆÇÀÇ Á¦¸ñÀ» ÀúÀå ÇÕ´Ï´Ù.
    View - °æ¸Å °Ô½ÃÆÇÀ» ±¸¼ºÇÏ´Â ÀÔÂû Å×À̺íÀÇ À̸§À» ÀúÀå ÇÕ´Ï´Ù.
    Sum - ÇØ´ç °Ô½ÃÆÇÀÇ ±Û ¼ö¸¦ ÀúÀå ÇÕ´Ï´Ù.
    Wdate - °Ô½ÃÆÇÀÇ »ý¼º ³¯Â¥¸¦ ÀúÀå ÇÕ´Ï´Ù.
    Mview - °æ¸Å °Ô½ÃÆÇÀ» ±¸¼ºÇÏ´Â °æ¸Å °Ô½ÃÆÇ ¸ÞÀÎ Å×À̺í À̸§À» ÀúÀå ÇÕ´Ï´Ù.

ÀÚ·á½Ç admin Å×À̺í(file)

    ÀÚ·á½Ç °Ô½ÃÆÇÀÇ ±âº»ÀûÀÎ Á¤º¸¸¦ º¸¿© ÁÖ¸ç ÀúÀåÇÕ´Ï´Ù.

    No - °Ô½ÃÆÇÀÇ °íÀ¯ ¹øÈ£¸¦ ÀúÀå ÇÕ´Ï´Ù.
    Title - °Ô½ÃÆÇÀÇ Á¦¸ñÀ» ÀúÀå ÇÕ´Ï´Ù.
    View - ÀÚ·á½Ç ÀÀ´ä±Û Å×À̺íÀÇ À̸§À» ÀúÀå ÇÕ´Ï´Ù.
    Sum - ÀÚ·á½Ç °Ô½ÃÆÇÀÇ µî·ÏµÈ ±Û ¼ö¸¦ ÀúÀå ÇÕ´Ï´Ù.
    Wdate - °Ô½ÃÆÇ »ý¼º ³¯Â¥¸¦ ÀúÀå ÇÕ´Ï´Ù.
    Mview - ÀÚ·á½Ç °Ô½ÃÆÇÀ» ±¸¼ºÇÏ´Â ÀÚ·á½Ç °Ô½ÃÆÇ ¸ÞÀÎ Å×À̺í À̸§À» ÀúÀå ÇÕ´Ï´Ù.

16.2 ¼Ò½º ¸¸µé±â

admin ¿µ¿ªÀÇ ¼Ò½º´Â ÃÑ 3°³ÀÇ ÆÄÀÏ·Î ±¸¼º µË´Ï´Ù.    ¸ÕÀú °¢ È­¸éÀ» ÇÔ¼ö Çü½ÄÀ¸·Î Ç¥ÇöÇÑ db_func_all.php ÆÄÀÏ°ú ÀÌ°ÍÀ» ÀÌ¿ëÇØ È­¸é Ãâ·ÂÀ» ÇÏ´Â db_view.php ÆÄÀÏ ±×¸®°í admin ¿µ¿ªÀÇ ·Î±×ÀÎ(ÄíÅ°¸¦ »ý¼º ÇÕ´Ï´Ù.)À» ±¸¼ºÇÏ´Â logon.php ÆÄÀÏ ÀÔ´Ï´Ù.

db_func_all.php Àüü ÄÚµå

    <?php

    $connect = mysql_connect('localhost','root','gksmf444');

    ?>


    <?php

    function main($page,$connect,$select,$dbs,$tableput,$root)
    {

      if($select == tables)
      {
        mysql_select_db($dbs,$connect);
        $ally = mysql_query("show tables ",$connect);
        $t = "Table($dbs Db) hong il mansei~!";
        $link = "<a href=db_view.php?chanl=create_table&dbs=$dbs>";
        $linkdel = "<a href=db_view.php?chanl=dbdel&dbs=$dbs>";
        }
      if(!$select)
      {
        $ally = mysql_query("show databases ",$connect);
        $t = "Database Names hong il mansei~!" ;
        $link = "<a href =db_view.php?chanl=create_db>";
      }
      if($select == field)
      {
        mysql_select_db($dbs,$connect);
        $ally = mysql_query("describe $tableput " , $connect);
        $link1 = "<b><a href =db_view.php?chanl=main&select=tables&dbs=$dbs>
        ($dbs Db)</b></a> ";
        $link2 = "<b>($tableput Table)</b>";  
      }


      $t_num=mysql_num_rows($ally);
      $p_dip = 4 ;


      $p_page =4  ;
      $p_pagex = ceil($p_page / 2) ;
      $t_page = ceil($t_num / $p_dip) ;


      if(!$page)
      {
        $page = 1;
      }
      if( $page <= $p_pagex )
      {
        $p_start = $p_pagex + 1 ;
      }
      else
      {
        $p_start = $page + 1;
      }


      $pt_page = ceil($p_start - $p_pagex) ;
      $next_p = $page + 1 ;
      $pre_p = $page - 1 ;
      $start_num = ($t_num - ($page * $p_dip))+($p_dip-1) ;


      if($select == field)
      {
        echo("
        <html>
        <title>
        main_view html
        </title>
        <body bgcolor=black>
        <center>
        <img src=skyt1.jpg border=0>
        <br>
        <table border=0 cellspacing=2 cellpadding=2 width=700 >
        <tr>
        <th bgcolor=white colspan=7 align=left>
        <font style='font-size:12px;font-style:italic;color:#blue'>
        <b>$t_page / $page </b></font></th>
        </tr>
        <tr>


        <td bgcolor=#808080 width=150>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>Field</b></font></td>


        <td bgcolor=#808080 width=200 align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>Type</b></font></td>


        <td bgcolor=#808080 width=50 align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>Null</b></font></td>


        <td bgcolor=#808080 align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>Key</b></font></td>


        <td bgcolor=#808080 width=50 align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>Default</b></font></td>


        <td bgcolor=#808080 width=150 align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>Extra</b></font></td>
        </tr>
        ");
      }
      else
      {
        echo("
        <html>
        <title>
        main_view html
        </title>
        <body bgcolor=black>
        <center>
        <img src=skyt1.jpg border=0>
        <br>
        <table border=0 cellspacing=2 cellpadding=2 width=500 >
        <tr>
        <th bgcolor=white align=left><font style='font-size:12px;font-style:italic;color:#blue'>
        <b>$t_page / $page </b></font></th>
        </tr>
        <tr>
        <td bgcolor=#808080 width=450>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$t</b></font></td></tr>
        ");
      }


      if(!$t_num)
      {
        echo ("
        <tr>
        <th bgcolor=black colspan=6>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>µî·ÏµÈ µ¥ÀÌŸ,Å×À̺íÀÌ ¾ö½º¿ä...  ^^;</b></font></th>
        </tr>
        </center>
        </table>
        </html>
        ");
      }
      else
      {
        for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
        {

          if($pd >= 0 )
          {
            mysql_data_seek($ally,$pd);
            $db=mysql_fetch_array($ally);


            if(!$select)
            {
              echo("
              <tr>
              <td bgcolor=black>
              <a href ='db_view.php?chanl=main&dbs=$db[Database]&select=tables'>
              <font style='font-size:13px;font-style:italic;color:#fffff0'>
              <b>$db[Database]</b></font></a></td>
              ");
            }


            if($select == tables)
            {
              echo("
              <tr>
              <td bgcolor=black>
              <a href ='db_view.php?chanl=main&dbs=$dbs&select=field&tableput=$db[0]'>
              <font style='font-size:13px;font-style:italic;color:#fffff0'>
              <b>$db[0]</b></font></a></td>
              ");
            }


            if($select == field)
            {
              echo("
              <tr>
              <td bgcolor=black>
              <font style='font-size:13px;font-style:italic;color:#fffff0'>
              <b>$db[Field]</b></font></a></td>


              <td bgcolor=black>
              <font style='font-size:13px;font-style:italic;color:#fffff0'>
              <b>$db[Type]</b></font></a></td>


              <td bgcolor=black>
              <font style='font-size:13px;font-style:italic;color:#fffff0'>
              <b>$db[Null]</b></font></a></td>


              <td bgcolor=black>
              <font style='font-size:13px;font-style:italic;color:#fffff0'>
              <b>$db[Key]</b></font></a></td>


              <td bgcolor=black>
              <font style='font-size:13px;font-style:italic;color:#fffff0'>
              <b>$db[Default]</b></font></a></td>


              <td bgcolor=black>
              <font style='font-size:13px;font-style:italic;color:#fffff0'>
              <b>$db[Extra]</b></font></a></td>
              ");
            }
          }
        }


        echo("
        <tr>
        <td bgcolor=black colspan=7>&nbsp;</td>
        </tr>
        <tr>
        <td bgcolor=black colspan=7 align=center>
        ");


        if($page == 1)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'>first </font> ");
        }
        else
        {
          if($select == tables)
          {
            echo ("
            <a href =db_view.php?chanl=main&page=$pre_p&dbs=$dbs&select=tables>
            <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>");
          }
          if(!$select)
          {
            echo ("
            <a href =db_view.php?chanl=main&page=$pre_p>
            <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>"); 
          }
          if($select == field)
          {
            echo ("
            <a href =db_view.php?chanl=main&page=$pre_p&dbs=$˱
            &select=field&tableput=$tableput>
            <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>"); 
          }
        }


        for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++)
        {

          if($pp == $page )
          {
            echo ("
            <font style='font-size:13px;font-style:italic;color:red'>
            $pp</font>  ");
          }
          else
          {
            if($pp > 0  && $pp <= $t_page)
            {
              if(!$select)
              {
                echo("
                <a href =db_view.php?chanl=main&page=$pp>
                <font style='font-size:12px;font-style:italic;color:#808080'>
                [$pp]</font></a>");
              }
              if($select == tables)
              {
                echo("
                <a href =db_view.php?chanl=main
                &page=$pp&dbs=$dbs&select=tables>
                <font style='font-size:12px;font-style:italic;color:#808080'>
                [$pp]</font></a>");
              }


              if($select == field)
              {
                echo("
                <a href =db_view.php?chanl=main&page=
                $pp&dbs=$dbs&select=field&tableput=$tableput>
                <font style='font-size:12px;font-style:italic;color:#808080'>
                [$pp]</font></a>");
              }
            }
          }
        }


        if($page == $t_page)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'> last^^ </font>");
        }
        else
        {
          if($select == tables)
          {
            echo ("
            <a href =db_view.php?chanl=main&page=$next_p&dbs=$dbs&select=tables>
            <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
          }
          if(!$select)
          {
            echo ("
            <a href =db_view.php?chanl=main&page=$next_p>
            <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
          }
          if($select == field)
          {
            echo ("
            <a href =db_view.php?chanl=main
            &page=$next_p&dbs=$dbs&select=field&tableput=$tableput>
            <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
          }
        }
      }


      if($select != field)
      {

        $td = "<td bgcolor=black width=100>
        $link
        <font style='font-size:13px;font-style:italic;color:#ffd700'>
        <b>New </b></font></a></td>";


        if($select == tables)
        {
          $td = "<td bgcolor=black width=100>
          $link
          <font style='font-size:13px;font-style:italic;color:#ffd700'>
          <b>New </b></font></a></td>
          <td bgcolor=black width=100>
          $linkdel
          <font style='font-size:13px;font-style:italic;color:#ffd700'>
          <b>Db Del </b></font></a></td>";
        }
      }
      else
      {
        $td =  "<td bgcolor=black width=300>
        <font style='font-size:13px;font-style:italic;color:red'>
        $link1 > $link2
        </font></td>
        <td bgcolor=black width=100>
        <a href =db_view.php?chanl=tabledel&dbs=$dbs&tableput=$tableput>
        <font style='font-size:13px;font-style:italic;color:#ffd700'>
        Del Table
        </font></a></td>";
      }


      echo("
      </td>
      </tr>
      </center>
      </table>
      <br>
      <center>
      <table border=0 cellspacing=2 cellpadding=2 width=500 >
      <tr>
      $td


      <td bgcolor=black width=100>
      <a href = userin.php?chanl=main_view>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Home re</b></font></a></td>


      <td bgcolor=black width=100>
      <form method=post action=db_view.php>
      <select name=chanl>
      <option value=file_view selected>File edit
      <option value=title_view>Title edit
      <option value=main>Db edit
      <option value=user_edit>user edit
      <option value=shop_edit>shop edit
      </select>
      </td>
      <td>
      <input type=submit value=Go.!>
      </td>
      </form>
      ");


      if($tableput)
      {
        echo("
        </tr>
        </table>
        <br><br>
        <table border=0 cellspacing=2 cellpadding=2 width=500 >
        <tr>
        <th bgcolor=gray colspan=7 align=left>
        <font style='font-size:12px;font-style:italic;color:white'>
        <b>Attribute Add/Del insert Attribute Name</b></font></th>
        </tr>
        <tr>
        <td bgcolor=black width=200>
        <font style='font-size:13px;font-style:italic;color:blue'>
        <b>Alter Table $tableput</b></font></td>


        <td bgcolor=black width=50>
        <font style='font-size:13px;font-style:italic;color:#ffd700'>
        <form method=post action=db_view.php>
        <input type = hidden name=tn value=$tableput>
        <input type = hidden name=chanl value=e_field>
        <input type = hidden name=dbs value=$dbs>
        <select name=tct>
        <option value=add selected>Add
        <option value=drop >Del
        </select>
        </td>
        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#ffd700'>
        <input type = text name='tablequ' size=14>
        </font></td>
        <td>
        <input type=submit value=Go.!>
        </td>
        </form>
        ");
      }


      echo("
      </tr>
      </table>
      </center>
      </html>
      ");
    }


    function create_db1()
    {

      echo("
      <html>
      <title>
      creat_db html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=create_db2>


      <table border=0 cellspacing=2 cellpadding=2  width=700 >
      <tr>
      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Db Name</b></font></td>


      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=dbname size=10></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=¸¸µé±â>
      </font></td>
      </table>
      </tr>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    function create_title()
    {

      echo("
      <html>
      <title>
      creat_db html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=create_title2>


      <table border=0 cellspacing=2 cellpadding=2  width=700 >
      <tr>


      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Table Name</b></font></td>


      <td bgcolor=black width=100>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=ctitle size=10></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~°Ô½ÃÆÇ Name</b></font></td>


      <td bgcolor=black width=100>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=title size=10></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=¸¸µé±â>
      </font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    function create_file()
    {

      echo("
      <html>
      <title>
      creat_db html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=create_title3>


      <table border=0 cellspacing=2 cellpadding=2  width=700 >
      <tr>


      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Table Name</b></font></td>


      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=ctitle size=10></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~ÀÚ·á½Ç Name</b></font></td>


      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=title size=10></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=¸¸µé±â>
      </font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    function title_view($page,$connect)
    {

      mysql_select_db(adminp,$connect);


      $ally = mysql_query("select no,title,mview,view,sum,wdate from admin
      order by no ",$connect);


      $t_num=mysql_num_rows($ally);
      $p_dip = 4 ;//ÆäÀÌÁö´ç ±Û ¼ö


      $p_page =4  ;//ÆäÀÌÁö´ç ÆäÀÌÁö ¸µÅ©¼ö
      $p_pagex = ceil($p_page / 2) ;
      $t_page = ceil($t_num / $p_dip) ;


      if(!$page)
      {
        $page = 1;
      }
      if( $page <= $p_pagex )
      {
        $p_start = $p_pagex + 1 ;
      }
      else
      {
        $p_start = $page + 1;
      }


      $pt_page = ceil($p_start - $p_pagex) ;
      $next_p = $page + 1 ;
      $pre_p = $page - 1 ;
      $start_num = ($t_num - ($page * $p_dip))+($p_dip-1) ;


      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <th bgcolor=white colspan=7 align=left>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b>$t_page / $page </b></font></th>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>No</b></font></td>
      <td bgcolor=#808080 width=350>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Title</b></font></td>


      <td bgcolor=#808080 width=75 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>MView</b></font></td>


      <td bgcolor=#808080 width=75 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>View</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>sum</b></font></td>


      <td bgcolor=#808080 width=150 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>date</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>check</b></font></td>
      </tr>
      ");


      if(!$t_num)
      {
        echo ("
        <tr>
        <th bgcolor=black colspan=6>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>µî·ÏµÈ ±ÛÀÌ ¾ö½º¿ä...  ^^;</b></font></th>
        </tr>
        </center>
        </table>
        </html>
        ");
      }
      else
      {
        for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
        {

          if($pd >= 0 )
          {
            mysql_data_seek($ally,$pd);
            $put=mysql_fetch_array($ally);


            echo("
            <tr>


            <td bgcolor=black>
            <font style='font-size:13px;font-style:italic;color:blue'>
            $put[no]</font></td>


            <td bgcolor=black>
            <a href =main_view.php?chanl=main_view&f=$put[mview]&f2=$put[view]>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[title]</b></font></a></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[mview]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[view]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[sum]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:blue'>
            <b>$put[wdate]</b></font></td>


            <td bgcolor=black align=center>
            <form method=post action=db_view.php>
            <input type=hidden name=chanl value=del_title>
            <input type=radio name=s value=$put[mview]>
            <input type=hidden name=x value=$put[view]>
            </td>
            </tr>
            ");
          }
        }


        echo("
        <tr>
        <td bgcolor=black colspan=7>&nbsp;</td>
        </tr>
        <tr>
        <td bgcolor=black colspan=7 align=center>
        ");


        if($page == 1)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'>first </font> ");
        }
        else
        {
          echo ("
          <a href =db_view.php?chanl=title_view&page=$pre_p>
          <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>");
        }


        for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++)
        {
          if($pp == $page )
          {
            echo ("
            <font style='font-size:13px;font-style:italic;color:red'>
            $pp</font>
            ");
          }
          else
          {
            if($pp > 0  && $pp <= $t_page)
            {
              echo("
              <a href =db_view.php?chanl=title_view&page=$pp>
              <font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>");
            }
          }
        }


        if($page == $t_page)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'> last^^ </font>");
        }
        else
        {
          echo ("
          <a href =db_view.php?chanl=title_view&page=$next_p>
          <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
        }
      }


      echo("
      </td>
      </tr>
      </center>
      </table>
      <br>
      <center>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <td bgcolor=black width=100>
      <a href =db_view.php?chanl=create_title>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Creat °æ¸Å</b></font></a></td>


      <td bgcolor=black width=100>
      <a href = userin.php?chanl=main_view>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Home re</b></font></a></td>

      <td bgcolor=black width=100>
      <input type=hidden name=put value=$start_num>
      <input type=submit value=Del>
      </td>
      </form>


      <td bgcolor=black width=100>
      <form method=post action=db_view.php>
      <select name=chanl>
      <option value=file_view selected>File edit
      <option value=title_view>Title edit
      <option value=main>Db edit
      <option value=user_edit>user edit
      <option value=shop_edit>shop edit
      </select>
      </td>
      <td>
      <input type=submit value=Go.!>
      </td>
      </form>

      </tr>
      </table>
      </center>
      </html>
      ");
    }


    function logon($file)
    {

      echo("
      <html>
      <title>
      passw view
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=logon.php>
      <input type=hidden name=chanl value=$file>
      <table border=0 cellspacing=2 cellpadding=2  width=700 >
      <tr>


      <td bgcolor=#808080 align=center width=74>
      <font style='font-size:13px;font-style:italic;color:#blue'>
      <b>admin login</b></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Host</b></font></td>


      <td bgcolor=black width=100>
      <input type=text name=host size=10></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Name</b></font></td>
      <td bgcolor=black width=100>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=id size=10></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~passw</b></font></td>


      <td bgcolor=black width=100>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=ÀÔ·Â>
      </font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    function file_view($page,$connect)
    {
      mysql_select_db(adminp,$connect);
      $ally = mysql_query("select no,title,mview,view,sum,wdate from file
      order by no ",$connect);


      $t_num=mysql_num_rows($ally);
      $p_dip = 3 ;
      $p_page =4 ;
      $p_pagex = ceil($p_page / 2) ;
      $t_page = ceil($t_num / $p_dip) ;


      if(!$page)
      {
        $page = 1;
      }
      if( $page <= $p_pagex )
      {
        $p_start = $p_pagex + 1 ;
      }
      else
      {
        $p_start = $page + 1;
      }


      $pt_page = ceil($p_start - $p_pagex) ;
      $next_p = $page + 1 ;
      $pre_p = $page - 1 ;
      $start_num = ($t_num - ($page * $p_dip))+($p_dip-1) ;


      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>


      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <th bgcolor=white colspan=7 align=left>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b>$t_page / $page </b></font></th>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>No</b></font></td>
      <td bgcolor=#808080 width=400>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Title</b></font></td>


      <td bgcolor=#808080 width=75 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>MView</b></font></td>


      <td bgcolor=#808080 width=75 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>View</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>sum</b></font></td>


      <td bgcolor=#808080 width=150 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>date</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>check</b></font></td>


      </tr>
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=del_title>
      <input type=hidden name=table value=file>
      ");


      if(!$t_num)
      {
        echo ("
        <tr>
        <th bgcolor=black colspan=6>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>µî·ÏµÈ ±ÛÀÌ ¾ö½º¿ä...  ^^;</b></font></th>
        </tr>
        </center>
        </table>
        </html>
        ");
      }
      else
      {
        for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
        {

          if($pd >= 0 )
          {
            mysql_data_seek($ally,$pd);
            $put=mysql_fetch_array($ally);


            echo("
            <tr>
            <td bgcolor=black>
            <font style='font-size:13px;font-style:italic;color:blue'>
            $put[no]</font></td>
            <td bgcolor=black>


            <a href =m.php?chanl=main_view&f=$put[mview]&f2=$put[view]>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[title]</b></font></a></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[mview]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[view]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[sum]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:blue'>
            <b>$put[wdate]</b></font></td>


            <td bgcolor=black align=center>
            <input type=radio name=s value=$put[mview]>
            <input type=hidden name=x value=$put[view]>
            </td>
            </tr>
            ");
          }
        }


        echo("
        <tr>
        <td bgcolor=black colspan=7>&nbsp;</td>
        </tr>
        <tr>
        <td bgcolor=black colspan=7 align=center>
        ");


        if($page == 1)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'>first </font> ");
        }
        else
        {
          echo ("
          <a href =db_view.php?chanl=file_view&page=$pre_p>
          <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>");
        }


        for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++)
        {
          if($pp == $page )
          {
            echo ("
            <font style='font-size:13px;font-style:italic;color:red'>
            $pp</font>
            ");
          }
          else
          {
            if($pp > 0  && $pp <= $t_page)
            {
              echo("
              <a href =db_view.php?chanl=file_view&page=$pp>
              <font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>");
            }
          }
        }


        if($page == $t_page)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'> last^^ </font>");
        }
        else
        {
          echo ("
          <a href =db_view.php?chanl=file_view&page=$next_p>
          <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
        }
      }


      echo("
      </td>
      </tr>
      </center>
      </table>
      <br>
      <center>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>


      <td bgcolor=black width=100>
      <a href =db_view.php?chanl=create_file>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Creat ÀÚ·á½Ç</b></font></a></td>


      <td bgcolor=black width=100>
      <a href = userin.php?chanl=main_view>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Home re</b></font></a></td>


      <td bgcolor=black width=100>
      <input type=hidden name=put value=$start_num>
      <input type=submit value=Del>
      </td>
      </form>


      <td bgcolor=black width=100>
      <form method=post action=db_view.php>
      <select name=chanl>
      <option value=file_view selected>File edit
      <option value=title_view>Title edit
      <option value=main>Db edit
      <option value=user_edit>user edit
      <option value=shop_edit>shop edit
      </select>
      </td>
      <td>
      <input type=submit value=Go.!>
      </td>
      </form>
      </tr>
      </table>
      </center>
      </html>
      ");
    }


    function user_view($page,$connect)
    {

      mysql_select_db('selectuser',$connect);
      $ally = mysql_query("select name,id,resident,email,address,tel1,wdate
      from userin  order by wdate",$connect);


      $t_num=mysql_num_rows($ally);
      $p_dip = 10 ;//ÆäÀÌÁö´ç ±Û ¼ö


      $p_page =4  ;//ÆäÀÌÁö´ç ÆäÀÌÁö ¸µÅ©¼ö
      $p_pagex = ceil($p_page / 2) ;
      $t_page = ceil($t_num / $p_dip) ;


      if(!$page)
      {
        $page = 1;
      }
      if( $page <= $p_pagex )
      {
        $p_start = $p_pagex + 1 ;
      }
      else
      {
        $p_start = $page + 1;
      }

      $pt_page = ceil($p_start - $p_pagex) ;
      $next_p = $page + 1 ;
      $pre_p = $page - 1 ;
      $start_num = ($t_num - ($page * $p_dip))+($p_dip-1) ;


      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>


      <table border=0 cellspacing=2 cellpadding=2 width=800 >
      <tr>
      <th bgcolor=white colspan=8 align=left>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b>$t_page / $page (ÃÑ È¸¿ø:$t_num)</b></font></th>
      </tr>
      <tr>


      <td bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>No</b></font></td>


      <td bgcolor=#808080 width=75 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Name</b></font></td>


      <td bgcolor=#808080 width=75 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Id</b></font></td>


      <td bgcolor=#808080 width=400 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Address</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Email</b></font></td>


      <td bgcolor=#808080 width=150 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Tel</b></font></td>


      <td bgcolor=#808080 width=150 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Wdate</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Check</b></font></td>
      </tr>
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=del_user>
      <input type=hidden name=table value=userin>
      ");


      if(!$t_num)
      {
        echo ("
        <tr>
        <th bgcolor=black colspan=6>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>µî·ÏµÈ ID°¡ ¾ö½º¿ä...  ^^;</b></font></th>
        </tr>
        </center>
        </table>
        </html>
        ");
      }
      else
      {
        $x= $t_num + 1 ;


        for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
        {
          $x-- ;


          if($pd >= 0 )
          {
            mysql_data_seek($ally,$pd);
            $put=mysql_fetch_array($ally);


            echo("
            <tr>
            <td bgcolor=black>
            <font style='font-size:13px;font-style:italic;color:blue'>
            $x</font></td>
            <td bgcolor=black>


            <a href =db_view.php?chanl=user_view&id=$put[id]>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[name]</b></font></a></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[id]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[address]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[email]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:blue'>
            <b>$put[tel1]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:blue'>
            <b>$put[wdate]</b></font></td>


            <td bgcolor=black align=center>
            <input type=checkbox name=area[] value=$put[id]>
            </td>
            </tr>
            ");
          }
        }


        echo("
        <tr>
        <td bgcolor=black colspan=7>&nbsp;</td>
        </tr>
        <tr>
        <td bgcolor=black colspan=7 align=center>
        ");


        if($page == 1)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'>first </font> ");
        }
        else
        {
          echo ("
          <a href =db_view.php?chanl=user_edit&page=$pre_p>
          <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>");
        }


        for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++)
        {
          if($pp == $page )
          {
            echo ("
            <font style='font-size:13px;font-style:italic;color:red'>
            $pp</font>  ");
          }
          else
          {
            if($pp > 0  && $pp <= $t_page)
            {
              echo("
              <a href =db_view.php?chanl=user_edit&page=$pp>
              <font style='font-size:12px;font-style:italic;color:#808080'>
              [$pp]</font></a>");
            }
          }
        }


        if($page == $t_page)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'> last^^ </font>");
        }
        else
        {
          echo ("
          <a href =db_view.php?chanl=user_edit&page=$next_p>
          <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
        }
      }


      echo("
      </td>
      </tr>
      </center>
      </table>
      <br>
      <center>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>


      <td bgcolor=black width=100>
      <a href =userin.php?chanl=main&sel=user_edit>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Creat user</b></font></a></td>


      <td bgcolor=black width=100>
      <a href = userin.php?chanl=main_view>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Home re</b></font></a></td>


      <td bgcolor=black width=100>
      <input type=submit value=Del>
      </td>
      </form>


      <td bgcolor=black width=100>
      <form method=post action=db_view.php>
      <select name=chanl>
      <option value=file_view selected>File edit
      <option value=title_view>Title edit
      <option value=main>Db edit
      <option value=user_edit>user edit
      <option value=shop_edit>shop edit
      </select>
      </td>


      <td>
      <input type=submit value=Go.!>
      </td>
      </form>
      </tr>
      </table>
      </center>
      </html>
      ");
    }


    function user_edit($connect,$id)
    {

      mysql_select_db('selectuser',$connect);
      $ally = mysql_query("select name,id,resident,email,address,homepage,tel1,uno
      from userin where id='$id'",$connect);


      $put=mysql_fetch_array($ally);


      echo("
      <html>
      <title>
      userin_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=userin.php>
      <input type=hidden name=chanl value=checkid>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      (* ´Â Çʼö ÀÔ·Â ºÎºÐ ÀÔ´Ï´Ù.)</font>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=IDÁߺ¹È®ÀÎ></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=id size=9 maxlength=8>(* 4~8ÀÚÀÇ ¿µ¼ýÀÚ Á¶ÇÕ)</font></td>


      </tr>
      </form>
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=upuser>
      <input type=hidden name=idno value=$id>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~ID</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=id size=9 maxlength=8 value='$put[id]'>
      (* 4~8ÀÚÀÇ ¿µ¼ýÀÚ Á¶ÇÕ)</font></td>


      </tr>
      <tr>
      <td width=90 bgcolor=#808080>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Name</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=name size=9 value='$put[name]'>(* ÇÑ±Û À̸§)</font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Email</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=email size=21 value='$put[email]'>
      </font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~HomePG</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      HTTP://
      <input type=text name=home size=20 value='$put[homepage]'>
      </font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Resident</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=rsd size=15 value='$put[resident]'>
      </font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Tel1</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=tel1 size=15 value='$put[tel1]'>
      </font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~¿ìÆí¹øÈ£</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=uno size=8 value='$put[uno]'>
      </font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Address</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=address size=54 value='$put[address]'>* </font></td>
      </tr>
      <tr>


      <td bgcolor=black align=center colspan=4>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=ȸ¿ø¼öÁ¤>
      <input type=reset  value=´Ù½Ã></font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    function input_shop($sel,$selx)
    {

      echo("
      <html>
      <title>
      input_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>


      <form method=post enctype=multipart/form-data action=db_view.php>
      <input type=hidden name=chanl value=shop_query>
      <table border=0 cellspacing=2 cellpadding=2 width=500 >
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Price</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=price size=10></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Select</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=radio name=selx value=1>ÀüÀÚÁ¦Ç°
      <input type=radio name=selx value=2>ÀÇ·ù
      <input type=radio name=selx value=3>À½¾Ç
      <input type=radio name=selx value=4>Ã¥
      </font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Pdname</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=pdname size=24></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~up File</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=file name=upfile size=14></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Content</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <textarea name=cont rows=5 cols=20></textarea></font></td>
      </tr>
      <tr>


      <td bgcolor=black align=center colspan=4>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=shopup>
      <input type=reset  value=Re></font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    function shop_edit($connect,$sel)
    {
        
      mysql_select_db('shop',$connect);


      if(!$sel)
      {
        $sel = 1 ;
      }


      $ally = mysql_query("select pdname,price,cont,sel from pduct
      where sel='$sel'",$connect);


      $t_num=mysql_num_rows($ally);


      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <table border=0 cellspacing=2 cellpadding=2 width=600 >
      <tr>
      <th bgcolor=gray colspan=4 align=center>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b> Shop Edit</b></font></th>
      </tr>
      ");


      if(!$t_num)
      {
        echo ("
        <tr>
        <th bgcolor=black colspan=4><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>µî·ÏµÈ »óÇ°ÀÌ ¾ö½º¿ä...  ^^;</b></font></th>
        </tr>
        </center>
        </table>
        </html>
        ");
      }
      else
      {
        for($pd=$t_num ; $pd > 0 ; $pd--)
        {
          $put=mysql_fetch_array($ally);


          $cont = nl2br($put[cont]);


          echo("
          <tr>
          <td bgcolor=gray colspan=4>
          </tr>
          <tr>
          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:blue'>
          <img src=sajin.php?sel=$sel&pdname=$put[pdname] border=0></font></td>


          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$cont</b></font></a></td>


          <td bgcolor=black>
          &nbsp
          </td>
          </tr>
          <tr>


          <td bgcolor=black>
          <a href =db_view.php?chanl=pdname_edit&sel=$sel&pn=$put[pdname]>
          <font style='font-size:13px;font-style:italic;color:blue'>
          $put[pdname]</font></a></td>


          <td bgcolor=black align=center>
          <font style='font-size:13px;font-style:italic;color:red'>
          <b>$put[price]¿ø</b></font></td>
          <td bgcolor=black width=50>
          <form method=post action=db_view.php>
          <input type=hidden name=chanl value=del_shop>
          <input type=hidden name=sel value=$sel>
          <td bgcolor=black align=center>
          <input type=checkbox name=area[] value=$put[pdname]>


          </tr>
          ");
        }
      }


      echo("
      <tr>
      <td bgcolor=black colspan=7>&nbsp;</td>
      </tr>
      <tr>
      <td bgcolor=black colspan=7 align=center>
      ");


      echo("
      </td>
      </tr>
      </center>
      </table>
      <br>
      <center>
      <table border=0 cellspacing=2 cellpadding=2 width=500 >
      <tr>


      <td bgcolor=black >
      <a href =userin.php?chanl=main_view&username=$username>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Home</b></font></a><td>


      <td bgcolor=black >
      <a href =db_view.php?chanl=shop_in>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Up shop</b></font></a><td>


      <td bgcolor=black >
      <input type=submit value=Del>
      </td>
      </form>


      <td bgcolor=black >
      <form method=post action=db_view.php>
      <select name=chanl>
      <option value=file_view selected>File edit
      <option value=title_view>Title edit
      <option value=main>Db edit
      <option value=user_edit>user edit
      <option value=shop_edit>shop edit
      </select>


      <input type=submit value=Go.!>
      </td>
      </form>


      <td bgcolor=black >
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=shop_edit>
      <select name=sel>
      <option value=1 selected>ÀüÀÚÁ¦Ç°
      <option value=2>ÀÇ·ù
      <option value=3>À½¾Ç
      <option value=4>Ã¥
      </select>


      <input type=submit value=Go.!>
      </td>
      </form>
      </tr>
      </table>
      </center>
      </html>
      ");
    }


    function pd_edit($connect,$sel,$pn,$selx,$contx)
    {

      mysql_select_db('shop',$connect);


      $ally = mysql_query("select pdname,price,cont,sel from pduct where sel='$sel'
      and pdname='$pn'",$connect);


      $put = mysql_fetch_array($ally);


      echo("
      <html>
      <title>
      pdname_edit html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>


      <form method=post enctype=multipart/form-data action=db_view.php>
      <input type=hidden name=chanl value=shop_query2>
      <input type=hidden name=pn value=$pn>
      <input type=hidden name=sel value=$sel>
      <input type=hidden name=selx value='$put[sel]'>
      <table border=0 cellspacing=2 cellpadding=2 width=500 >
      <tr>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=checkbox name=contx value=cont>¼öÁ¤(ÇØ´ç Ç׸ñÀ» ¼öÁ¤ÇÒ °æ¿ì)</font>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Price</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=price size=10 value='$put[price]'></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Pdname</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=pdname size=24 value='$put[pdname]'></font></td>
      </tr>
      <tr>


      <td bgcolor=black>
      <img src=sajin.php?sel=$sel&pdname=$put[pdname] border=0>
      </td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~¿øº» È­ÀÏ ÀÔ´Ï´Ù. ¾Æ·¡ ¼öÁ¤ÇÒ È­ÀÏÀ» ¿Ã¸®¼¼¿ä.</b></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~File Change</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=file name=upfile size=14>
      <input type=checkbox name=poto value=edit_poto>±×¸² ¼öÁ¤
      </font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Content</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <textarea name=cont rows=5 cols=20 >$put[cont]</textarea>
      </font></td>
      </tr>
      <tr>


      <td bgcolor=black align=center colspan=4>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=shopEdit>
      <input type=reset  value=Re></font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }

    ?>

¼Ò½º ¼³¸í

    db_func_all.php ÆÄÀÏÀº ÇÔ¼öµé·Î ±¸¼ºµÇ¾î ÀÖÀ¸¸ç °¢ È­¸éÀ» Ç¥Çö ÇÕ´Ï´Ù.
    db_view.php ÆÄÀÏÀ» ÀÌ¿ëÇؼ­ ÇÔ¼ö¸¦ ´Ù¾çÇÑ ¹æ¹ýÀ¸·Î »ç¿ëÇÕ´Ï´Ù.

main($page,$connect,$select,$dbs,$tableput,$root) ÇÔ¼ö

    admin ¿µ¿ªÀÇ µ¥ÀÌÅÍ º£À̽º ¸ÞÀÎ ÇÔ¼ö ÀÔ´Ï´Ù.
    ¿©·¯ admin¿µ¿ª Áß µ¥ÀÌÅͺ£À̽ºÀÇ ¸ÞÀÎÈ­¸éÀ» º¸¿©ÁÖ¸ç ¿©·¯°¡Áö Å×À̺í ÀÎÀÚ¿¡ ÀÇÇØ È­¸éÀÌ ´Þ¶óÁý´Ï´Ù.
    Áï, µ¥ÀÌÅͺ£À̽º admin Áß µ¥ÀÌÅÍ º£À̽º ºÎºÐ°ú Å×ÀÌºí ºÎºÐ µîÀÇ È­¸éÀ» ÀÌ ÇÔ¼ö·Î ó¸® ÇÕ´Ï´Ù.

ÇÔ¼ö ÀÎÀÚ

    $connect = mysql_connect('localhost','root','gksmf444');
    /* mysql¿¡ Á¢¼ÓÇϱâ À§ÇÑ È£½ºÆ®¿Í °èÁ¤ , Æнº¿öµå¸¦ ÀÔ·Â ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù. */

 
    function main($page,$connect,$select,$dbs,$tableput,$root)
    {

    $page - µ¥ÀÌÅÍ º£À̽º adminÀÇ ÇØ´ç ÆäÀÌÁö¸¦ Àü´Þ ÇÕ´Ï´Ù. 
    $connect - µ¥ÀÌÅÍ º£À̽º Á¢¼Ó ÀÎÀÚµéÀ» Àü´Þ ÇÕ´Ï´Ù.
    $select - µ¥ÀÌÅÍ º£À̽º adminÀÇ °¢ È­¸éÀ» ¼³Á¤ ÇÏ´Â ºÎºÐÀ̸ç ÀÌ º¯¼ö¸¦ ÀÌ¿ëÇؼ­ Å×À̺í È­¸é ,
              Çʵå È­¸é , µ¥ÀÌÅÍ º£À̽º ¸®½ºÆ® È­¸é µîÀ» ±¸ºÐ ÇÕ´Ï´Ù.
    $dbs - µ¥ÀÌÅÍ º£À̽º À̸§À» Àü´Þ ÇÕ´Ï´Ù. ÀÌ º¯¼ö¸¦ »ç¿ëÇؼ­ È­¸é¿¡ ¼±ÅÃÇÑ µ¥ÀÌÅÍ º£À̽º¸¦ º¸¿© ÁÝ´Ï´Ù.
    $tableput - Å×À̺í À̸§À» Àü´Þ ÇÕ´Ï´Ù. 
    $root - admin ÀÇ ÄíÅ°¸¦ Àü´Þ ÇÕ´Ï´Ù. 

È­¸é Ãâ·Â ¼±Åà Çϱâ

    $select, $dbs, $tableput º¯¼ö¸¦ ÀÌ¿ëÇؼ­ µ¥ÀÌÅÍ º£À̽º admin ¸ÞÀÎ È­¸éÀÇ Ãâ·ÂÀ» °áÁ¤ ÇÕ´Ï´Ù.
    óÀ½ µ¥ÀÌÅÍ º£À̽ºÀÇ ¸®½ºÆ®¸¦ º¸¿©ÁÖ¸ç ƯÁ¤ µ¥ÀÌÅÍ º£À̽º¸¦ ¼±ÅÃÇÒ °æ¿ì Å×À̺íÀ» º¸¿© ÁÖ°í ƯÁ¤
    Å×À̺íÀ» ¼±ÅÃÇϸé Çʵå Á¤º¸¸¦ ³ª¿­ ÇÕ´Ï´Ù.
    ÀÌ ¸ðµç °ÍÀÌ ¸ÞÀÎ ÇÔ¼ö¿¡¼­ ÀÌ·ç¾î Áö±â À§ÇØ °¢ º¯¼öÀÇ Àü´Þ ÀÎÀÚ¿¡ µû¸¥ È­¸é ±¸¼ºÀ» ÇØ¾ß ÇÕ´Ï´Ù.


    if($select == tables)
    {
    /* $select °¡ tablesÀÏ °æ¿ì µ¥ÀÌÅÍ º£À̽º admin È­¸éÀº ÇØ´ç µ¥ÀÌÅÍ º£À̽º¿¡ Á¸ÀçÇÏ´Â Å×À̺íÀ» º¸¿© ÁÝ´Ï´Ù. */


      mysql_select_db($dbs,$connect);
      /* $dbsÀÇ µ¥ÀÌÅÍ º£À̽º¸¦ ¼±Åà ÇÕ´Ï´Ù. */


      $ally = mysql_query("show tables ",$connect);
      /* ÇØ´ç µ¥ÀÌÅÍ º£À̽º¿¡ Á¸ÀçÇÏ´Â Å×À̺íÀ» °Ë»ö ÇÕ´Ï´Ù. */


      $t = "Table($dbs Db) hong il mansei~!";
      /* $t º¯¼ö¿¡ ÇØ´ç µ¥ÀÌÅÍ º£À̽ºÀÇ À̸§À» ÀúÀå ÇÕ´Ï´Ù. */


      $link = "<a href=db_view.php?chanl=create_table&dbs=$dbs>";
      /* $link º¯¼ö¿¡ ÇØ´ç µ¥ÀÌÅÍ º£À̽ºÀÇ »õ·Î¿î Å×ÀÌºí »ý¼º Ç׸ñÀ» ¸µÅ© ÇÕ´Ï´Ù. */


      $linkdel = "<a href=db_view.php?chanl=dbdel&dbs=$dbs>";
      /* $linkdel º¯¼ö¿¡ ÇØ´ç µ¥ÀÌÅÍ º£À̽ºÀÇ »èÁ¦ Ç׸ñÀ» ¸µÅ© ÇÕ´Ï´Ù. */
    }


    if(!$select)
    {
      $ally = mysql_query("show databases ",$connect);
      /* $select Ç׸ñÀÌ ¾øÀ» °æ¿ì $ally º¯¼ö¿¡ Á¸Àç ÇÏ´Â µ¥ÀÌÅÍ º£À̽º ¸®½ºÆ®¸¦ ÀúÀå ÇÕ´Ï´Ù.*/
      $t = "Database Names hong il mansei~!" ;
      /* $t º¯¼ö¿¡ admin ¿µ¿ª Ãâ·Â ºÎºÐ¿¡ º¸¿©ÁÙ ¹®±¸¸¦ ÀúÀå ÇÕ´Ï´Ù. ÀÌ ºÎºÐÀº ´Ù¸¥ ±â´ÉÀ» Ãß°¡ÇÒ ¼ÒÁö°¡ ÀÖ½À´Ï´Ù. */


      $link = "<a href =db_view.php?chanl=create_db>";
      /* $link º¯¼ö¿¡ »õ·Î¿î µ¥ÀÌÅÍ º£À̽º »ý¼º Ç׸ñÀ» ¸µÅ© ÇÕ´Ï´Ù. */
    }


    if($select == field)
    {
    /* $select º¯¼ö°¡ fieldÀ̸é ÇØ´ç Å×À̺íÀÇ Çʵå Á¤º¸¸¦ Ãâ·Â ÇÕ´Ï´Ù. */


      mysql_select_db($dbs,$connect);
      /* ÇØ´ç µ¥ÀÌÅÍ º£À̽º¸¦ ¼±Åà ÇÕ´Ï´Ù. */


      $ally = mysql_query("describe $tableput " , $connect);
      /* ¼±ÅÃÇÑ Å×À̺íÀÇ ÇÊµå ¼Ó¼ºÀ» °Ë»öÇÏ°í $ ally º¯¼ö¿¡ ÀúÀå ÇÕ´Ï´Ù. */


      $link1 = "<b><a href =db_view.php?chanl=main&select=tables&dbs=$dbs>
      /* $link1 º¯¼ö¿¡ ÇØ´ç Å×À̺í Ç׸ñÀ» ¸µÅ© ÇÕ´Ï´Ù. */


      ($dbs Db)</b></a> ";
      /* ÇØ´ç µ¥ÀÌÅÍ º£À̽º À̸§À» Ãâ·Â ÇÕ´Ï´Ù. */


      $link2 = "<b>($tableput Table)</b>";
      /* $link2 º¯¼ö¿¡ ÇØ´ç Å×À̺í À̸§À» Ãâ·Â ÇÕ´Ï´Ù. */
    }

µ¥ÀÌÅÍ º£À̽º admin È­¸é ¼±ÅÃ

    µ¥ÀÌÅÍ º£À̽º admin ¸ÞÀÎ È­¸é¿¡¼­ $select º¯¼ö¿¡ µû¶ó ¸ÞÀÎ È­¸éÀÌ ´Þ¶ó Áö´Âµ¥ $select º¯¼ö °ªÀÌ
    fieldÀÏ °æ¿ì ÇØ´ç Å×À̺íÀÇ Çʵå¼Ó¼ºÀ» º¸¿©ÁÖ´Â Ç׸ñÀ» ³ª¿­ ÇÕ´Ï´Ù.


    if($select == field)
    {
    /* $select º¯¼ö°¡ fieldÀÏ °æ¿ì ÇØ´ç Å×À̺íÀÇ ÇÊµå ¼Ó¼º Á¦¸ñÀ» Ãâ·Â ÇÕ´Ï´Ù. */

      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <th bgcolor=white colspan=7 align=left>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b>$t_page / $page </b></font></th>
      /* Å×À̺í Çʵå Ç׸ñ¿¡¼­ ÆäÀÌÁö ÇöȲÀ» Ãâ·Â ÇÕ´Ï´Ù. */
      </tr>
      <tr>


      <td bgcolor=#808080 width=150>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Field</b></font></td>


      <td bgcolor=#808080 width=200 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Type</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Null</b></font></td>


      <td bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Key</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Default</b></font></td>


      <td bgcolor=#808080 width=150 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Extra</b></font></td>
      </tr>
      /* ÇØ´ç Å×À̺íÀÇ ÇÊµå ¼Ó¼ºÀÇ À̸§À» Ãâ·Â ÇÕ´Ï´Ù. Â÷·Ê·Î Field , Type , Null , Key , Default , Extra  µîÀÌ ÀÖ½À´Ï´Ù. */
      ");
    }
    else
    {
    /* ±× ¹ÛÀÇ °æ¿ì µ¥ÀÌÅÍ º£À̽º ¸®½ºÆ®¿Í Å×ÀÌºí ¸®½ºÆ®¸¦ ³ª¿­ ÇÕ´Ï´Ù. */
      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <table border=0 cellspacing=2 cellpadding=2 width=500 >
      <tr>
      <th bgcolor=white align=left>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b>$t_page / $page </b></font></th>
      /* ÇØ´ç È­¸éÀÇ ÆäÀÌÁö ÇöȲÀ» Ãâ·Â ÇÕ´Ï´Ù. */
      </tr>
      <tr>
      <td bgcolor=#808080 width=450>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$t</b></font></td></tr>
      ");
    }

µ¥ÀÌÅÍ º£À̽º admin °¢ ¸ÞÀÎ È­¸éÀÇ ¸®½ºÆ® ³ª¿­ ºÎºÐ

    µ¥ÀÌÅÍ º£À̽º admin °¢ ¸ÞÀÎ È­¸éÀº $select º¯¼ö °ª¿¡ µû¶ó Çʵå Á¤º¸¿Í µ¥ÀÌÅÍ º£À̽º ¸®½ºÆ® , Å×À̺í
    ¸®½ºÆ® µîÀ¸·Î º¯ÇÕ´Ï´Ù.
    °¢ Ç׸ñÀÇ ¸®½ºÆ®¸¦ Ãâ·ÂÇÏ´Â ºÎºÐÀ̸ç for¹®À» ÀÌ¿ë ÇÕ´Ï´Ù. ÀÌ°ÍÀº °¢ °Ô½ÃÆÇ¿¡ »ç¿ëÇÑ ¹æ¹ý°ú °°½À´Ï´Ù. */



    for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
    {
    /* µ¥ÀÌÅÍ º£À̽º °Ë»ö °á°ú¿¡¼­ ÆäÀÌÁö ÇÒ´ç ¸¸Å­ Ãâ·Â ÇÕ´Ï´Ù. */


      if($pd >= 0 )
      {
      /* $pd°¡ - Á¤¼ö°¡ ¾Æ´Ò °æ¿ì ½ÇÇà ÇÕ´Ï´Ù. */


        mysql_data_seek($ally,$pd);
        /* ·¹ÄÚµå À§Ä¡¸¦ ¿Å±é´Ï´Ù. */

        $db=mysql_fetch_array($ally);
        /* ÇØ´ç ·¹ÄÚµåÀÇ Á¤º¸¸¦ $db º¯¼ö¿¡ ¹è¿­·Î ÀúÀå ÇÕ´Ï´Ù. */


        if(!$select)
        {
        /* $select °ªÀÌ ¾øÀ» °æ¿ì ½ÇÇà ÇÕ´Ï´Ù. */
          echo("
          <tr>
          <td bgcolor=black>
          <a href ='db_view.php?chanl=main&dbs=$db[Database]&select=tables'>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$db[Database]</b></font></a></td>
          /* Á¸Àç ÇÏ´Â µ¥ÀÌÅÍ º£À̽º À̸§À» Ãâ·Â ÇÕ´Ï´Ù. */
          ");
        }


        if($select == tables)
        {
        /* $select º¯¼ö°¡ tablesÀÏ °æ¿ì ½ÇÇà ÇÕ´Ï´Ù. */

          echo("
          <tr>
          <td bgcolor=black>
          <a href ='db_view.php?chanl=main&dbs=$dbs&select=field&tableput=$db[0]'>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$db[0]</b></font></a></td>
          /* ÇØ´ç µ¥ÀÌÅÍ º£À̽ºÀÇ Å×À̺í À̸§À» Ãâ·Â ÇÕ´Ï´Ù. */
          ");
        }


        if($select == field)
        {
        /* $select °ªÀÌ fieldÀÏ ¶§ ½ÇÇà ÇÕ´Ï´Ù. */

          echo("
          <tr>
          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$db[Field]</b></font></a></td>
          /* ÇØ´ç Å×À̺íÀÇ Çʵå Ç׸ñÀ» Ãâ·Â ÇÕ´Ï´Ù. */


          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$db[Type]</b></font></a></td>
          /* ÇØ´ç Å×À̺íÀÇ Type Ç׸ñÀ» Ãâ·Â ÇÕ´Ï´Ù. */


          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$db[Null]</b></font></a></td>
          /* ÇØ´ç Å×À̺íÀÇ Null Ç׸ñÀ» Ãâ·Â ÇÕ´Ï´Ù. */


          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$db[Key]</b></font></a></td>
          /* ÇØ´ç Å×À̺íÀÇ Key Ç׸ñÀ» Ãâ·Â ÇÕ´Ï´Ù. */

          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$db[Default]</b></font></a></td>
          /* ÇØ´ç Å×À̺íÀÇ Default Ç׸ñÀ» Ãâ·Â ÇÕ´Ï´Ù. */


          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$db[Extra]</b></font></a></td>
          /* ÇØ´ç Å×À̺íÀÇ Extra Ç׸ñÀ» Ãâ·Â ÇÕ´Ï´Ù. */
          ");
        }
      }

µ¥ÀÌÅÍ º£À̽º admin ÆäÀÌÁö ¸µÅ©

    µ¥ÀÌÅÍ º£À̽º admin ¸ÞÀÎ È­¸é¿¡¼­ ÆäÀÌÁö·ÎÀÇ ¸µÅ©¸¦ ¼³Á¤ ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù.


    for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++)
    {
    /* ÇÑ ÆäÀÌÁö´ç ¼³Á¤µÈ ÆäÀÌÁö ¸µÅ© ¼ö ¸¸Å­ »ý¼º ÇÕ´Ï´Ù. */


      if($pp == $page )
      {
      /* $pp º¯¼ö °ªÀÌ ÇöÀç ÆäÀÌÁö ¼ö¿Í °°À» °æ¿ì ½ÇÇà ÇÕ´Ï´Ù. */


        echo ("
        <font style='font-size:13px;font-style:italic;color:red'>
        $pp</font>
        /* ÇöÀçÀÇ ÆäÀÌÁö¸¦ Ãâ·Â ÇÕ´Ï´Ù. */
        ");
      }
      else
      {
        if($pp > 0  && $pp <= $t_page)
        {
        /* ÇöÀç ÆäÀÌÁö ¼ö°¡ 0 º¸´Ù Å©°í ÃÑ ÆäÀÌÁö ¼öº¸´Ù À۰ųª °°¾Æ¾ß ½ÇÇà ÇÕ´Ï´Ù. */
          if(!$select)
          {
            echo("
            <a href =db_view.php?chanl=main&page=$pp>
            <font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>");
          } 
          /* $select °ªÀÌ ¾øÀ» °æ¿ì µ¥ÀÌÅÍ º£À̽º ¸®½ºÆ® Ç׸ñ ÆäÀÌÁö ¸µÅ©¸¦ ¸¸µì´Ï´Ù. */
          if($select == tables)
          {
            echo("
            <a href =db_view.php?chanl=main&page=$pp&dbs=$dbs&select=tables>
            <font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>");
            /* $select °ªÀÌ tables ÀÏ ¶§ ÇØ´ç µ¥ÀÌÅÍ º£À̽º Å×ÀÌºí ¸®½ºÆ® ÆäÀÌÁö ¸µÅ©¸¦ ¸¸µì´Ï´Ù.*/
          }


          if($select == field)
          {
            echo("
            <a href =db_view.php?chanl=main&page=$pp
            &dbs=$dbs&select=field&tableput=$tableput>
            <font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>");
            /* $select °ªÀÌ field ÀÏ ¶§ ÇØ´ç Å×À̺í Çʵå Ç׸ñÀ» ÆäÀÌÁö ¸µÅ© ÇÕ´Ï´Ù. */
          }
        }
      }
    }


    ´ÙÀ½ ÀåÀº  µ¥ÀÌÅÍ º£À̽º¸¦ À¥»ó¿¡¼­ ¼öÁ¤ ÀÛ¾÷ ÇÏ´Â ¹æ¹ýÀ» °£´ÜÈ÷ ¼Ò½º¿Í ÇÔ²² ¼³¸í ÇÕ´Ï´Ù.

17. µ¥ÀÌÅÍ º£À̽º À¯Æ¿¸®Æ¼ ¹× Admin ºÎºÐ

µ¥ÀÌÅÍ º£À̽ºÀÇ °æ¿ì Á÷Á¢ local ¿¡¼­ Äõ¸®µéÀ» ½ÇÇà ÇÏ´Â ¹æ¹ý¸¸À» Áö±Ý±îÁö º¸¾Æ ¿Ô½À´Ï´Ù.
¿©±â¼­ ¼Ò°³ÇÒ µ¥ÀÌÅÍ º£À̽º À¯Æ¿¸®Æ¼´Â ¿ø°Ý¿¡¼­ mysql¿¡ ¼³Á¤ µÇ¾î ÀÖ´Â °èÁ¤À¸·Î
Á¢¼Ó(host , id , password) Çؼ­ °¢°¢ÀÇ µ¥ÀÌÅÍ º£À̽º¸¦ °ü¸®ÇÏ´Â À¯Æ¿¸®Æ¼ ½ºÅ©¸³Æ®¸¦ ¼Ò°³ ÇÏ°Ú½À´Ï´Ù.
Áï ºê¶ó¿ìÀú »ó¿¡¼­ Á÷Á¢ Äõ¸®µéÀ» ÀÔ·Â ÇÏ°í ½ÇÇà ÇÏ´Â °ÍÀÔ´Ï´Ù. ±×¸®°í, °¢°¢ÀÇ °Ô½ÃÆÇ( °æ¸Å , ÀÚ·á½Ç)ÀÇ
´ÙÁß »ý¼º°ú Áö¿òÀ» ÇÒ ¼ö ÀÖ´Â Admin ¿µ¿ªÀ» »ìÆì º¸°Ú½À´Ï´Ù.
ÀÌ µÎ ½ºÅ©¸³Æ®´Â ¾ÆÁ÷ Ãß°¡ µÇ°í ¼öÁ¤µÉ ºÎºÐµéÀÌ ¸¹ÀÌ Á¸Àç ÇÕ´Ï´Ù. ¾Õ¿¡¼­ ¼³¸íÇÑ ¼Ò½º¿Í ¸¶Âù°¡Áö·Î
¿©·¯ºÐµéÀÌ »õ·Î¿î ¾ÆÀÌÅÛÀ» Ãß°¡ Çؼ­ »ç¿ë Çϱ⠹ٶø´Ï´Ù.
¸ÕÀú Admin ¿µ¿ªÀ» ¸¸µé±â À§ÇØ ÇϳªÀÇ µ¥ÀÌÅÍ º£À̽º¿Í µÎ°³ÀÇ Å×À̺íÀ» »ý¼º ÇÕ´Ï´Ù.

17.1 Admin ¿µ¿ª , µ¥ÀÌÅÍ º£À̽º À¯Æ¿¸®Æ¼ ±¸¼º°ú µ¥ÀÌºí »ý¼º

Admin ¿µ¿ªÀº ¿©·¯ °¡Áö ±ÇÇÑÀ» »ç¿ëÇÑ ´Ù¾çÇÑ ¹æ¹ýÀ¸·Î ÀÛ¼º ÇÒ ¼ö ÀÖ½À´Ï´Ù. ´ÙÀ½¿¡ ¼Ò°³ ÇÒ ¼Ò½º´Â ´Ù¼Ò
¸ø¹ÌÄ¡´Â ºÎºÐµéÀÌ ¸¹ÀÌ ÀÖÁö¸¸ °¢°¢ÀÇ °èÁ¤¿¡ µû¸¥ ±ÇÇÑÀÇ ¼³Á¤ µîÀ¸·Î ´Ù¾çÇÑ Admin ¿µ¿ªÀ» ¸¸µé ¼ö ÀÖ½À´Ï´Ù.
Áï, ȸ¿øÁ¦ »çÀÌÆ®ÀÇ °æ¿ì °¢ °Ô½ÃÆÇÀ» °ü¸®ÇÏ´Â »ç¶÷À» ¼³Á¤ÇÏ´Â ºÎºÐÀ» ¸¸µç´ÙµçÁö ¹°·Ð ÀÌ °ü¸®ÀÚ´Â ´Ù¸¥
°Ô½ÃÆÇ¿¡ °üÇÑ ±ÇÇÑÀº ¾ø°Ô ÇÏ´Â µîÀÇ ¿©·¯ ¹æ¹ýµéÀÌ ÀÖ½À´Ï´Ù.
µ¥ÀÌÅͺ£À̽º À¯Æ¿¸®Æ¼ÀÇ °æ¿ì ¿Ü±¹ php °ü·Ã »çÀÌÆ®¿¡¼­ ÀÌ¿Í À¯»çÇÑ ´õ ¸¹Àº ±â´É°ú »ç¿ëÀÚ Áß½ÉÀÇ ½ºÅ©¸³Æ®
µéÀÌ Á¸ÀçÇÕ´Ï´Ù. °ü·Ã ¼Ò½º´Â php»çÀÌÆ®¸¦ ¹æ¹® ÇÏ¸é ¾òÀ» ¼ö ÀÖÁö¸¸ º¸´Ù °£´ÜÈ÷ ¼³¸í ÇϱâÀ§ÇØ Á¦°¡ Á÷Á¢ ¼Ò½º¸¦
¸¸µé¾î º¸¾Ò½À´Ï´Ù.

 
ÀÌ µÎ ºÎºÐÀ» ¸¸µé±â À§ÇÑ ½ºÅ©¸³Æ®´Â Áß¿ä ºÎºÐÀÌ 3°³ Á¸Àç ÇÕ´Ï´Ù.
ÇÔ¼ö¸¸ Á¸Àç ÇÏ´Â ÆÄÀÏ ±×¸®°í ÀÌ ÇÔ¼ö¸¦ ÀÌ¿ëÇÑ È­¸é¿ë ·çƾ ÆÄÀÏ ±×¸®°í ÄíÅ°¸¦ »ý¼ºÇÏ°íí Admin ¿µ¿ªÀ¸·Î
Á¢¼ÓÇÏ°Ô ÇÏ´Â ÆÄÀÏÀÔ´Ï´Ù.


ÆÄÀÏÀº 

   db_view.php (ÇÔ¼ö¸¦ ÀÌ¿ëÇÑ È­¸éÃâ·Â ·çƾµé)
   db_func_all.php(ÇÔ¼ö ÁýÇÕ ÆÄÀÏ)
   logon.php(ÄíÅ°ÀÇ »ý¼º°ú ¾îµå¹Î Á¢¼Ó)


¸ÕÀú Admin¿µ¿ªÀ¸·Î Á¢¼Ó Çϱâ À§ÇÑ ¸µÅ©´Â °¢ °Ô½ÃÆÇ ¸ÞÀÎ È­¸é¿¡ º¸¸é ÀÖ½À´Ï´Ù.
±×¸². 15-1 °ú ±×¸². 14-1 ÀÇ ¾Æ·¡ ºÎºÐ¿¡ Admin ¸µÅ©¸¦ Ŭ¸¯ ÇÏ¸é ·Î±×¿Â È­¸éÀÌ Ãâ·ÂµË´Ï´Ù.
ÀÌ ºÎºÐÀº ¼Ò½º¿¡¼­ ¼³¸í ÇÏ°Ú½À´Ï´Ù. 
±×·³ ÀÌ ¿µ¿ªÀ» ¸¸µé±â À§ÇÑ µ¥ÀÌÅÍ º£À̽º¿Í Å×À̺íÀ» »ý¼º ÇÏ°Ú½À´Ï´Ù.

À§ ±×¸². 17-1 Àº ÀÚ·á½Ç °Ô½ÃÆÇ¿¡¼­ Admin ¿µ¿ªÀ¸·Î ·Î±×¿Â ÇÑ È­¸é ÀÔ´Ï´Ù.
        
µ¥ÀÌÅÍ º£À̽º¿ÍÀÇ ¿¬°ü ºÎºÐÀº 

    no - ÇØ´ç °Ô½ÃÆÇ ¹øÈ£ 
    title - ÇØ´ç °Ô½ÃÆÇ Á¦¸ñ
    mview - ÇØ´ç °Ô½ÃÆÇÀÇ Ã¹¹ø° Å×À̺í À̸§
    view - ÇØ´ç °Ô½ÃÆÇÀÇ µÎ¹ø° Å×À̺í À̸§
    sum - °¢ °Ô½ÃÆÇ¿¡ °Ô½ÃµÈ ±ÛÀÇ ¼ö·®À» ÀúÀå ÇÏ´Â ºÎºÐ
    date - ÇØ´ç °Ô½ÃÆÇÀÇ »ý¼ºµÈ ³¯Â¥

À§ Ç׸ñµéÀº adminp µ¥ÀÌÅÍ º£À̽º¿¡ Á¸ÀçÇÏ´Â ÀÚ·á½Ç Å×À̺í(file) ÀÔ´Ï´Ù.
°æ¸Å °Ô½ÃÆÇÀÇ Å×À̺í(admin) ¶ÇÇÑ À§ Ç׸ñ°ú °°½À´Ï´Ù.
¸ÕÀú µ¥ÀÌÅÍ º£À̽º¸¦ ¸¸µì´Ï´Ù.

µ¥ÀÌÅÍ º£À̽º¸¦ »ý¼º Çß´Ù¸é ÀÚ·á½Ç Å×À̺íÀ» ¸¸µé ÆÄÀÏÀ» »ý¼º ÇÕ´Ï´Ù.
Pico ÆíÁý±â³ª ´Ù¸¥ À¯Æ¿¸®Æ¼¸¦ ÀÌ¿ëÇؼ­ ¸¸µì´Ï´Ù.

    ´ÙÀ½ °æ¸Å °Ô½ÃÆÇ Å×À̺íÀ» »ý¼º ÇÕ´Ï´Ù.

±×¸². 17-1 ¿¡¼­ ÇØ´ç °Ô½ÃÆÇ Á¦¸ñÀ» Ŭ¸¯ Çϸé ÇØ´ç °Ô½ÃÆÇÀ¸·Î À̵¿ ÇÏ°Ô µË´Ï´Ù.
¹°·Ð Admin ±ÇÇÑÀ¸·Î À̵¿ ÇÏ´Â °ÍÀÔ´Ï´Ù. ÀÌ·¸°Ô µÇ¸é ¸ðµç °Ô½Ã¹°À» »èÁ¦ ÇÒ ¼ö ÀÖ´Â ±ÇÇÑÀÌ ÁÖ¾î Áý´Ï´Ù.
ÀÌ·± ¹æ¹ýÀ¸·Î °¢°¢ÀÇ °èÁ¤ ¼­ºñ½º¸¦ ÇÒ °æ¿ì ÇØ´ç ¾ÆÀ̵𺰠±ÇÇÑÀ» ¼³Á¤ ÇÒ ¼ö ÀÖ´Â °ÍÀÔ´Ï´Ù.
±×·³ ¼Ò½º¸¦ º¸¸é¼­ °æ¸Å Admin°ú ÀÚ·á½Ç Admin ±×¸®°í µ¥ÀÌÅÍ º£À̽º À¯Æ¿¸®Æ® µîÀ» ¼³¸íÇÏ°Ú½À´Ï´Ù.

17.2 db_func_all.php ÆÄÀÏ

    <?php
    //////////////////////////////////////////////////
    //
    //    ÀÏÀÚ : 2000.3.14 pm 5
    //   ÀÛ¼ºÀÚ: skycry (hong il)
    //
    //
    //   method : µ¥ÀÌŸ º£À̽º utility ^^;
    //            ±×¸®°í, Admin function
    //////////////////////////////////////////////////
    //¸ÕÀú ¼Ò½ºÀÇ °¢°¢ÀÇ ÇÔ¼ö¸¦ ¼³¸í ÇÒ ¶§ µÎ¼­ ¾ø´Â ºÎºÐÀÌ Á¶±Ý ÀÖÀ» °ÍÀÔ´Ï´Ù.
     °¢°¢ÀÇ ÇÔ¼ö ºÎºÐÀº ÀϺΠ¿µ¿ªµé À̹ǷΠÀ̵éÀº Á¶ÇÕÇÏ´Â db_view.php¸¦ º¼ ¶§ ¼¼½ÉÈ÷ ºÁÁֱ⠹ٶø´Ï´Ù.//

    $connect = mysql_connect('localhost','root','gksmf444');
    // µ¥ÀÌÅÍ º£À̽º Á¢¼Ó ºÎºÐ ÀÔ´Ï´Ù.// 
    ?>

    <?php
    //¾Æ·¡ ÇÔ¼ö´Â È­¸éÀ» ¸ÕÀú º¸¸é¼­ ¼³¸í ÇÏ°Ú½À´Ï´Ù. ±×¸² 17-1¿¡¼­ Db Edit¸¦ Ŭ¸¯ÇÏ¸é ¸µÅ© µÇ´Â È­¸é ÀÔ´Ï´Ù.//

    function main($page,$connect,$select,$dbs,$tableput,$root)
    {

    // ÀÌ ÇÔ¼ö´Â ¸ÞÀÎ È­¸é ÀÌÁö¸¸ °¢°¢ÀÇ ÀÎÀÚ¸¦ ¹ÞÀ¸¸é¼­ ´Ù¸¥ È­¸éÀ» Ãâ·Â ÇÕ´Ï´Ù.
       Áï ÇϳªÀÇ ÇÔ¼ö¿¡ ´Ù¾çÇÑ È­¸éÀ» ±¸¼º ÇÑ °Í ÀÔ´Ï´Ù. º¸´Ù Àü¹®ÀûÀÎ ÇÔ¼ö´Â ¾Æ´ÏÁö¸¸
       ÀÌ·± ¹æ¹ýÀ¸·Î Çϳª¾¿ ¸¸µé¸é¼­ ´Ã¾î °¡´Â °ÍÀÔ´Ï´Ù. À§ ÀÎÀÚ Áß $select °¡ tables ,
       field Áß Çϳª¸¦ ¹ÞÀ½¿¡ µû¶ó È­¸éÀÇ Ãâ·ÂÀÌ ´Þ¶ó Áý´Ï´Ù.


       if($select == tables)
       {

         mysql_select_db($dbs,$connect);
         $ally = mysql_query("show tables ",$connect);
         $t = "Table($dbs Db) hong il mansei~!";
         $link = "<a href=db_view.php?chanl=create_table&dbs=$dbs>";
         $linkdel = "<a href=db_view.php?chanl=dbdel&dbs=$dbs>";
       }
       // À§ Á¶°ÇÀÏ °æ¿ì µ¥ÀÌÅÍ º£À̽º ¼±Åðú ÇØ´ç µ¥ÀÌÅÍ º£À̽ºÀÇ Å×À̺íÀ» Äõ¸®ÇÏ°í
          Å×À̺í È­¸éÀÇ ¸Þ´º ¸µÅ©¸¦ ¸¸µé¾î ÁÝ´Ï´Ù.//


       if(!$select)
       {
         $ally = mysql_query("show databases ",$connect);
         $t = "Database Names hong il mansei~!" ;
         $link = "<a href =db_view.php?chanl=create_db>";
       }
       //¸¸¾à $select ÀÎÀÚ°¡ ¾ø´Ù¸é µ¥ÀÌÅÍ º£À̽º À¯Æ¿ È­¸éÀÇ ¸ÞÀÎ ºÎºÐÀ» º¸¿© ÁÝ´Ï´Ù.//


       if($select == field)
       {
         mysql_select_db($dbs,$connect);
         $ally = mysql_query("describe $tableput " , $connect);
         $link1 = "<b><a href =db_view.php?chanl=main&select=tables&dbs=$dbs>
         ($dbs Db)</b></a> ";
         $link2 = "<b>($tableput Table)</b>";
       }
       //À§ Á¶°ÇÀÏ °æ¿ì ÇØ´ç µ¥ÀÌÅÍ º£À̽º¸¦ ¼±Åà ÇÏ°í ÇØ´ç Å×À̺íÀ» Äõ¸® ÇÕ´Ï´Ù.
         ±×¸®°í, ÇØ´ç Å×À̺íÀÇ Çʵå Á¤º¸ È­¸éÀÇ ¸Þ´ºµéÀ» ¸µÅ© ÇÕ´Ï´Ù.//


       $t_num=mysql_num_rows($ally);
       $p_dip = 4 ;//ÆäÀÌÁö´ç ±Û ¼ö
       $p_page =4  ;//ÆäÀÌÁö´ç ÆäÀÌÁö ¸µÅ©¼ö
       $p_pagex = ceil($p_page / 2) ;
       $t_page = ceil($t_num / $p_dip) ;


       // À§ Ç׸ñµéÀº °Ô½ÃÆÇ ½ºÅ©¸³Æ® ÀÇ ¼³¸í°ú µ¿ÀÏ ÇÕ´Ï´Ù.//


       if(!$page)
       {
         $page = 1;
       }
       if( $page <= $p_pagex )
       {
         $p_start = $p_pagex + 1 ;
       }
       else
       {
         $p_start = $page + 1;
       }

           
       $pt_page = ceil($p_start - $p_pagex) ;
       $next_p = $page + 1 ;
       $pre_p = $page - 1 ;
       $start_num = ($t_num - ($page * $p_dip))+($p_dip-1) ;
       // ¿©±â ±îÁö ºÎºÐ ¿ª½Ã °Ô½ÃÆÇÀÇ ±ÛÀÇ Ãâ·Â¹° ¼ö¿Í ÆÐÀÌÁö ¸µÅ© ºÎºÐ ÀÔ´Ï´Ù.//

    if($select == field)
    {// ¸¸¾à À§ Á¶°ÇÀ̸é ÇØ´ç µ¥ÀÌÅÍ º£À̽ºÀÇ Å×ÀÌºí¿¡¼­ °¢ Çʵå Á¤º¸ È­¸éÀÇ Á¦¸ñ
        ºÎºÐÀ» Ãâ·Â ÇÕ´Ï´Ù. ±×¸². 17-6À» Âü°í Çϼ¼¿ä.//


      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <th bgcolor=white colspan=7 align=left>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b>$t_page / $page </b></font></th>
      // ÆäÀÌÁö Ç¥½Ã ºÎºÐ ÀÔ´Ï´Ù.//


      </tr>
      <tr>
      <td bgcolor=#808080 width=150>0
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Field</b></font></td>
      <td bgcolor=#808080 width=200 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Type</b></font></td>
      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Null</b></font></td>
      <td bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Key</b></font></td>
      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Default</b></font></td>
      <td bgcolor=#808080 width=150 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Extra</b></font></td>
      </tr>
      ");
    }
    else
    {//ÇØ´ç Å×À̺íÀÇ Çʵå Á¤º¸ Ç׸ñÀÌ ¾Æ´Ï¸é ³ª¸ÓÁö È­¸éÀº ¾Æ·¡ Äڵ带 Ãâ·Â ÇÕ´Ï´Ù.//
      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <table border=0 cellspacing=2 cellpadding=2 width=500 >
      <tr>
      <th bgcolor=white align=left>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b>$t_page / $page </b></font></th>
      </tr>
      <tr>
      <td bgcolor=#808080 width=450>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$t</b></font></td></tr>
      ");
    }


    if(!$t_num)
    {//ÇØ´ç µ¥ÀÌÅÍ º£À̽º¿¡ ³»¿ëÀÌ ¾øÀ» °æ¿ì//
      echo ("
      <tr>
      <th bgcolor=black colspan=6>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>µî·ÏµÈ µ¥ÀÌŸ,Å×À̺íÀÌ ¾ö½º¿ä...  ^^;</b></font></th>
      </tr>
      </center>
      </table>
      </html>
      ");
    }
    else
    {// ÇØ´ç µ¥ÀÌÅÍ º£À̽º¿¡ ³»¿ëÀÌ ÀÖÀ» °æ¿ì//
      for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
      {
        if($pd >= 0 )
        {
          mysql_data_seek($ally,$pd);
          $db=mysql_fetch_array($ally);

          // ÀÌ ºÎºÐÀº ´Ù¸¥ °Ô½ÃÆÇÀÇ ºÎºÐ°ú °°½À´Ï´Ù 14Àå 15Àå ÂüÁ¶//

          if(!$select)
          {//µ¥ÀÌÅÍ º£À̽º À¯Æ¿ÀÇ ¸ÞÀÎ È­¸é Ãâ·Â ÀÔ´Ï´Ù.//
            echo("
            <tr>
            <td bgcolor=black>
            <a href ='db_view.php?chanl=main&dbs=$db[Database]&select=tables'>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$db[Database]</b></font></a></td>
            ");
          }


          if($select == tables)
          {//ÇØ´ç µ¥ÀÌÅÍ º£À̽ºÀÇ Å×À̺í Ç׸ñÀ» Ãâ·ÂÇÕ´Ï´Ù.//
            echo("
            <tr>
            <td bgcolor=black>
            <a href ='db_view.php?chanl=main&dbs=$dbs&select=field&tableput=$db[0]'>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$db[0]</b></font></a></td>
            ");
          }
          // if($select == tables) Ç׸ñÀÇ °æ¿ì ÀÌ ¼Ò½º¿¡¼­´Â ¾Æ·¡ ±×¸². 17-7À» Âü°í Çϼ¼¿ä//             

    if($select == field)
    {//ÇØ´ç µ¥ÀÌÅÍ º£À̽º Å×À̺íÀÇ Çʵå Á¤º¸¸¦ Ãâ·Â ÇÕ´Ï´Ù.//
      echo("
      <tr>
      <td bgcolor=black>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$db[Field]</b></font></a></td>
      <td bgcolor=black>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$db[Type]</b></font></a></td>
      <td bgcolor=black>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$db[Null]</b></font></a></td>
      <td bgcolor=black>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$db[Key]</b></font></a></td>
      <td bgcolor=black>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$db[Default]</b></font></a></td>
      <td bgcolor=black>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$db[Extra]</b></font></a></td>
      ");
    }
    }
    }


    echo("
    <tr>
    <td bgcolor=black colspan=7>&nbsp;</td>
    </tr>
    <tr>
    <td bgcolor=black colspan=7 align=center>
    ");


    if($page == 1)
    {
      echo ("
      <font style='font-size:12px;font-style:italic;color:#fffff0'>first </font> ");
    }
    else
    {
      if($select == tables)
      {// ÇØ´ç µ¥ÀÌÅÍ º£À̽ºÀÇ Å×À̺í Ç׸ñ Ãâ·Â ½Ã¿¡ ÆäÀÌÁö ¸µÅ© ÀÔ´Ï´Ù.//
        echo ("
        <a href =db_view.php?chanl=main&page=$pre_p&dbs=$dbs&select=tables>
        <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>");
      }
      if(!$select)
      {//ÇØ´ç µ¥ÀÌÅÍ º£À̽º È­¸éÀÇ ÆäÀÌÁö ¸µÅ© ÀÔ´Ï´Ù.//
        echo ("
        <a href =db_view.php?chanl=main&page=$pre_p>
        <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>");
      }
      if($select == field)
      {//ÇØ´ç µ¥ÀÌÅÍ º£À̽º Å×À̺íÀÇ Çʵå Á¤º¸ È­¸éÀÇ ÆäÀÌÁö ¸µÅ© ÀÔ´Ï´Ù.//
        echo ("
        <a href =db_view.php?chanl=main&page=$pre_p&dbs=
        $dbs&select=field&tableput=$tableput>
        <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>");
      }
    }


    for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++)
    {
      if($pp == $page )
      {
        echo ("
        <font style='font-size:13px;font-style:italic;color:red'>
        $pp</font>
        ");
      }
      else
      {
        if($pp > 0  && $pp <= $t_page)
        {
          if(!$select)
          {
            echo("
            <a href =db_view.php?chanl=main&page=$pp>
            <font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>
            ");
          }
          if($select == tables)
          {
            echo("
            <a href =db_view.php?chanl=main&page=$pp&dbs=$dbs&select=tables>
            <font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>
            ");
          }
          if($select == field)
          {
            echo("
            <a href =db_view.php?chanl=main&page=$pp&dbs=
            $dbs&select=field&tableput=$tableput>
            <font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>
            ");
            // ÀÌ ºÎºÐ ¿ª½Ã À§ °¢ È­¸é ¸¶´ÙÀÇ ¸µÅ© ºÎºÐµé ÀÔ´Ï´Ù.//
          }
        }
      }
    }
    // ÀÌ·¸°Ô ¸ðµç °Ô½ÃÆÇ ÇüÅÂÀÇ ½ºÅ©¸³Æ®´Â ÇÑ°¡Áö ¹æ¹ý¿¡ ´Ù¸¥ ¹æ¹ýÀ» Á¢¸ñ ÇÔÀ¸·Î¼­
       ´Ù¾çÇÑ ÇüÅÂÀÇ ½ºÅ©¸³Æ®¸¦ »ý¼º ÇÒ ¼ö ÀÖ½À´Ï´Ù. ³ª¸ÓÁö ¸ÞÀÎ È­¸é ÇÔ¼ö ºÎºÐ ¿ª½Ã
       Áö±Ý ±îÁö º¸¾Æ¿Â °Ô½ÃÆÇ ¼Ò½º¿Í À¯»ç ÇÕ´Ï´Ù. °æ¸Å³ª ÀÚ·á½Ç °Ô½ÃÆÇÀÇ ¼Ò½º¸¦ ÀÌÇØ
       Çß´Ù¸é ÀÌ ºÎºÐÀº ½±°Ô ÀÌÇØ°¡ µÉ °ÍÀÔ´Ï´Ù.//


        if($page == $t_page)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'> last^^ </font>
          ");
        }
        else
        {
          if($select == tables)
          {
            echo ("
            <a href =db_view.php?chanl=main&page=$next_p&dbs=$dbs&select=tables>
            <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>
            ");
          }
          if(!$select)
          {
            echo ("
            <a href =db_view.php?chanl=main&page=$next_p>
            <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
          }
          if($select == field)
          {
            echo ("
            <a href =db_view.php?chanl=main&page=$next_p&dbs=
            $dbs&select=field&tableput=$tableput>
            <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>
            ");
          }
        }
      }


      if($select != field)
      {
        $td = "<td bgcolor=black width=100>
        $link
        // ÀÌ ÇÔ¼ö Á¦ÀÏ Ã³À½ ¼±¾ð Çß´ø º¯¼ö¸¦ ºÒ·¯ ¿À´Â °ÍÀÔ´Ï´Ù.
        $select°¡ À§ Á¶°ÇÀÏ °æ¿ì ¸µÅ© ÀÔ´Ï´Ù.//


        <font style='font-size:13px;font-style:italic;color:#ffd700'>
        <b>New </b></font></a></td>";


        if($select == tables)
        {
          $td = "<td bgcolor=black width=100>
          $link
          <font style='font-size:13px;font-style:italic;color:#ffd700'>
          <b>New </b></font></a></td>
          <td bgcolor=black width=100>
          $linkdel
          <font style='font-size:13px;font-style:italic;color:#ffd700'>
          <b>Db Del </b></font></a></td>";
        }
      }
      else
      {
        $td =  "<td bgcolor=black width=300>
        <font style='font-size:13px;font-style:italic;color:red'>
        $link1 > $link2
        // ÇÔ¼ö óÀ½ ºÎºÐÀÇ º¯¼ö ¼±¾ðÀ» ºÒ·¯ ¿À´Â ºÎºÐ ÀÔ´Ï´Ù. ¿ª½Ã
           ÇØ´ç Å×À̺íÀÇ Çʵå Á¤º¸ È­¸é¿¡¼­ ÀüÀÇ È­¸éÀ¸·Î ¸µÅ© ÇÏ´Â ºÎºÐ
           ÀÔ´Ï´Ù. ±×¸². 17-6 ÂüÁ¶//


        </font></td>
        <td bgcolor=black width=100>
        <a href =db_view.php?chanl=tabledel&dbs=$dbs&tableput=$tableput>
        <font style='font-size:13px;font-style:italic;color:#ffd700'>
        Del Table
        </font></a></td>";
      }
          
      echo("
      </td>
      </tr>
      </center>
      </table>
      <br>
      <center>
      <table border=0 cellspacing=2 cellpadding=2 width=500 >
      <tr>
      $td
      <td bgcolor=black width=100>
      <a href = test.php>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Home re</b></font></a></td>


      <td bgcolor=black width=100>
      <form method=post action=db_view.php>
      <select name=chanl>
      <option value=file_view selected>File edit
      <option value=title_view>Title edit
      <option value=main>Db edit
      </select>
      // °¢ È­¸é¿¡ Á¸Àç ÇÏ´Â °Ô½ÃÆÇ À̵¿ Ç®´Ù¿î ¸Þ´º Ç׸ñ ÀÔ´Ï´Ù.//
      </td>
      <td>
      <input type=submit value=Go.!>
      </td>
      </form>
      ");


      if($tableput)
      {// À§ ÀÎÀÚ°¡ Á¸Àç Çϸé ÇØ´ç Å×À̺í Çʵå Á¤º¸ È­¸é À̹ǷΠ¾Æ·¡ÀÇ ¸Þ´º¸¦ ´õ
          È­¸é¿¡ Ãâ·ÂÇØ ÁÝ´Ï´Ù. ´ÙÀ½ ÄÚµå´Â alter Äõ¸® ¸í·É¾î¸¦ Á÷Á¢ ÀÔ·Â ÇÏ´Â ¸Þ´º ÀÔ
          ´Ï´Ù. (±×¸². 17-6 À» Âü°í Çϼ¼¿ä.) ÀÌ·¯ÇÑ ¼³Á¤Àº mysqlÀÇ ¸ðµç ¸í·É¾î¸¦ ³ª¿­
          ÇÏ´Â µîÀÇ ¿©·¯ °¡Áö »ç¿ëÀÚ Áß½ÉÀÇ ÀÎÅÍÆäÀ̽º·Î µðÀÚÀÎ °¡´É ÇÕ´Ï´Ù. °¡·É Çʵå
          Á¤º¸¸¦ ÆÄÀÏ·Î ÀúÀå ÇÑ´ÙµçÁö Å×À̺í Á¤º¸¸¦ ´ãÀº ÆÄÀÏÀ» ºÒ·¯¿Í ¹Ù·Î ÀÔ·Â ÇÏ´Â
          ±â´É »ý°¢Çϱ⿡ µû¶ó ¿©·¯ ´Ù¾çÇÑ Çü½ÄÀÌ Á¸Àç ÇÕ´Ï´Ù. ¿©·¯ºÐµéÀÌ ´õ »õ·Î¿î ±â´É
          À» Ãß°¡ Çؼ­ ¸¸µé¾î º¸¸é Àç¹Ì ÀÖÀ» °ÍÀÔ´Ï´Ù.//


        echo("
        </tr>
        </table>
        <br><br>
        <table border=0 cellspacing=2 cellpadding=2 width=500 >
        <tr>
        <th bgcolor=gray colspan=7 align=left>
        <font style='font-size:12px;font-style:italic;color:white'>
        <b>Attribute Add/Del insert Attribute Name</b></font></th>
        </tr>
        <tr>
        <td bgcolor=black width=200>
        <font style='font-size:13px;font-style:italic;color:blue'>
        <b>Alter Table $tableput</b></font></td>
        <td bgcolor=black width=50>
        <font style='font-size:13px;font-style:italic;color:#ffd700'>
        <form method=post action=db_view.php>
        <input type = hidden name=tn value=$tableput>
        <input type = hidden name=chanl value=e_field>
        <input type = hidden name=dbs value=$dbs>
        <select name=tct>
        <option value=add selected>Add
        <option value=drop >Del
        </select>
        //ÇØ´ç Å×ÀÌºí ¸í°ú µ¥ÀÌÅÍ º£À̽º¸í ±×¸®°í alter ¸í·ÉÀÎ add ,drop Áß ÅÃÇؼ­
        ÇØ´ç ·çƾÀ¸·Î Àü´Þ ÇÏ´Â Æû ¹® ÀÔ´Ï´Ù.//


        </td>
        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#ffd700'>
        <input type = text name='tablequ' size=14>
        // ÇØ´ç Å×À̺íÀÇ Çʵå Á¤º¸¸¦ ÀÔ·Â ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù.//


        </font></td>
        <td>
        <input type=submit value=Go.!>
        //Go.! ¹öÆ°À» »ý¼ºÇØ ÀÎÀÚµéÀ» Àü´Þ ÇÕ´Ï´Ù.//


        </td>
        </form>
        ");
      }


      echo("
      </tr>
      </table>
      </center>
      </html>
      ");
    } //main( ) ÇÔ¼öÀÇ ³¡ÀÔ´Ï´Ù.//

    //°æ¸Å ³ª ÀÚ·á½Ç °Ô½ÃÆÇ°ú ´Þ¸® Db À¯Æ¿¸®Æ¼ ¸ÞÀÎ È­¸éÀÇ °æ¿ì ÇÑ ÇÔ¼ö¿¡¼­ ¿©·¯
      È­¸é(µ¥ÀÌÅÍ º£À̽º , Å×À̺í , Å×À̺í ÇʵåÁ¤º¸)À» Ç¥Çö Çß½À´Ï´Ù. ÀÌ·¸µí »ý°¢ Çϱâ
      ¿¡ µû¶ó ¿©·¯ ´Ù¾çÇÑ ¹æ¹ýÀÌ Á¸Àç ÇÕ´Ï´Ù. ¹«¾ùº¸´Ù Áß¿äÇÑ ºÎºÐÀº ÀÌ·¯ÇÑ ÀÛ¾÷À» ÇÒ ¶§
      µ¥ÀÌÅÍ º£À̽º¿ÍÀÇ ¿¬°á ¼³Á¤ ÀÔ´Ï´Ù. ÇÊÀÚÀÇ °æ¿ì ¾ÆÁ÷ ¹Ì¼÷ÇÑ Á¡ÀÌ ¸¹½À´Ï´Ù. ½ºÅ©¸³Æ®
      ÀÛ¼º½Ã¿¡´Â ÀÌ ºÎºÐÀ» ²À ½Å°æ ½á¼­ ÀÛ¼º Çϱ⠹ٶø´Ï´Ù.//


    function create_db1()
    {// µ¥ÀÌÅÍ º£À̽º À¯Æ¿ÀÇ ¸ÞÀÎ È­¸é¿¡¼­(±×¸². 17-5) ¿¡¼­ New ¸¦ Ŭ¸¯ ÇÒ °æ¿ì ¸µÅ©µÇ´Â ºÎºÐ ÀÔ´Ï´Ù. //

    echo("
    <html>
    <title>
    creat_db html
    </title>
    <body bgcolor=black>
    <center>
    <img src=skyt1.jpg border=0>
    <br>
    <form method=post action=db_view.php>
    <input type=hidden name=chanl value=create_db2>
    <table border=0 cellspacing=2 cellpadding=2  width=700 >
    <tr>
    <td bgcolor=#808080 width=74><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <b>~Db Name</b></font></td>
    <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=text name=dbname size=10></font></td>
    //»õ·ÎÀÌ ¸¸µé µ¥ÀÌÅÍ º£À̽º À̸§À» Àû¾îÁÖ´Â ºÎºÐ ÀÔ´Ï´Ù.//


    <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
    <input type=submit value=¸¸µé±â>
    //¸¸µé±â ¹öÆ°À» »ý¼º ÇÕ´Ï´Ù.//


    </font></td>
    </table>
    </tr>
    </form>
    </center>
    </body>
    </html>
    ");
    }

    //À§ ±×¸²Àº °æ¸Å °Ô½ÃÆÇ¿¡¼­ Admin À¸·Î ·Î±×¿Â Ç߰ųª Db À¯Æ¿¸®Æ¼ÀÇ À̵¿ ¸Þ´º·Î À̵¿
    ÇßÀ» °æ¿ìÀÇ °æ¸Å Admin ºÎºÐ ÀÔ´Ï´Ù.//
    //±×¸². 17-9 ¿¡¼­ Create °æ¸Å¸¦ Ŭ¸¯ ÇßÀ» °æ¿ì ¸µÅ© È­¸é°ú ÇÔ¼ö¸¦ º¸°Ú½À´Ï´Ù.

   // ±×¸². 17-10À» º¸¸é °Ô½ÃÆÇ¿¡ »ç¿ëµÉ Å×À̺í À̸§À» Àû´Â ¶õ°ú °Ô½ÃÆÇÀÇ À̸§À» Àû´Â
    ºÎºÐÀÌ Á¸Àç ÇÕ´Ï´Ù. ¿©±â¼­ ¿©·¯ºÐµéÀÌ Âü°í ÇÒ ºÎºÐÀº Å×À̺í À̸§Àº µ¥ÀÌÅÍ º£À̽º¿¡
    »ý¼ºÇÏ´Â ºÎºÐ À̹ǷΠ¿µ¹® Ç¥±â¸¦ ÇØ¾ß µÇ°í ºÙ¿© ½á¾ß ÇÕ´Ï´Ù. ÀÌ ºÎºÐÀÇ ¿¡·¯ È­¸éÀº
    ¸¸µéÁö ¾Ê¾Ò½À´Ï´Ù. ÇÏÁö¸¸ °£´ÜÇÑ ÀÚ¹Ù¸¦ ÀÌ¿ëÇÑ ¹æ¹ýÀÌ ÀÖÀ¸¹Ç·Î Ãß°¡ Çϸé ÁÁÀ» °ÍÀÔ
    ´Ï´Ù. Å×À̺í À̸§Àº Àû¾î º¸³»¸é µÎ°³ÀÇ Å×À̺íÀ» ÀÚµ¿ »ý¼º ÇÕ´Ï´Ù. ¾Æ·¡ create_title()
    ÇÔ¼ö¿Í ±×¸² 17-10À» ºñ±³ Çغ¸±â ¹Ù¶ø´Ï´Ù.//


    function create_title()
    {

      echo("
      <html>
      <title>
      creat_db html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=create_title2>
      <table border=0 cellspacing=2 cellpadding=2  width=700 >
      <tr>
      <td bgcolor=#808080 width=74><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Table Name</b></font></td>
      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=ctitle size=10></font></td>
      //»õ·Î¿î °æ¸Å °Ô½ÃÆÇ¿¡ »ç¿ëÇÒ Å×À̺í À̸§À» Àû´Â ºÎºÐ ÀÔ´Ï´Ù.//


      </tr>
      <tr>
      <td bgcolor=#808080 width=74><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~°Ô½ÃÆÇ Name</b></font></td>
      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=title size=10></font></td>
      // »õ·Î¿î °æ¸Å °Ô½ÃÆÇÀÇ À̸§À» Àû´Â ºÎºÐ ÀÔ´Ï´Ù.//


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=¸¸µé±â>
      // ¸¸µé±â ¹öÆ°À» »ý¼º ÇÕ´Ï´Ù.//
      </font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }// create_title() ÀÇ ³¡ÀÔ´Ï´Ù.//

    // ±×¸² 17-1Àº ±×¸² 17-1¿¡¼­ Create ÀÚ·á½ÇÀ» Ŭ¸¯ ÇßÀ» °æ¿ì ¸µÅ© ÀÔ´Ï´Ù.//



    function create_file()
    {// ÀÌ ÇÔ¼ö ¿ª½Ã »õ·Î¿î ÀÚ·á½Ç °Ô½ÃÆÇÀ» »ý¼ºÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù. ±×¸². 17-11À» Âü°í Çϼ¼¿ä//


      echo("
      <html>
      <title>
      creat_db html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=create_title3>
      <table border=0 cellspacing=2 cellpadding=2  width=700 >
      <tr>
      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Table Name</b></font></td>
      <td bgcolor=black width=100>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=ctitle size=10></font></td>
      // »õ·Î ¸¸µé ÀÚ·á½Ç °Ô½ÃÆÇ¿¡ »ç¿ëÇÒ Å×À̺í À̸§À» Àû´Â ºÎºÐ ÀÔ´Ï´Ù.//
      </tr>
      <tr>
      <td bgcolor=#808080 width=74><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~ÀÚ·á½Ç Name</b></font></td>
      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=title size=10></font></td>
      //ÇØ´ç ÀÚ·á½Ç À̸§À» Àû´Â ºÎºÐ ÀÔ´Ï´Ù.//
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=¸¸µé±â>
      </font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }// create_file() ÀÇ ³¡ÀÔ´Ï´Ù.//


    function title_view($page,$connect,$s_db)
    {// ÀÌ ÇÔ¼ö´Â °æ¸Å °Ô½ÃÆÇÀÇ ¸ÞÀÎ È­¸é Ãâ·Â ºÎºÐ ÀÔ´Ï´Ù.(±×¸². 17-9) ÀÌ·¸°Ô °æ¸Å ¸ÞÀÎ
     È­¸é°ú ÀÚ·á½Ç ¸ÞÀÎ È­¸éÀ» µû·Î ÇÒ ¼öµµ ÀÖ°ÚÁö¸¸ º¸´Ù ºÎÇǸ¦ ÁÙÀÎ´Ù¸é ¾ÕÀÇ µ¥ÀÌÅÍ
     º£À̽º À¯Æ¿ÀÇ È­¸é ´ÙÁßȭó·³ ¸¸µé ¼öµµ ÀÖ°ÚÁÒ. óÀ½ ºÎºÐÀº Áö±Ý ±îÁö ºÁ¿Â ¸ÞÀÎ È­
     ¸é ºÎºÐ°ú µ¿ÀÏ ÇÕ´Ï´Ù. ´Ù¸¸ ¿©±â¼­´Â µ¥ÀÌÅÍ º£À̽º ¿¬°á ºÎºÐÀÌ ÇÔ¼ö ¾È¿¡ Á¸Àç
     ÇÕ´Ï´Ù//


      mysql_select_db(adminp,$connect);
      $ally = mysql_query("select no,title,mview,view,sum,wdate
      from admin  order by no ",$connect);
      $t_num=mysql_num_rows($ally);
      $p_dip = 1 ;//ÆäÀÌÁö´ç ±Û ¼ö


      $p_page =4  ;//ÆäÀÌÁö´ç ÆäÀÌÁö ¸µÅ©¼ö
      $p_pagex = ceil($p_page / 2) ;
      $t_page = ceil($t_num / $p_dip) ;


      if(!$page)
      {
        $page = 1;
      }
      if( $page <= $p_pagex )
      {
        $p_start = $p_pagex + 1 ;
      }
      else
      {
        $p_start = $page + 1;
      }


      $pt_page = ceil($p_start - $p_pagex) ;
      $next_p = $page + 1 ;
      $pre_p = $page - 1 ;
      $start_num = ($t_num - ($page * $p_dip))+($p_dip-1) ;


      echo("// ¸ÞÀÎ È­¸é ŸÀÌƲ ºÎºÐ ÀÔ´Ï´Ù.//
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=del_title>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <th bgcolor=white colspan=7 align=left>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b>$t_page / $page </b></font></th>
      </tr>
      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>No</b></font></td>
      <td bgcolor=#808080 width=400>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Title</b></font></td>
      <td bgcolor=#808080 width=75 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>MView</b></font></td>
      <td bgcolor=#808080 width=75 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>View</b></font></td>
      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>sum</b></font></td>
      <td bgcolor=#808080 width=150 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>date</b></font></td>
      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>check</b></font></td>
      </tr>
      ");


      if(!$t_num)
      {// ÇØ´ç µ¥ÀÌÅÍ º£À̽º Å×ÀÌºí¿¡ Ç׸ñµéÀÌ ¾øÀ» °æ¿ì ÀÔ´Ï´Ù.//
        echo ("
        <tr>
        <th bgcolor=black colspan=6>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>µî·ÏµÈ ±ÛÀÌ ¾ö½º¿ä...  ^^;</b></font></th>
        </tr>
        </center>
        </table>
        </html>
        ");
      }
      else
      {//Ç׸ñÀÌ Á¸ÀçÇÒ °æ¿ì ÀÔ´Ï´Ù.//
        for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
        {

          if($pd >= 0 )
          {
            mysql_data_seek($ally,$pd);
            $put=mysql_fetch_array($ally);


            echo("
            <tr>
            <td bgcolor=black>
            <font style='font-size:13px;font-style:italic;color:blue'>
            $put[no]</font></td>
            //¸ÞÀÎ È­¸é °Ô½ÃÆÇ ¹øÈ£ Ãâ·Â ºÎºÐ ÀÔ´Ï´Ù.//


            <td bgcolor=black>
            <a href =main_view.php?chanl=main_view&f=$put[mview]&f2=$put[view]>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[title]</b></font></a></td>
            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[mview]</b></font></td>
            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[view]</b></font></td>
            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[sum]</b></font></td>
            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:blue'>
            <b>$put[wdate]</b></font></td>
            <td bgcolor=black align=center>
            <input type=radio name=s value=$put[mview]>
            <input type=hidden name=x value=$put[view]>
            </td>
            </tr>
            ");
          }
        }


        echo("
        <tr>
        <td bgcolor=black colspan=7>&nbsp;</td>
        </tr>
        <tr>
        <td bgcolor=black colspan=7 align=center>
        ");


        if($page == 1)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'>first </font> ");
        }
        else
        {
          echo ("
          <a href =db_view.php?chanl=title_view&page=$pre_p>
          <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>");
        }


        for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++)
        {

          if($pp == $page )
          {
            echo ("
            <font style='font-size:13px;font-style:italic;color:red'>
            $pp</font>
            ");
          }
          else
          {
            if($pp > 0  && $pp <= $t_page)
            {
              echo("
              <a href =db_view.php?chanl=title_view&page=$pp>
              <font style='font-size:12px;font-style:italic;color:#808080'>
              [$pp]</font></a>
              ");
            }
          }
        }//forÀÇ ³¡ÀÔ´Ï´Ù.//

                
        if($page == $t_page)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'> last^^ </font>");
        }
        else
        {
          echo ("
          <a href =db_view.php?chanl=title_view&page=$next_p>
          <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
        }
      }//elseÀÇ ³¡ÀÔ´Ï´Ù.//


      echo("
      </td>
      </tr>
      </center>
      </table>
      <br>
      <center>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <td bgcolor=black width=100>
      <a href =db_view.php?chanl=create_title>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Creat °æ¸Å</b></font></a></td>


      <td bgcolor=black width=100>
      <a href =db_view.php?chanl=main>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Db Edit</b></font></a></td>
      <td bgcolor=black width=100>
      <input type=hidden name=put value=$start_num>
      <input type=submit value=Del>
      </td>
      </tr>
      </table>
      </form>
      </center>
      </html>
      ");
    }// title_view( ) ÀÇ ³¡ÀÔ´Ï´Ù.//

    function logon($file)
    {  // ÀÌ ºÎºÐÀº °¢ ¸ÞÀÎ È­¸é¿¡¼­ AdminÀ¸·Î ·Î±×¿Â ÇÒ °æ¿ì È­¸é ÀÔ´Ï´Ù.

       ±×¸². 17-12 ¸¦ Âü°í Çϼ¼¿ä.//

      echo("
      <html>
      <title>
      passw view
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=logon.php>
      //¿©±â ÀÔ·ÂÇÑ ÆÄÀÏÀº logon.php ÆÄÀÏ·Î ÀÎÀÚµéÀÌ Àü´Þ µÇ¾î Áý´Ï´Ù. Logon.phpÆÄÀÏ
      ¿¡ ´ëÇؼ­´Â µÚ¿¡¼­ ¼³¸í ÇÏ°Ú½À´Ï´Ù.//
      <input type=hidden name=chanl value=$file>
      <table border=0 cellspacing=2 cellpadding=2  width=700 >
      <tr>
      <td bgcolor=#808080 align=center width=74>
      <font style='font-size:13px;font-style:italic;color:#blue'>
      <b>admin login</b></font></td>
      </tr>
      <tr>
      <td bgcolor=#808080 width=74><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Host</b></font></td>
      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=host size=10></font></td>
      //mysql¿¡ µî·Ï µÇ¾î ÀÖ´Â °èÁ¤ÀÇ host À̸§À» Àû¾î ÁÝ´Ï´Ù.//


      </tr>
      <tr>
      <td bgcolor=#808080 width=74><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Name</b></font></td>
      fffff0'>
      <b>~Name</b></font></td>
      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=id size=10></font></td>
      //mysql Á¢¼Ó °èÁ¤À» ÀÔ·Â ÇÕ´Ï´Ù.//


      </tr>
      <tr>
      <td bgcolor=#808080 width=74><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~passw</b></font></td>
      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=password name=passw size=10></font></td>
      //mysql Á¢¼Ó °èÁ¤ÀÇ Æнº¿öµå¸¦ ÀÔ·Â ÇÕ´Ï´Ù.//


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=ÀÔ·Â>
      </font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }// logon($file) ÀÇ ³¡ÀÔ´Ï´Ù.//


    function file_view($page,$connect,$s_db)
    {// ÀÚ·á½Ç °Ô½ÃÆÇÀÇ Admin(±×¸² 17-1) ºÎºÐ ÀÔ´Ï´Ù. ¾ÕÀÇ ´Ù¸¥ ¸ÞÀÎ È­¸é ºÎºÐ°ú
        °°Àº ºÎºÐ À̹ǷΠ°£·«ÇÑ ¼³¸í¸¸ ÇÏ°Ú½À´Ï´Ù.//

      mysql_select_db(adminp,$connect);
      $ally = mysql_query("select no,title,mview,view,sum,wdate
      from file  order by no ",$connect);
      $t_num=mysql_num_rows($ally);
      $p_dip = 3 ;//ÆäÀÌÁö´ç ±Û ¼ö
      $p_page =4  ;//ÆäÀÌÁö´ç ÆäÀÌÁö ¸µÅ©¼ö
      $p_pagex = ceil($p_page / 2) ;
      $t_page = ceil($t_num / $p_dip) ;


      if(!$page)
      {
        $page = 1;
      }
      if( $page <= $p_pagex )
      {
        $p_start = $p_pagex + 1 ;
      }
      else
      {
        $p_start = $page + 1;
      }


      $pt_page = ceil($p_start - $p_pagex) ;
      $next_p = $page + 1 ;
      $pre_p = $page - 1 ;
      $start_num = ($t_num - ($page * $p_dip))+($p_dip-1) ;


      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=del_title>
      <input type=hidden name=table value=file>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <th bgcolor=white colspan=7 align=left>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b>$t_page / $page </b></font></th>
      </tr>
      <tr>
      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>No</b></font></td>
      <td bgcolor=#808080 width=400>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Title</b></font></td>
      <td bgcolor=#808080 width=75 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>MView</b></font></td>
      <td bgcolor=#808080 width=75 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>View</b></font></td>
      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>sum</b></font></td>
      <td bgcolor=#808080 width=150 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>date</b></font></td>
      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>check</b></font></td>
      </tr>
      ");


      if(!$t_num)
      {
        echo ("
        <tr>
        <th bgcolor=black colspan=6>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>µî·ÏµÈ ±ÛÀÌ ¾ö½º¿ä...  ^^;</b></font></th>
        </tr>
        </center>
        </table>
        </html>
        ");
      }
      else
      {
        for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
        {

          if($pd >= 0 )
          {
            mysql_data_seek($ally,$pd);
            $put=mysql_fetch_array($ally);


            echo("
            <tr>
            <td bgcolor=black>
            <font style='font-size:13px;font-style:italic;color:blue'>
            $put[no]</font></td>
            <td bgcolor=black>
            <a href =m.php?chanl=main_view&f=$put[mview]&f2=$put[view]>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[title]</b></font></a></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[mview]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[view]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[sum]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:blue'>
            <b>$put[wdate]</b></font></td>


            <td bgcolor=black align=center>
            <input type=radio name=s value=$put[mview]>
            <input type=hidden name=x value=$put[view]>


            </td>
            </tr>
            ");
          }
        }


        echo("
        <tr>
        <td bgcolor=black colspan=7>&nbsp;</td>
        </tr>
        <tr>
        <td bgcolor=black colspan=7 align=center>
        ");


        if($page == 1)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'>first </font> ");
        }
        else
        {
          echo ("
          <a href =db_view.php?chanl=file_view&page=$pre_p>
          <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>");
        }


        for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++)
        {

          if($pp == $page )
          {
            echo ("
            <font style='font-size:13px;font-style:italic;color:red'>
            $pp</font>  ");
          }
          else
          {
            if($pp > 0  && $pp <= $t_page)
            {
              echo("
              <a href =db_view.php?chanl=file_view&page=$pp>
              <font style='font-size:12px;font-style:italic;color:#808080'>
              [$pp]</font></a>");
            }
          }
        }


        if($page == $t_page)
        {

          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'> last^^ </font>");
        }
        else
        {
          echo ("
          <a href =db_view.php?chanl=file_view&page=$next_p>
          <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
        }
      }


      echo("
      </td>
      </tr>
      </center>
      </table>
      <br>
      <center>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>


      <td bgcolor=black width=100>
      <a href =db_view.php?chanl=create_file>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Creat ÀÚ·á½Ç</b></font></a></td>


      <td bgcolor=black width=100>
      <a href =db_view.php?chanl=main>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Db Edit</b></font></a></td>


      <td bgcolor=black width=100>
      <input type=hidden name=put value=$start_num>
      <input type=submit value=Del>
      </td>
      </tr>
      </table>
      </form>
      </center>
      </html>
      ");
    }

    ?>//db_func_all.php ÀÇ ³¡ÀÔ´Ï´Ù.//



´ÙÀ½Àº logon.php ÆÄÀÏ¿¡ ´ëÇØ ¼³¸íÇÏ°Ú½À´Ï´Ù. ±×¸². 17-12 ÀÇ Àü´ÞÀÎÀÚ¸¦ ¹Þ¾Æ ÄíÅ°¸¦ »ý¼ºÇÏ´Â ºÎºÐÀÔ´Ï´Ù.

17.3 logon.php ÆÄÀÏ

¸ÕÀú ÇØ´ç ÄíÅ°¸¦ »ý¼º ÇÏ´Â ¹æ¹ý ÀÌ¿Ü¿¡ php 4.0 ºÎÅÍ´Â ¼¼¼Ç Ç׸ñÀÌ Ãß°¡ µÇ¾î ÀÖ½À´Ï´Ù.
ÀÌ°ÍÀ» ÀÌ¿ëÇؼ­ ȸ¿øÁ¦ »çÀÌÆ®¸¦ ±¸¼ºÇÒ °æ¿ì ÇØ´ç °èÁ¤ ¸¶´Ù °¢°¢ÀÇ ¼¼¼ÇÀ» ÀúÀåÇÒ Çʵ带 »ý¼ºÇÔÀ¸·Î Çؼ­
Á¢¼Ó°ú ÇØ´ç À¯ÀúÀÇ Á¢±Ù°ü¸®°¡ ¼ö¿ùÇØ Áý´Ï´Ù.   ¿©±â¼­´Â ÀÌ·¯ÇÑ ¹æ¹ýÀ» Àû¿ëÇÏÁö´Â ¾Ê¾ÒÁö¸¸ ¾î·ÆÁö¾ÊÀº
±¸¼ºÀ̹ǷΠÇѹø ¸¸µé¾î º¸±â ¹Ù¶ø´Ï´Ù.


    <?php

    $connect = mysql_connect('localhost','root','gksmf444');
    mysql_select_db('mysql',$connect);


    $passwput = mysql_query("select password('$passw')");
    $passwput1 = mysql_result($passwput,0,0);
    //Àü´Þ ¹ÞÀº Æнº¿öµå¸¦ ¾Ïȣȭ ÇÕ´Ï´Ù.//


    $allyp = mysql_query("select Host,User,Password from user
    where Host='localhost' and User='root' ",$connect );

    //ÇØ´ç Á¶°Ç¿¡ ¸Â´Â Á¤º¸µéÀ» °Ë»ö ÇÕ´Ï´Ù. ¿©±â¼­ À¯Àú¿Í È£½ºÆ® ºÎºÐÀ» º¯¼ö·Î
    ¸¸µé °æ¿ì¸¦ »ý°¢ Çغ¸±â ¹Ù¶ø´Ï´Ù. ÀÌ·¯ÇÑ ¹æ¹ýÀ¸·Î °¢ °Ô½ÃÆÇÀÇ ÀÎÁõÀ» ´Þ¸®
    ÇÒ ¼ö ÀÖ½À´Ï´Ù.//


    $puth = mysql_result($allyp,0,'Host');
    $puti =mysql_result($allyp,0,'User');
    $putp = mysql_result($allyp,0,'Password');
    //µ¥ÀÌÅÍ º£À̽º Äõ¸®¿¡¼­ °¢°¢ÀÇ Á¤º¸¸¦ º¯¼ö¿¡ ÀúÀå ÇÕ´Ï´Ù.//


    if($puth != $host || $puti != $id || $putp != $passwput1 )
    {
      echo("
      <script>
      window.alert('host,id,passw°¡ Ʋ¸³´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
      history.go(-1)
      </script>
      ");
      exit;
    }// ÇØ´ç Àü´Þ ÀÎÀÚ°¡ Çϳª¶óµµ Ʋ¸± °æ¿ì ¿¡·¯ È­¸éÀ» Ãâ·Â ÇÕ´Ï´Ù.//
    else
    {// ´Ù ¸ÂÀ» °æ¿ì ÇØ´ç ÄíÅ°¸¦ ¸¸µì´Ï´Ù. ÀÌ°ÍÀº Àü´Þ ÀÎÀÚ°¡ Çϳª¶óµµ Ʋ¸®¸é
     ÄíÅ°´Â ÀüÇô »ý¼º µÇÁö ¾Ê´Â °ÍÀÔ´Ï´Ù.//

      $userid = md5(uniqid(rand()));
      setcookie("root",$userid,0);


      include('db_func_all.php');
      // Æ÷ÇÔÀº ÄíÅ° º¸´Ù µÚ¿¡ ¿Í¾ß ÇÕ´Ï´Ù.//


      if(!$chanl)
      {
        title_view($page,$connect,$s_db,$userid);
        // ä³ÎÀÌ ¾øÀ» °æ¿ì °æ¸Å °Ô½ÃÆÇ AdminÀ¸·Î À̵¿ ÇÕ´Ï´Ù.//
      }
      else
      {
        file_view($page,$connect,$s_db,$userid);
        // ±× ¹ÛÀÇ °æ¿ì ÀÚ·á½Ç °Ô½ÃÆÇÀ¸·Î À̵¿ ÇÕ´Ï´Ù.//
      }
    }

    ?>
    // ¸¸¾à ÄíÅ°¸¦ ¾ò°í ³­ ÈÄ ´Ù½Ã °Ô½ÃÆÇÀ¸·Î À̵¿ ÇÑ´Ù¸é °Ô½ÃÆÇ ¸ÞÀÎ È­¸é¿¡´Â
    Admin À̶ó´Â Ç¥½Ã°¡ »ý±â°Ô µË´Ï´Ù. ´ÙÀ½Àº ÇÔ¼öµéÀ» ÀÌ¿ëÇÑ °¢ È­¸é Ãâ·Â
    ·çƾ ÆÄÀÏÀ» »ìÆì º¸°Ú½À´Ï´Ù.//

17.4 db_view.php ÆÄÀÏ

ÀÌ ÆÄÀÏÀÇ Á¶°Ç½ÄÀº ÄíÅ°°¡ Á¸Àç ÇÏ´ÂÁö ¿©ºÎ¸¦ ¹¯´Â Á¶°Ç¿¡ µÑ·¯Á® ÀÖ½À´Ï´Ù. ÀÌ°ÍÀº Admin ¿µ¿ª À̹ǷΠ¸¸¾à
´Ù¸¥ ÀÌ°¡ ÀÌ¿µ¿ªÀ¸·Î ¹Ù·Î Á¢±ÙÇÑ´Ù¸é ·Î±×ÀÎ È­¸éÀÌ ¶ã°Í ÀÔ´Ï´Ù. ±×°ÍÀº ÇØ´ç ÄíÅ°ÀÇ Á¸Àç ¿©ºÎ¸¦ È®ÀÎÇÏ´Â
¹æ¹ýÀÔ´Ï´Ù. ÀÌ°ÍÀº º¸¾È»ó ÁÁÀº ¹æ¹ýÀÌ ¾Æ´Õ´Ï´Ù. ¿©·¯ºÐµéÀº ¼Ò½º¸¦ ´Ù½Ã È®ÀÎÇؼ­ ´õ »õ·Î¿î ¹æ¹ýÀ» ÅÃÇϱâ
¹Ù¶ø´Ï´Ù.


    <?php
        
    include('db_func_all.php');
        
    ?>

    <?php

    if($chanl == rootin || !$root)
    {
      logon($file);
    }
    //$chanl ÀÇ °ªÀÌ rootin À̰ųª ÄíÅ°°¡ Á¸Àç ÇÏÁö ¾ÊÀ» °æ¿ì ½ÇÇà µÇ´Â ºÎºÐ ÀÔ´Ï´Ù.//


    if($root)
    {
    // ÄíÅ°°¡ Á¸Àç ÇÒ ¶§ ¾Æ·¡ÀÇ Á¶°ÇµéÀ» °Ë»ö ÇÕ´Ï´Ù.//


      if($chanl == main)
      {
        main($page,$connect,$select,$dbs,$tableput,$root);
      }
      //¸ÞÀÎ È­¸é Ãâ·Â ºÎºÐ ÀÔ´Ï´Ù.//


      if($chanl == create_db)
      {
        create_db1();
      }
      //»õ·Î¿î µ¥ÀÌÅÍ º£À̽º »ý¼º ¶§ ÀÔ·ÂÇÏ´Â È­¸é ÀÔ´Ï´Ù. ¿©±â¿¡ ±×³É HTML Äڵ带
      ³Ö¾î »ç¿ë ÇÏ´Â ¹æ¹ýÀÌ ´õ ÆíÇÒ ¼öµµ ÀÖ½À´Ï´Ù.//


      if($chanl == create_db2)
      {

        mysql_query("create database $dbname",$connect);
        // »õ·Î¿î µ¥ÀÌÅÍ º£À̽º¸¦ ¸¸µì´Ï´Ù. ±×¸®°í ¾Æ·¡ Äڵ带 Ãâ·Â ÇÕ´Ï´Ù.//

        echo("
        <html>
        <body>
        <center>
        <form method=post action=db_view.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>db°¡ ¸¸µé¾î Á³½À´Ï´Ù.</b></font>
        <input type=hidden name=chanl value=main>
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");
      }


      if($chanl == e_field)
      {
      //»õ·Î¿î Å×À̺í Çʵ带 »ý¼º,»èÁ¦ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù.Çʵå Ãß°¡¹× »èÁ¦ ¿©±â¼­ Áß¿äÇÑ°Ç
        ¸¶Áö¸· Çʵå´Â Á¸Àç ÇØ¾ß Å×À̺íÀÌ Á¸Àç ÇÑ´Ù.~!
        default '0' ¿¡¼­ ' 'ÀÇ Ç¥ÇöÀº ÇÏÁö ¾Ê¾Æ¾ß ÇÕ´Ï´Ù.//


        mysql_select_db($dbs,$connect);


        mysql_query("alter table $tn $tct $tablequ" , $connect);
        // $tn(Å×À̺í À̸§) $tct(add ,drop) $tablequ(Çʵå Á¤º¸) ·Î ±¸¼º µÇ¾î alter Äõ¸®¸¦

        ¼öÇà ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù.//

        echo("
        <html>
        <body>
        <center>
        <form method=post action=db_view.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>field¸¦ ¼öÁ¤ Çß½À´Ï´Ù.</b></font>
        <input type=hidden name=chanl value=main>
        <input type=hidden name=dbs value=$dbs>
        <input type=hidden name=select value=field>
        <input type=hidden name=tableput value=$tn>


        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");// ÇʵåÀÇ Äõ¸®¸¦ ¼öÇà ÇÏ°í ³­ÈÄ È®ÀÎ È­¸éÀÇ Ãâ·Â ÀÔ´Ï´Ù.//
      }


      if($chanl == dbdel)
      {
      // ÇØ´ç µ¥ÀÌÅÍ º£À̽º¸¦ »èÁ¦ ÇÏ´Â ·çƾ ÀÔ´Ï´Ù. ÀÌ Äõ¸®´Â ÀÔ·Â ÇÏÀÚ ¸¶ÀÚ ¹Ù·Î
      »èÁ¦ µÇ¹Ç·Î ±×Àü¿¡ Çѹø ´õ È®ÀÎÀ» ¹¯´Â ¹Ú½º¸¦ ¸¸µé¸é »ç¿ëÀÚµéÀÌ ÆíÇÒ °ÍÀÔ´Ï´Ù.//


        mysql_query("drop database $dbs",$connect);
        //ÇØ´ç µ¥ÀÌÅÍ º£À̽º »èÁ¦//


        echo("
        <html>
        <body>
        <center>
        <form method=post action=db_view.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>Db¸¦ »èÁ¦ Çß½À´Ï´Ù.</b></font>
        <input type=hidden name=chanl value=main>
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");
      }


      if($chanl == tabledel)
      {
      // ÇØ´ç Å×À̺íÀ» »èÁ¦ ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù.//

        mysql_select_db($dbs,$connect);
        mysql_query("drop table $tableput",$connect);
        //»èÁ¦ Äõ¸® ÀÔ´Ï´Ù.//
                
        echo("
        <html>
        <body>
        <center>
        <form method=post action=db_view.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>Table¸¦ »èÁ¦ Çß½À´Ï´Ù.</b></font>
        <input type=hidden name=chanl value=main>
        <input type=hidden name=select value=tables>
        <input type=hidden name=dbs value=$dbs>
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");
      }


      if($chanl == title_view)
      {
        title_view($page,$connect,$s_db);
      }
      //°æ¸Å AdminÀÇ ¸ÞÀÎ È­¸éÀ» Ãâ·Â ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù.//


      if($chanl == file_view)
      {
        file_view($page,$connect,$s_db);
      }// ÀÚ·á½Ç °Ô½ÃÆÇÀÇ ¸ÞÀÎ È­¸éÀ» Ãâ·Â ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù.//
      if($chanl == create_title)
      {
        create_title();
      }
      // »õ·Î¿î °æ¸Å °Ô½ÃÆÇÀ» ¸¸µå´Â È­¸é ÀÔ´Ï´Ù.//


      if($chanl == create_file)
      {
        create_file();
      }
      //»õ·Î¿î ÀÚ·á½Ç °Ô½ÃÆÇÀ» ¸¸µå´Â ºÎºÐ ÀÔ´Ï´Ù.//


      if($chanl == create_table)
      {
      // »õ·Î¿î Å×À̺íÀ» ¸¸µé±â À§ÇÑ ÀÔ·Â È­¸é ÀÔ´Ï´Ù.//
        echo("
        <html>
        <title>
        creat_db html
        </title>
        <body bgcolor=black>
        <center>
        <img src=skyt1.jpg border=0>
        <br>
        <form method=post action=db_view.php>
        <input type=hidden name=chanl value=create_table2>
        <input type=hidden name=dbs value=$dbs>
        <table border=0 cellspacing=2 cellpadding=2  width=700 >
        <tr>
        <td bgcolor=#808080 width=74>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>~Table Name</b></font></td>
        <td bgcolor=black width=100>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <input type=text name=tablen size=10 ></font></td>
        </tr>
        <tr>
        <td bgcolor=#808080 width=74>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>query</b></font></td>
        <td bgcolor=black width=100>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <input type=text name=shot size=40></font></td>
        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <input type=submit value=¸¸µé±â>
        </font></td>
        </tr>
        </table>
        </form>
        </center>
        </body>
        </html>
        ");
      }


      if($chanl == del_title)
      {

        mysql_select_db('libchal',$connect);
        mysql_query("drop table $s ",$connect);
        mysql_query("drop table $x ",$connect);
        mysql_select_db('adminp',$connect);
        //°¢°¢ÀÇ °Ô½ÃÆÇ(°æ¸Å , ÀÚ·á½Ç)¿¡¼­ Àü´Þ ¹ÞÀº Å×ÀÌºí ¸íÀ» ÀÌ¿ëÇØ °Ô½ÃÆÇÀ»
        »èÁ¦ ÇÕ´Ï´Ù. ÀÌ ºÎºÐÀº °æ¸Å¿Í ÀÚ·á½Ç ¸ðµÎ ¿©±â¼­ ó¸® ÇÕ´Ï´Ù.//


        if(!$table)
        {
          $table = admin;
          $select = "<input type=hidden name=chanl value=title_view>";
        }
        else
        {
          $select = "<input type=hidden name=chanl value=file_view>";
        }
        mysql_query("delete from $table where mview='$s' ",$connect);
        // Adminp µ¥ÀÌÅÍ º£À̽ºÀÇ ÇØ´ç °Ô½ÃÆÇ Å×ÀÌºí¿¡¼­ °¢°¢ÀÇ °Ô½ÃÆÇ Á¤º¸¸¦ Áö¿ó´Ï´Ù.//


        echo("
        <html>
        <body>
        <center>
        <form method=post action=db_view.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>°Ô½ÃÆÇÀÌ »èÁ¦ µÇ¾ú½À´Ï´Ù.</b></font>
        $select
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");
      }


      if($chanl == create_table2)
      {// Àü´Þ ¹ÞÀº ÀÎÀÚ·Î »õ·Î¿î Å×À̺íÀ» »ý¼º ÇÕ´Ï´Ù.//

        mysql_select_db($dbs,$connect);
        mysql_query("create table $tablen ($shot)",$connect);
        //ÇØ´ç µ¥ÀÌÅÍ º£À̽º¿¡ »õ·Î¿î Å×À̺íÀ» »ý¼º ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù. ¿©±â¼­ $shot´Â
        Å×À̺í Çʵå ÀÎÀÚ ÀÔ´Ï´Ù.//


        echo("
        <html>
        <body>
        <center>
        <form method=post action=db_view.php>
        <font style='font-size:13px;font-style:italic;color:#808080'>
        <b>TableÀÌ ¸¸µé¾î Á³½À´Ï´Ù.</b></font>
        <input type=hidden name=chanl value=main>
        <input type=submit value=È®ÀÎ>
        </form>
        </center>
        </body>
        </html>
        ");
      }


      if($chanl == create_title2)
      {
      //Àü´Þ ¹ÞÀº ÀÎÀÚ·Î »õ·Î¿î °æ¸Å °Ô½ÃÆÇÀ» ¸¸µå´Â ºÎºÐ ÀÔ´Ï´Ù.//


        $s=$ctitle."cry";//Å×À̺í À̸§ ÀÎÀÚ¸¦ Çϳª ´õ ¸¸µì´Ï´Ù.//


        $wdate=date('y-m-d');
        mysql_select_db('adminp',$connect);
        $atitle = mysql_query("select mview from admin where mview='$ctitle'",$connect );
        $atitler = mysql_fetch_array($atitle);
        // Adminp µ¥ÀÌÅÍ º£À̽º¿¡ admin Å×À̺í(°æ¸Å Å×À̺í)¿¡¼­ °°Àº Å×À̺í À̸§ÀÌ
        Á¸Àç ÇÏ´ÂÁö °Ë»ö ÇÕ´Ï´Ù.//


        if($ctitle == $atitler[mview])
        {
        // °°Àº À̸§ÀÇ Å×À̺íÀÌ ÀÖÀ» °æ¿ì Ãâ·Â ÀÔ´Ï´Ù.//
          echo("
          <script>
          window.alert('°°Àº table°¡ ÀÖ½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
          </script>
          ");
          exit;
        }
        else
        {// °°Àº À̸§ÀÇ Å×À̺íÀÌ ¾øÀ» °æ¿ì ÀÔ´Ï´Ù.//

          mysql_query("insert into admin(title,view,sum,wdate,mview)
          values('$title','$s','$page','$wdate','$ctitle')",$connect);
          mysql_select_db('libchal',$connect);
          //admin(°æ¸Å Admin Å×À̺í)¿¡ »õ·Î¿î °æ¸Å °Ô½ÃÆÇÀÇ Á¤º¸¸¦ ÀÔ·Â ÇÕ´Ï´Ù.//

          mysql_query("create table $ctitle (no int(10) NOT NULL default '0'
          auto_increment,name varchar(10),email varchar(25),tel varchar(12),
          passw varchar(20),title varchar(54),content text,edate datetime,
          smoney int(10) unsigned,wdate date,
          sise int(10) not null default '0' ,hit int(10) not null
          default '0',PRIMARY KEY(no))",$connect);
          //ù ¹ø° »õ·Î¿î °æ¸Å Å×À̺íÀ» »ý¼º ÇÕ´Ï´Ù.//


          mysql_query("create table $s (no int(10) NOT NULL default '0' auto_increment,
          name varchar(10),email varchar(25),tel varchar(12),bmoney int(10),
          tnum int(10),passw varchar(20),PRIMARY KEY(no))",$connect);
          //µÎ ¹ø° »õ·Î¿î °æ¸Å Å×À̺íÀ» »ý¼º ÇÕ´Ï´Ù. ¿©±â¼­ $s(µÎ¹ø° Å×À̺í¸í)Àº
          ¾Õ¿¡¼­ »õ·Î¿î À̸§ »ý¼º¿¡¼­ ¸¸µé¾îÁø À̸§ ÀÔ´Ï´Ù.//


          echo("
          <html>
          <body>
          <center>
          <form method=post action=db_view.php>
          <font style='font-size:13px;font-style:italic;color:#808080'>
          <b>°Ô½ÃÆÇÀÌ ¸¸µé¾î Á³½À´Ï´Ù.</b></font>
          <input type=hidden name=chanl value=title_view>
          <input type=submit value=È®ÀÎ>
          </form>
          </center>
          </body>
          </html>
          ");
        }
      }


      if($chanl == create_title3)
      {
      //»õ·Î¿î ÀÚ·á½Ç °Ô½ÃÆÇÀ» »ý¼º ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù.//


        $s=$ctitle."cry";
        // Àü´Þ ¹ÞÀº Å×À̺í À̸§À» ÀÌ¿ëÇØ ¶Ç ´Ù¸¥ Å×À̺í À̸§À» »ý¼º ÇÕ´Ï´Ù.
        ÀÌ°ÍÀº µÎ°³ÀÇ Å×À̺íÀ» ¸¸µé±â À§ÇÔ ÀÔ´Ï´Ù.//


        $wdate=date('y-m-d');
        mysql_select_db('adminp',$connect);
        $atitle = mysql_query("select mview from file where mview='$ctitle'",$connect );
        $atitler = mysql_fetch_array($atitle);
        //¶È °°Àº À̸§ÀÇ Å×À̺íÀÌ Á¸ÀçÇÏ´ÂÁö °Ë»ö ÇÕ´Ï´Ù.//
        if($ctitle == $atitler[mview])
        {
        // °°Àº À̸§ÀÇ Å×À̺íÀÌ Á¸ÀçÇÒ °æ¿ìÀÇ Ãâ·Â ÀÔ´Ï´Ù.//


          echo("
          <script>
          window.alert('°°Àº table°¡ ÀÖ½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä')
          history.go(-1)
          </script>
          ");
          exit;
        }
        else
        {// °°Àº À̸§ÀÇ Å×À̺íÀÌ ¾øÀ» °æ¿ì ÀÔ´Ï´Ù.//


          mysql_query("insert into file(title,view,sum,wdate,mview)
          values('$title','$s','$page','$wdate','$ctitle')",$connect);
          mysql_select_db('libchal',$connect);
          //file(ÀÚ·á½Ç °Ô½ÃÆÇ admin Å×À̺í)¿¡ »õ·Î¿î °Ô½ÃÆÇÀÇ Á¤º¸¸¦ ÀúÀå ÇÕ´Ï´Ù.//


          mysql_query("create table $ctitle (no int(10) NOT NULL default '0' auto_increment,
          name varchar(10),email varchar(25),path varchar(50),passw varchar(20),
          title varchar(54),content text, wdate date,hit int(10) not null
          default '0',PRIMARY KEY(no))",$connect);
          //Àü´Þ ¹ÞÀº ÀÎÀÚ·Î »õ·Î¿î ÀÚ·á½Ç °Ô½ÃÆÇ Å×À̺íÀ» »ý¼º ÇÕ´Ï´Ù. óÀ½ Å×À̺í//


          mysql_query("create table $s (name varchar(10),email varchar(25),
          tnum int(10),wdate date,content text)",$connect);
          //Àü´Þ ¹ÞÀº ÀÎÀÚ¿Í $s(»õ·Î »ý¼ºÇÑ Å×À̺í À̸§)À» ÀÌ¿ëÇؼ­ µÎ ¹ø° Å×À̺íÀ»
          »ý¼º ÇÕ´Ï´Ù.//


          echo("
          <html>
          <body>
          <center>
          <form method=post action=db_view.php>
          <font style='font-size:13px;font-style:italic;color:#808080'>
          <b>°Ô½ÃÆÇÀÌ ¸¸µé¾î Á³½À´Ï´Ù.</b></font>
          <input type=hidden name=chanl value=file_view>
          <input type=submit value=È®ÀÎ>
          </form>
          </center>
          </body>
          </html>
          ");
        }
      }
    }//ÀÌ ÆÄÀÏ Ã³À½ ºÎºÐÀÇ ÄíÅ° Á¶°ÇÀÇ ³¡ ÀÔ´Ï´Ù.//

    ?>


ÀÌ·¸°Ô Çؼ­ ¸ðµç ¼³¸íÀ» Çß½À´Ï´Ù. ÀÌ°ÍÀ» ¹ÙÅÁÀ¸·Î »õ·Î¿î ½ºÅ©¸³Æ®¸¦ ²À Çѹø ¸¸µé¾î º¸±æ ±ÇÇÕ´Ï´Ù. ¾Æ¹«¸®
ÀߵǾî ÀÖ´Â ¿©Å¸ ´Ù¸¥ ¼Ò½º¸¦ º¸´õ¶óµµ Àû¿ëÇÒ ¼ö ¾ø´Ù¸é ±×°ÍÀº ±×¸²ÀÇ ¶±ÀÏ »ÓÀÔ´Ï´Ù. óÀ½ Á¢ÇÏ´Â ºÐµéÀϼö·Ï
²À Çѹø Á÷Á¢ ¸¸µé¾î ºÁ¾ß µË´Ï´Ù.
Çѹø ¸¸µé°í ³­ ÈÄ ¿©·¯ºÐµéÀº ÀÌ·¸°Ô ¸»ÇÒ °ÍÀÔ´Ï´Ù. µÇ´Âµ¥¡¦. ¶ó°í^^;


ÀÚ ±×·³ ÀÌ·¸°Ô ¸¸µé¾îÁø °Ô½ÃÆǵéÀ» ÀÌ¿ëÇؼ­ Top È­¸éÀ» °£´ÜÈ÷ ¸¸µé¾î ºÃ½À´Ï´Ù.  ¾ÆÁÖ °£´ÜÇÑ ÄÚµå ÀÔ´Ï´Ù.
´ÜÁö ¸µÅ©»Ó ÀÔ´Ï´Ù. Top È­¸éÀº ÃֽŠ´º½º ¶óµçÁö °¢°¢ÀÇ °Ô½ÃÆÇ¿¡¼­ Á¦ÀÏ Á¶È¸¼ö°¡ ¸¹Àº ±ÛÀ» º¸¿© ÁشٵçÁö
ÇÏ´Â ¿©·¯ ¾Ë¸²ÀÇ ±ÛµéÀÌ Á¸ÀçÇØ¾ß ÇÕ´Ï´Ù.   ÀÌ°ÍÀº °íÁ¤µÈ ½Ã°¢ÀÔ´Ï´Ù. ¿©·¯ ¹æ¹ýÀ¸·Î ¿©·¯ºÐµéÀÌ TopÈ­¸éÀ»
¸¸µé¾îº¸±â ¹Ù¶ø´Ï´Ù.

ÀÏ´Ü À§ È­¸éÀº Âü°í·Î ÇÏ±æ ¹Ù¶ó¸ç test.phpÆÄÀÏ·Î ÀÛ¼º Çß½À´Ï´Ù.
¾Æ·¡ È­¸é°ú ºñ±³ Çϸ鼭 ½ºÅ©¸³Æ®¸¦ º¸±â ¹Ù¶ø´Ï´Ù. ÀÌ°ÍÀº ¿¹¿¡ ºÒ°úÇϸç Ç÷¡½¬³ª ´ÙÀ̳ª¹Í Äڵ带 »ç¿ëÇؼ­
º¸´Ù ±ò²ûÇÑ TopÈ­¸éÀ» ¸¸µé¾î º¸±â ¹Ù¶ø´Ï´Ù.


    <?php

    include('db_func_all.php');
    mysql_select_db('libchal',$connect);
    $wdate = date('H:i:s');
    $ally = mysql_query("select no,title,hit from cry5  order by hit desc",$connect);
    $ally2 = mysql_query("select no,title,hit from cry12 order by hit desc",$connect );
    $put = mysql_fetch_array($ally);
    $put2 = mysql_fetch_array($ally2);
        
    if($wdate < 7)
    {
      $title = " <img src=moon.gif border=0 align=left>
      ÇÑÂü ÀáÀß ½Ã°£ À̱º¿ä~! ¿ì¸®¸ðµÎ ¹ã»ùÀ»~ ¾å~~ cry´Â ÀáÀÚÀ¯~ ";
    }
    else
    {
     $title = " <img src=sam.gif border=0 align=left>
     ¿­½ÉÈ÷ ½Î¿ö¿ä ´Ùµé~~ ¹¹µçÁö ½Î¿ö¼­ ÀÌ°Ü¿©~~~ ";
    }


    echo("
    <html>
    <title>
    main_view html
    </title>
    <body bgcolor=black>
    <center>
    <img src=skyt1.jpg border=0>
    <br>
    <br>
    <table border=0 cellspacing=2 cellpadding=2 width=700 >
    <tr>
    <th rowspan=5 bgcolor=black width=240><font style='font-size:12px;color:gray'>
    $title</font></th>
    <th bgcolor=black >
    <a href ='m.php?chanl=main_view&f=cry5&f2=cry5cry' >
    <font style='font-size:12px;text-decoration:none;color:blue'>
    <img src=icon.jpg border=0 align=center>cry~ file system ~</font></a></th>
    </tr>
    <tr>
    <td bgcolor=black  align=center>
    <a href ='main_view.php?chanl=main_view&f=cry12&f2=cry12cry' >
    <font style='font-size:13px;text-decoration:none;font-style:italic;color:blue'>
    <img src=icon.jpg border=0 align=center>cry~ °æ¸Å system ~</font></a></td>
    </tr>
    <td bgcolor=black  align=center>
    <a href ='shop.php' >
    <font style='font-size:13px;text-decoration:none;font-style:italic;color:blue'>
    <img src=icon.jpg border=0 align=center>cry¼îÇθô system ~</font></a></td>
    </tr>
    </table>
    ");


    echo("
    <br>
    <table border=0 cellspacing=2 cellpadding=2 width=700 >
    <td bgcolor=black  align=center width=200>
    <font style='font-size:13px;font-style:italic;color:white'>
    <img src=icon.jpg border=0 align=center>Top °æ¸Å</font></td>


    <td bgcolor=black  align=left width=500>
    <a href ='main_view.php?chanl=title&no=$put2[no]&f=cry12&f2=cry12cry' >
    <font style='font-size:13px;text-decoration:none;font-style:italic;color:gray'>
    <strong>$put2[title]</strong></font></a></td>
    <tr>


    <td bgcolor=black  align=center width=200>
    <font style='font-size:13px;font-style:italic;color:white'>
    <img src=icon.jpg border=0 align=center>Top ÀÚ·á</font></td>


    <td bgcolor=black  align=left width=500>
    <a href ='m.php?chanl=title&no=$put[no]&f=cry5&f2=cry5cry' >
    <font style='font-size:13px;text-decoration:none;font-style:italic;color:gray'>
    <strong>$put[title]</strong></font></a></td>
    </tr>
    </table>
    </center>
    </body>
    <html>
    ");

    ?>



ÀÌ·¸°Ô ¸ðµç ¼³¸íÀ» Çß½À´Ï´Ù.
¿©·¯ºÐµé¿¡°Ô º¸´Ù ÁÁÀº ¼Ò½º¿¡ ´Ù¾çÇÑ ¹æ¹ýÀ» º¸¿© µå¸®°í ½Í¾úÁö¸¸ ÇÊÀÚÀÇ °ÔÀ¸¸§ ¶§¹®¿¡ ÀÌÁ¤µµÀÇ ¼öÁØ¿¡¼­
¸Ó¹°·¯¾ß Çß½À´Ï´Ù. ÇÏÁö¸¸ ¿©·¯ºÐµéÀº ÃæºÐÀÌ ÀÌ°ÍÀ» ¹ÙÅÁÀ¸·Î ÀÌ º¸´Ù ´õ ÁÁÀº ½ºÅ©¸³Æ®´Â ÃæºÐÈ÷ ¸¸µé ¼ö
ÀÖÀ» °ÍÀÔ´Ï´Ù.   ¸¸¾à C¿¡ Àͼ÷ÇÏ´Ù¸é ´õ º¹ÀâÇÏ°í ¼º´É ÁÁÀº ½ºÅ©¸³Æ®°¡ ź»ý µÉ °ÍÀÔ´Ï´Ù.
À¥¾ð¾î´Â °¢°¢ÀÇ ÁÖ¾îÁø ȯ°æ°ú Á¶°Ç¿¡ µû¶ó ¹«¾ùÀ» »ç¿ë ÇØ¾ß ÇÒÁö ¼±Åà ÇÏ¸é µÉ °ÍÀÔ´Ï´Ù
PHPµç ASPµç µÑ Áß ÇϳªÀÇ ½ºÅ©¸³Æ®¿¡ Á¤Åë ÇÏ±æ ¹Ù¶ø´Ï´Ù. µÑ ´Ù ½ÀµæÇϸé ÁÁÁö¸¸ Çϳª¸¦ ¸ÕÀú ¾Ë°í ¶Ç ´Ù¸¥
Çϳª¿¡ Á¢±ÙÇÏ´Â ¹æ¹ýÀÌ ´õ ÁÁÀ» °Í °°½À´Ï´Ù.  ±×·³ ´Ùµé ½ºÅ©¸³Æ®¿¡ ¸ÅÁø ÇÏ½Ã±æ ¹Ù¶ó¸ç À̸¸ ÁÙÀÌ°Ú½À´Ï´Ù.

17.5 ¿ª °æ¸Å °Ô½ÃÆÇ ¸¸µé±â

¿ª °æ¸Å °Ô½ÃÆÇÀÇ °æ¿ì Á¦ÀÏ Ã³À½ ¼Ò°³ÇÑ °æ¸Å ¼Ò½º¸¦ Á¶±Ý¸¸ ¼öÁ¤ÇÏ¸é µË´Ï´Ù. ¿©±â¼­ ¿ª °æ¸Å¶õ °æ¸Å¸¦ ¿Ã¸®´Â
»ç¶÷ÀÌ Æ¯Á¤ ¹°°ÇÀ» º¸´Ù ÀûÀº °¡°Ý¿¡ ±¸¸ÅÇÏ´Â °ÍÀ» ¿øÇϹǷΠº¸´Ù ÀûÀº ±Ý¾×À» ÀÔÂûÇÏ´Â »ç¶÷ÀÌ ³«ÂûµÇ´Â °ÍÀÔ
´Ï´Ù.   ±×·¯´Ï ±âÁ¸ÀÇ °æ¸ÅÀÇ ½ºÅ©¸³Æ® ¼Ò½º¿¡¼­ ÀÔÂûÀÚÀÇ ¼øÀ§¸¦ ±Ý¾×ÀÌ ÀÛÀº ¼øÀ¸·Î Á¤·Ä ÇÏ¸é µÇ´Â °ÍÀÔ´Ï´Ù.
È­¸éÀÇ ±¸¼ºÀº °æ¸Å¿Í ´Þ¸® Á¶±Ý ´Ù¸£°Ô ¿©·¯ºÐÀÌ ¹Ù²Ù¾î ÁÖ¸é µË´Ï´Ù. ÀÌ ºÎºÐÀº ÀÚ¼¼ÇÑ ¼³¸íÀÌ ¾ø´õ¶óµµ ¿©±â
±îÁö ÀÐÀ¸½Å ºÐÀº ÃæºÐÈ÷ ÀÌÇØ Çϸ®¶ó »ý°¢ ÇÕ´Ï´Ù. ¸¸¾à ¸ð¸£½Å´Ù¸é °æ¸Å °Ô½ÃÆÇÀÇ ÀÔÂûÀÚ µ¥ÀÌÅÍ º£À̽º Äõ¸®
ºÎºÐÀ» Âü°í Çϼ¼¿ä.

17.6 °£´ÜÇÑ chating È­¸é ¸¸µé±â

ÇØ´ç »çÀÌÆ®¿¡ Á¢¼ÓÀ» ÇÑ »ç¶÷µé ³¢¸® ´ëÈ­¸í  ¾øÀÌ °£´ÜÈ÷ äÆÃÀ» ÁÖ°í ¹ÞÀ» ¼ö ÀÖ´Â ºÎºÐÀÔ´Ï´Ù. ÀÌ°ÍÀº
º¸´Ù ´Ù¾çÇÑ ¹æ¹ýÀ» ÀÌ¿ëÇؼ­ ´ëÈ­¹æÀ» ¸¸µé ¼ö ÀÖ´Â ±âÃÊ ÀÔ´Ï´Ù. ¿ÀÁ÷ php¸¸À» ÀÌ¿ëÇÑ ¹æ¹ýÀ̸ç, ¼­¹öÀÇ
ºÎÇÏ°¡ ÀÖÀ» °¡´É¼ºÀÌ ÀÖ½À´Ï´Ù. Áï, äÆÿ¡ »ç¿ëÇÒ ÆÄÀÏÀ» ¸¸µçÈÄ ÀÌ ÆÄÀÏÀ» ÀÐ¾î µé¿© ´Ù¸¥ »ç¿ëÀÚ°¡
ÀÚ½ÅÀÌ ÀÌ ÆÄÀÏ¿¡ ÀÔ·ÂÇÑ ÆÄÀÏÀ» È®ÀÎ ÇÏ´Â ¹æ¹ýÀÔ´Ï´Ù. 
ÀÌ°ÍÀº °è¼ÓÀûÀ¸·Î ÇØ´ç ÆÄÀÏÀ» Àоî¾ß µÇ¹Ç·Î ¼­¹ö¿¡ ºÎÇÏ°¡ »ý±æ ¼öµµ ÀÖ½À´Ï´Ù. ÇÏÁö¸¸ Á¶±Ý¸¸ ´Ù¸£°Ô
¼öÁ¤ÇÑ´Ù¸é »ó´çÈ÷ ÁÁÀº äÆùæÀ» ¸¸µé ¼ö ÀÖ½À´Ï´Ù.


±×·³ Áö±Ý±îÁö »ý¼º Çß´ø ½ºÅ©¸³Æ®¿¡ Á¶±ÝÀÇ ¼öÁ¤°ú chat.phpÆÄÀÏÀ» ÀÌ¿ëÇÑ °£´ÜÇÑ Ã¤Æøðµå¸¦ ¼³¸í ÇÏ°Ú
½À´Ï´Ù.   ¿ì¼± »ý¼º µÇ´Â À©µµ¿ì µÎ°³¸¦ º¸°Ú½À´Ï´Ù. 

À§ ±×¸². 17-14´Â ÀÔ·ÂÇÑ ±ÛÀ» È®ÀÎ Çϴ â ÀÔ´Ï´Ù. ÀÛÀº À©µµ¿ì Å©±â ÀÌ°í, ¸ð´ÏÅÍ ±¸¼®¿¡ µÎ¸é¼­ ±ÛÀ» º¸¸é
µË´Ï´Ù. ¹°·Ð ÀÔ·ÂÇÑ ±ÛÀº À§ À©µµ¿ì¿¡ »Ñ·ÁÁö¸ç ´Ù¸¥ Á¢¼ÓÀڵ鵵 °°ÀÌ º¸¿© Áý´Ï´Ù.

±×¸².17-15ÀÇ °æ¿ì´Â ±ÛÀ» ÀÔ·Â Çϴ â ÀÔ´Ï´Ù. ÀÌ À©µµ¿ì ¿ª½Ã ÀÛÀ¸¸ç °£´ÜÈ÷ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù. ¸ð´ÏÅÍÀÇ
±¸¼®¿¡ µÎ°í »çÀÌÆ®¸¦ µ¹¾Æ ´Ù´Ï¸é¼­ ÇØ´ç »çÀÌÆ®¿¡ Á¢¼ÓÇÑ »ç¶÷°ú °£´ÜÇÑ Áú¹®À» ÇÒ ¼ö ÀÖ½À´Ï´Ù. -? ºÎºÐÀº
ÀÚ½ÅÀÌ Àü¿¡ ÀÔ·Â Çß´ø ±ÛÀÌ Ãâ·Â µÇ´Â ºÎºÐÀÔ´Ï´Ù. ±×·³ ÀÌ °£´ÜÇÑ Ã¤Æ® ¸ðµåÀÇ ¼Ò½º¸¦ È®ÀÎ ÇÏ°Ú½À´Ï´Ù.


¾Æ·¡ ¼Ò½º ºÎºÐÀ» m.php ÆÄÀÏ¿¡ Ãß°¡ Çؼ­ »ç¿ë ÇÏ¸é µË´Ï´Ù. ÇÊÀÚÀÇ °æ¿ì ¸ÞÀÎ È­¸é¿¡¼­ ÀÚ·á½ÇÀ» Ŭ¸¯Çϸé
äƮ À©µµ¿ì µÎ°³°¡ ¶ßµµ·Ï ±¸¼ºÇß½À´Ï´Ù. ÀÌ°ÍÀº ¿©·¯ºÐµéÀÌ ¿øÇÏ´Â ¹æ¹ýÀ¸·Î ¼öÁ¤ Çؼ­ »ç¿ë ÇÏ½Ã¸é µË´Ï´Ù.



    if($chanl == chat)
    {
      echo("
      <html>
      <body> 
      <center>
      <script>
      window.open('chat.php','send','height=100px width=325px')
      window.open('chat_view.php','send2','height=200px width=325px')
      </script>
      // µÎ°³ÀÇ À©µµ¿ì¸¦ »ý¼º ÇÕ´Ï´Ù.//


      <form method=post action=m.php>
      <font style='font-size:13px;font-style:italic;color:#808080'>
      <b>ÀÚ·á½Ç¿¡¼­ °£´ÜÈ÷ ´ëÈ­¸¦ ÇÒ ¼ö ÀÖ´Â ±â´É ÀÔ´Ï´Ù.</b></font>
      <input type=hidden name=chanl value=main_view>
      <input type=hidden name=f value=$f>
      <input type=hidden name=f2 value=$f2>
      <input type=submit value=È®ÀÎ>
      // ÀÌ ºÎºÐÀº ÀÚ·á½Ç·Î ¸µÅ© µÇ´Â ºÎºÐ ÀÔ´Ï´Ù.//
      </form>
      </center>
      </body>
      </html>
      ");
    }



    ¿©±â¼­ ¹°·Ð ¸ÞÀÎ È­¸é(test.php)ÀÇ ÀÚ·á½Ç ¸µÅ© ºÎºÐÀº ¾Æ·¡¿Í °°½À´Ï´Ù.

    <a href ='m.php?chanl=chat&f=cry5&f2=cry5cry' >



    ±×·³ äÆà ¸ðµåÀÇ ·çƾÀ» ¼öÇà ÇÏ´Â chat.php ÆÄÀÏÀ» »ìÆì º¸°Ú½À´Ï´Ù.
    ±×¸². 17-15À» Âü°í Çϼ¼¿ä.


    <?php
    //filesystem function()
    //chat mod make(cry) date(00.4.17)
    ?>


    <?php

    echo("
    <html>
    <head>
    <SCRIPT>
    function set_focus(){
    document.chat.wdata.focus();
    }</SCRIPT>
    // À§ ºÎºÐÀº ±ÛÀ» ÀÔ·Â ÇÏ´Â ºÎºÐ¿¡ Ä¿¼­¸¦ µÎ±â À§ÇÑ ¼³Á¤ ÀÔ´Ï´Ù.//
    </head>
    <body bgcolor=black onload='set_focus()'>
    // onload ºÎºÐ¿¡ ¡®set_focus()¡¯ ºÎºÐÀ» Ãß°¡ ÇØ¾ß ÇÕ´Ï´Ù.//


    <font style='font-size:13px;font-style:italic;color:#fffff0'>
    ");


    if($s == send)
    {
      echo("
      </font><br>
      ");
      $fp = fopen("/home/ftp/pub/cry.txt" , "w+");
      // À§ Æнº¿¡ ÇØ´ç ÆÄÀÏÀ» ¿±´Ï´Ù. ¿©±â¼­ »ç¿ëÇÑ µð·ºÅ丮´Â ftp µð·ºÅ丮 ÀÔ´Ï´Ù.//


      fwrite($fp , "$wdata");
      // ÀÔ·Â ¹ÞÀº ±ÛÀ» ÇØ´ç ÆÄÀÏ¿¡ ÀúÀå ÇÕ´Ï´Ù.//


      fclose($fp);
      // ÆÄÀÏ Æ÷ÀÎÆ®¸¦ ´Ý½À´Ï´Ù.//


      $open = file("/home/ftp/pub/cry.txt");
      //ÇØ´ç ÆÄÀÏÀÇ ³»¿ëÀ» ¹è¿­·Î ÀúÀå ÇÕ´Ï´Ù.//
    }

    echo("
    </font>
    <form method=post action=chat.php name=chat>
    <input type=hidden name=s value=send>
    <input name=wdata size=40><br>
    <br>
    <font style='font-size:13px;font-style:italic;color:#fffff0'>
    ?       $open[0]
    // ÆÄÀÏÀÇ ³»¿ëÀ» È­¸é¿¡ Ãâ·Â ÇÕ´Ï´Ù.//
    </font>
    </form>
    </body>
    </html>
    ");

    ?>



    ´ÙÀ½Àº chat_view.php ÆÄÀÏÀ» »ìÆì º¸°Ú½À´Ï´Ù.
    ±×¸². 17-14¸¦ Âü°í Çϼ¼¿ä.


    <?php
    //filesystem function()
    //chat mod make(cry) date(00.4.17)
    ?>

    <?php

    $open = file("/home/ftp/pub/cry.txt");
    // ±ÛÀÌ ÀÔ·Â µÇ¾î ÀÖ´Â ÆÄÀÏÀ» ¹è¿­·Î ÀÐ¾î µéÀÔ´Ï´Ù.//


    echo("
    <html>
    <body bgcolor=black>
    <meta http-equiv=/"refresh/" content=/"3 url=http://chat_view.php/">
    // ¸ÞŸ Åױ׸¦ ÀÌ¿ëÇØ  ÇØ´ç ÆÄÀÏÀÇ ³»¿ëÀ» ÁÖ±âÀûÀ¸·Î ÀÐ¾î µéÀÔ´Ï´Ù. ¿©±â¼­´Â
    3Ãʸ¶´Ù ÀÐ¾î µéÀ̵µ·Ï Çß½À´Ï´Ù.//


    <center>
    <img src=skyt1.jpg border=0>
    </center>
    <br>
    <font style='font-size:13px;font-style:italic;color:#fffff0'>
    ");


    echo("
    $open[0]<br>
    // È­¸é¿¡ ÀԷµǾîÁø ±ÛÀ» Ãâ·Â ÇÕ´Ï´Ù.//
    </font>
    </body>
    </html>
    ");

    ?>



¿©±â±îÁö °£´ÜÇÑ Ã¤Æà ¸ðµå¸¦ º¸¿© µå·È½À´Ï´Ù. ÀÌ·¸°Ô °£´ÜÇÑ ¸ðµå´Â ½±°Ô ¸¸µé ¼ö ÀÖ½À´Ï´Ù. ÇÏÁö¸¸ º¸´Ù
Å©°í ´Ù¾çÇÑ ´ëÈ­¹æÀ» ¸¸µé °æ¿ì ¼­¹öÀÇ ºÎÇÏ ºÎºÐÀº ²À »ý°¢ ÇØ¾ß µË´Ï´Ù. ±×·³ À§ ¼Ò½º¸¦ ¹ÙÅÁÀ¸·Î ´Ù¾çÇÑ
´ëÈ­¹æÀ» Á÷Á¢ ¸¸µé¾î º¸±æ ¹Ù¶ø´Ï´Ù.
¸ÎÀ½¸»
        ½Ã°£Àº Á¤¸» »¡¸® Èê·¯ °©´Ï´Ù. ÀλýÀÇ Àý¹ÝÀ» °É¾î¿Â Áö±Ý ¹º°¡ Çغ¸°í ½Í¾úÀ» ¶§ ¹ú½á ÀλýÀÇ Àý¹ÝÀÌ Èê·¯ °¬³ª
        
    »ý°¢Çϸé Á¤¸» °¡½¿ÀÌ ÅÍÁúµí ¿­ ¹Þ½À´Ï´Ù. Áö±Ý°Í ±ÝÀüÀ» À§ÇØ ÀÌ·¯±¸ Àú·¯±¸ ¾ÆÁ÷µµ ±×·¯Áö¸¸.. Á¤¸» ±ÝÀü ¹®Á¦´Â
        
    Áױ⠱îÁö °ÆÁ¤ÀÌ ²÷ÀÌÁú ¾ÊÀ» µí ÇÕ´Ï´Ù. ÁøÁ¤ÇÑ ºÎÀÚ´Â ÀڱⰡ ¹º°¡¸¦ ÇßÀ» ¶§ ¶ó±¸ »ý°¢ÇÏÁö¸¸ ±×°Ç ¹èºÎ¸¥
        
    »ç¶÷µéÀÌ ÇÏ´Â ¼Ò¸® °°½À´Ï´Ù.
        
    ÇÏ·ç ÇÏ·ç ¿­½ÉÈ÷ »ýÈ° ÇϽô ¿ì¸® ¾î¸Ó´Ô°ú ¿©·¯ºÐµéÀÇ ºÎ¸ð´ÔÀ» »ý°¢Çϸé ÀÌ ¸ðµç°Ô ¹» À§ÇØ Á¸Àç ÇÏ´ÂÁö ´Ù
        
    »Ñ¼ö°í ½Í½À´Ï´Ù.



Apache, Mysql, PHP ÀÔ¹®Çϱâ

Apache, Mysql, PHP ÀÔ¹®Çϱâ

ÀÌÈ«ÀÏ skycry@kldp.org

v, 2000³â 01¿ùºÎÅÍ 05¿ù±îÁö sgml º¯È¯: °íÀºÁ¤ GOWILL@chollian.net 2000³â 9¿ù 20ÀÏ


ÀúÀÛ±Ç : ÀÌ ±ÛÀº ºñ»ó¾÷ÀûÀ̸ç ÀúÀÚ¿Í Ãâó¸¦ ¸íÈ®È÷ ÇÒ °æ¿ì ¹«´ÜÀ¸·Î º¹Á¦,¹èÆ÷,¼öÁ¤ ÇÒ ¼ö ÀÖ½À´Ï´Ù.
            (´Ü, »ó¾÷ÀûÀÏ °æ¿ì ÀúÀÚÀÇ Çã¶ôÀÌ ÀÖ¾î¾ß ÇÕ´Ï´Ù.)

  • IRC_NIC : skycry, matus, cry
  • Startcraft_ID : skycry, -=skycry=-
  • Quake_ID : skycry
  • Æ÷Æ®¸®½º_ID : skycry
  • ¼Ò¸Þ_ID : skycry
  • ÀÌÇÏ ¸ðµç Åë½Åȸ»ç Mail_ID : skycry
  • ¾ÕÀ¸·ÎÀÇ °èȹ : ¸Þ½ÅÀú ¼ÒÄÏ ¸¸µé±â¿Í À¥¸ÞÀÏ ¿¬µ¿ ¸¸µé±â, ±×¸®°í, ¸ðµÎ °ø°³Çϱâ

ÁÖÀÇ.

Áö±ÝºÎÅÍ ½ÃÀÛÇÒ ¸ðµç ³»¿ëÀº ÀúÀÚÀÇ ³ª¸§´ë·Î »ý°¢À̸ç, ÀÌ·Î ÀÎÇÑ ÇÇÇش åÀÓÁöÁö ¾Ê½À´Ï´Ù. (´Ü, ±ÛÀÇ Àǹ®Á¡Àº ¸ÞÀÏ·Î ¹®ÀÇÇϱ⠹ٶø´Ï´Ù.)

µé¾î°¡±â ¾Õ¼­

±ÛÀÇ ³»¿ëÀº óÀ½ ÀÔ¹®ÇÏ´Â Ãʺ¸ÀÚ¸¦ À§ÁÖ·Î Àú°¡ óÀ½ Á¢ÇßÀ» ¶§ºÎÅÍ ¾Æ¹«°Íµµ ¸ð¸£´Â »óÅ¿¡¼­ ÁýÇÊÇÑ ±ÛÀ̸ç.. ´Ù¼Ò ¹«½Ä ÇÏ°í ¹«Áö¸·ÁöÇÑ ¹æ¹ýµµ ÀÖÀ» °ÍÀ̸ç Àß ¾Ë·ÁÁø ¹æ¹ýµµ ÀÖÀ» °ÍÀÔ´Ï´Ù.    ´ÜÁö ÀÌ ±ÛÀº ¾Æ¹«°Íµµ ¸ð¸£´Â ÀÌ°¡ óÀ½ ÀÔ¹®À» ÇÒ °æ¿ì µµ¿òÀ» ÁÖ±â À§ÇØ ¾²¿© Á³½À´Ï´Ù.

Âü°í·Î¡¦.

ÀÌ ±ÛÀº linux¿¡ ÀÔ¹®ÇÑÁö ¾ó¸¶ µÇÁö ¾È°í, À¥ÇÁ·Î±×·¡¹Ö¿¡ °ü½ÉÀÌ ÀÖÀ¸¸ç °ø°³µÈ ¸ðµç irc¼­¹ö¿¡¼­ °í¼ö¸¦ ã¾Æ µ¹¾Æ ´Ù³æÁö¸¸ Åë ´ë´äÀ» µèÁö ¸øÇÑ ÀÌ, ¶ÇÇÑ ¿©Å¸ Àß ¾Ë·ÁÁø linux¸ðÀÓ °Ô½ÃÆÇ¿¡ Áú¹® ÇßÀ» ¶§ linux´Â À¯¾î¼¿ÇÁ´Ï ¸Ó½Ã±â´Ï¶ó´Â ¸»¸¸ µéÀº »ç¶÷¡¦ ¿©Å¸ Ãʺ¸ÀÚÀÇ ¼³¿òÀ» ¸Ç³¯ ´À³¢´Â ÀÌ ±×¸®°í, ¸ðÃâÆÇ»ç ½ÇÀå´Ô°ú ½ÅÃÌ ·ÎŸ¸®¿¡ À§Ä¡ÇÑ ÇÑ ¼­Á¡ »çÀå´Ô, ¸¶Áö¸·À¸·Î ¾Æµé ÀߵǴ ³¯¸¸ ±â´Ù¸®½Ã´Â ¿ï ¾ö´Ï¿¡°Ô ¹ÙĨ´Ï´Ù.

1. À¥ ¼­¹ö¿Í ÀüÀÚ»ó°Å·¡ÀÇ ´ë·«ÀûÀÎ ¼³¸í

PHP¸¦ Á¢Çϱ⿡ ¾Õ¼­ ÀÌ ÀåÀº À¥ ¼­¹öÀÇ ¿ªÇÒ°ú ¿äÁò ÇÑâ À̽´°¡ µÇ°í ÀÖ´Â ÀüÀÚ»ó°Å·¡¿Í ¼îÇÎ ¸ô¿¡ °üÇØ °£´ÜÈ÷ ¾Ë¾Æ º¸°Ú½À´Ï´Ù.

1.1 À¥ ¼­¹öÀÇ ¿ªÇÒ

¿ùµå¿ÍÀ̵åÀ¥Àº ÀÎÅͳÝÀ» º¸´Ù ´õ ½±°Ô Ç×ÇØ ÇÏ°Ô²û ¹ßÀüµÇ¾î ¿µÈ­³ª Ã¥À» º¸µíÀÌ ¿©·¯ºÐ¿"Ô ´Ù°¡¿Í ÀÖ½À´Ï´Ù.    ¾ÕÀ¸·Îµµ ´õ »ç¿ëÀÚ Áß½ÉÀ¸·Î ¹ßÀüÇÒ °ÍÀÔ´Ï´Ù.    ¿ì¸®°¡ ÀÌ·¸°Ô ¾È¹æ¿¡¼­ À¥ ºê¶ó¿ìÀú·Î º¼ ¼ö ÀÖ´Â °Íµµ À¥ ¼­¹ö°¡ ÀÖ¾î¾ßÁö¸¸ °¡´ÉÇÑ °ÍÀÔ´Ï´Ù.    À¥À» ÀÌ¿ëÇÑ ÀÎÅͳÝÀÇ ´ëÁßÀûÀÎ È®»êÀÌ Ä¿Áü¿¡ µû¶ó À¥ ¼­¹öÀÇ ±â´Éµµ ´Ù¾çÇØÁ® °¬½À´Ï´Ù.    ÇÏÁö¸¸ ¿¾³¯ÀÇ À¥ ¼­¹öÀÇ ¿ªÇÒÀº ÆÄÀÏÀÇ ¼Û¼ö½Å, ÅؽºÆ®ÀÇ ¸µÅ©, °Ô½ÃÆÇ Á¤µµ ¿´½À´Ï´Ù.    Áö±ÝÀº ´ëÈ­¹æ¿¡¼­ºÎÅÍ »óÇ°ÀÇ ¼îÇÎ, ¿À¶ô, ÀüÈ­, °æ¸Å¿¡ À̸£±â±îÁö ±× »ç¿ë ¿ëµµ°¡ ´Ù¾çÇØÁ³½À´Ï´Ù.    ¿ì¸®°¡ Àϻ󿡼­ ÇÏ´ø ¸ðµç ÀÏÀ» À¥»ó¿¡¼­ ÇØ°áÇÏ´Â »óÅ°¡ µÈ °ÍÀÔ´Ï´Ù.    ÀÌ Áß¿¡µµ À¥»ó¿¡¼­ ¼îÇÎÀ» ÇÏ°í ¼±ÅÃÇÑ ¹°°ÇÀ» ÁÖ¹®ÇÏ´Â ¼îÇÎ ¸ô »çÀÌÆ®´Â ¿äÁò µé¾î ÇÑ⠺ΰ¢ ÁßÀÔ´Ï´Ù.    ¾È¹æ¿¡¼­ Ã¥°ú À½¾Ç ¾Ù¹ü, ¿Ê µî ¿øÇÏ´Â °ÍµéÀ» ±¸ÀÔÇÒ ¼ö ÀÖ°í °Ô´Ù°¡ ÀüÀÚ °áÀçµµ °¡´ÉÇØÁø °ÍÀÔ´Ï´Ù.    ÀÌ·¸µí À¥ ¼­¹öÀÇ ¿ªÇÒÀÌ Á¡Á¡ ´õ Ä¿Áö±â ¶§¹®¿¡ ¼­¹öÀÇ ¿î¿µÀÚµéÀº º¸´Ù °­·ÂÇÏ°í ¾ÈÁ¤ÀûÀÎ À¥ ¼­¹ö¸¦ ¼±ÅÃÇÏ°Ô µË´Ï´Ù.    À¥ ¼­¹öÀÇ ¿ªÇÒÀ» °£·«È÷ ±×¸²À¸·Î È®ÀÎÇÏ¸é ´ÙÀ½°ú °°½À´Ï´Ù.

±×¸². 1-1 À¥ ¼­¹ö¿Í Ŭ¶óÀ̾ðÆ® ±×¸². 1-3 ´ÙÁß ¼îÇθô ±×¸². 1-4 ³ó»ê¹° ¼îÇθô ±×¸². 1-5 ÀüÀÚ»ó°Å·¡ À§¿øȸ ±×¸². 1-6 ÀüÀÚ»ó°Å·¡ ÀÚ°ÝÁõ °ü·Ã °ú¸ñ ±×¸². 2-1 Apache °ø½Ä »çÀÌÆ®( http://www.apache.org) ±×¸². 2-2 Çѱ¹ Apache ±×·ì( http://www.apache.kr.net) ±×¸². 2-3 ÄÚ¸¸Ä¡ »çÀÌÆ®( http://www.comanche.org) ±×¸². 2-4 ÄÚ¸¸Ä¡ ¸ÞÀÎ È­¸é ±×¸². 2-4 ÄÚ¸¸Ä¡ ¸ÞÀÎ È­¸é ±×¸². 2-5 Properties configuration1 ±×¸². 2-6 Properties configuration2 ±×¸². 2-7 Edit Element ±×¸². 2-8 À©µµ¿ì¿ë ÄÚ¸¸Ä¡ ±×¸². 2-9 ¸ðµç µµ¸ÞÀÎÀÇ »ç¿ëÁßÀÎ ¼­¹ö ÇöȲ ±×¸². 2-10 Top Developers ±×¸². 2-11 Top Servers ±×¸². 2-12 ¸î ³â°£ À¥ ¼­¹ö »ç¿ë º¯È­ ±×¸². 2-13 PHP °ø½Ä »çÀÌÆ®( http://www.php.net/) ±×¸². 2-14 ZEND °ø½Ä »çÀÌÆ®( http://www.zend.com) ±×¸². 2-15 zend Optimizer ±×¸². 2-16 zend ¿£ÁøÀÇ ¿ªÇÒ ±×¸². 2-17 Mysql °ø½Ä »çÀÌÆ®( http://www.tcx.se/) ±×¸². 2-18 Mysql GUI Tool(Linux) ±×¸². 2-19 À©µµ¿ì¿ë Mysql GUI Tool »çÀÌÆ®( http://www.winmysql.com/) ±×¸². 2-20 À©µµ¿ì¿ë Mysql GUI Tool row È­¸é ±×¸². 2-21 À©µµ¿ì¿ë Mysql GUI Tool µ¥ÀÌÅͺ£À̽º Á¢±Ù È­¸é ±×¸². 2-22 À©µµ¿ì¿ë Mysql GUI Tool query È­¸é ±×¸². 2-23 À©µµ¿ì¿ë Mysql GUI Tool µ¥ÀÌÅͺ£À̽º »ç¿ëÀÚ ±ÇÇÑ ¼³Á¤ È­¸é ±×¸². 2-21 À©µµ¿ì¿ë Mysql GUI Tool µ¥ÀÌÅͺ£À̽º Á¢±Ù È­¸é ±×¸². 3-1 ¾ÆÆÄÄ¡ ÇÁ·Î¼¼¼­ ã±â ±×¸². 3-2 ¾ÆÆÄÄ¡ ÇÁ·Î¼¼¼­ Á¦°Å¿Í È®ÀÎ ±×¸². 3-3 rpmÀ¸·Î ¼³Ä¡µÈ ¾ÆÆÄÄ¡ ã±â ±×¸². 3-4 rpmÀ¸·Î ¼³Ä¡µÈ ¾ÆÆÄÄ¡ Á¦°ÅÇϱ⠱׸².3-5 ¾ÆÆÄÄ¡ ÆÐÅ°Áö Ç®±â ±×¸².3-6 ¾ÆÆÄÄ¡ ÆÐÅ°Áö Ç®¸² È®ÀÎ ±×¸². 3-7 ./configure ½ÇÇà È­¸é ±×¸². 3-8 /src µð·ºÅ丮ÀÇ ./Configure ½ÇÇà È­¸é ±×¸². 3-9 mysql ÆÐÅ°Áö Ç®±â ±×¸². 3-10 mysql ÆÐÅ°Áö Ç®¸² È­¸é ±×¸². 3-11 mc·Î Mysql ¿Å±ä È­¸é ±×¸². 3-12 ./scripts/mysql_install_db ½ÇÇà ±×¸². 3-13 ./scripts/mysql_install_db ½ÇÇà °á°ú È­¸é ±×¸². 3-14 mysql.server ¸ðµå º¯°æ È­¸é ±×¸².3-15 mysql.server ½ÇÇà È­¸é ±×¸². 3-16 mysql passwd º¯°æ È­¸é ±×¸². 3-17 mysql ¼­¹ö Á¢¼Ó È­¸é ±×¸². 3-18 ±âº» µ¥ÀÌÅͺ£À̽º¿Í Å×À̺í È®ÀÎ ±×¸². 3-19 mysql ¼¼ºÎ Á¤º¸ È­¸é ±×¸². 3-20 PHP ÆÐÅ°Áö Ç®±â ¸í·É¾î ±×¸². gd-1 gd ÆÐÅ°Áö Ç®¸² È­¸é ±×¸². gd-2 gd ÄÄÆÄÀÏ È­¸é ±×¸². gd-3 gd¸¦ ÀÓÀÇ µð·ºÅ丮·Î ¿Å±â±â ±×¸². gd-4 phpÀÇ ./configure ½ÇÇà ½Ã Ã¼Å© È­¸é ±×¸². 3- 21 phpÀÇ ./configure ½ÇÇà ½Ã apacheÀÎ½Ä È­¸é ±×¸². 3-22 phpÀÇ ./configure ½ÇÇà ½Ã mysql ÀÎ½Ä È­¸é ±×¸². 3-23 phpÀÇ ./configure ½ÇÇàÀ» ÇÑ ÈÄ ¸¶Áö¸· È­¸é ±×¸². 3-24 ÇØ´ç php µð·ºÅ丮¿¡¼­ make ½ÇÇà ±×¸². 3-25 make ½ÇÇà ÈÄ È­¸é ±×¸². 3-26 ¾ÆÆÄÄ¡ µð·ºÅ丮 /src/modules/php4ÀÇ ³»¿ë ±×¸². 3-27 ConfigurationÆÄÀÏÀÇ ¼öÁ¤ È­¸é ±×¸². 3-28 ./Configure ½ÇÇà°ú make ½ÇÇà ±×¸². 3-29 make ½ÇÇà È­¸é°ú make install ¸í·É È­¸é ±×¸². 3-30 PHP make install °á°ú È­¸é ±×¸². 3-31 ¾ÆÆÄÄ¡ÀÇ httpd.conf ÆÄÀÏ ¼öÁ¤ ±×¸². 3-32 Ŭ¶óÀ̾ðÆ® PC¿¡¼­ Ãʱ⠾ÆÆÄÄ¡ Á¢¼Ó È­¸é ±×¸². 3-33 index.html.en ¼±Åà ȭ¸é ±×¸². 3-34 phpinfo() ÇÔ¼ö ½ÇÇà È­¸é ±×¸². 3-35 PHP.INI ÆÄÀÏ ±×¸². 3-36 Ŭ¶óÀ̾ðÆ®¿¡¼­ º» PHP.INIÀÇ °¢ ¿É¼Ç ºÎºÐ ±×¸². 4-1 Mysql ÀνºÅç È­¸é ±×¸². 4-2 ÀνºÅç È®ÀÎ ±×¸². 4-3 ODBC ÀνºÅç È­¸é ±×¸². 4-4 PHP ÀνºÅç µð·ºÅ丮 È®ÀÎ ±×¸². 4-5 PHP.INI À§Ä¡ È­¸é ±×¸². 4-6 PHP.INI ÆÄÀÏ ±×¸². 4-7 PHP.INI extension Ç׸ñ ±×¸². 4-8 ¾ÆÆÄÄ¡ ÀνºÅç È­¸é ±×¸². 4-9 ¾ÆÆÄÄ¡ »ý¼º µð·ºÅ丮 ±×¸². 4-10 ¾ÆÆÄÄ¡ httpd.conf ÆÄÀÏ ±×¸². 4-11 Zend º¹»çÇÒ À§Ä¡ ±×¸². 4-12 PHP.INI ÆÄÀÏ¿¡ Zend ºÎºÐ Ãß°¡ ±×¸². 6-1 ¼­¹ö ŸÀÔ ¼³Á¤ ±×¸². 6-2 ¼­¹ö ·çÆ® ¼³Á¤ ±×¸².6-3 Lockfile ¼³Á¤ ±×¸².6-4 Pidfile ¼³Á¤ ±×¸².6-5 ScoreBoardFile ¼³Á¤ ±×¸².6-6 ResourceCofig / AccessConfig ¼³Á¤ ±×¸².6-7 Timeout ¼³Á¤ ±×¸². 6-8 KeepAlive ¼³Á¤ ±×¸². 6-9 MaxKeepAliveTimeout ¼³Á¤ ±×¸². 6-10 KeepAliveTimeout ¼³Á¤ ±×¸². 9-11 MinSpareServer , MaxSpareServer ¼³Á¤ ±×¸². 6-12 StartServer ¼³Á¤ ±×¸². 6-13 MaxClients ¼³Á¤ ±×¸². 6-14 MaxRequestsChild ¼³Á¤ ±×¸². 6-15 Listen ¼³Á¤ ±×¸². 6-16 BindAddress ¼³Á¤ ±×¸². 6-17 Dynamic Shared Object (DSO) ¼³Á¤ ±×¸². 6-18 ExtendedStatus ¼³Á¤ ±×¸². 6-19 Port ¼³Á¤ ±×¸². 6-20 User , Group ¼³Á¤ ±×¸². 6-21 ServerAdmin ¼³Á¤ ±×¸². 6-22 ServerName ¼³Á¤ ±×¸². 6-23 DocumentRoot ¼³Á¤ ±×¸². 6-24 Directory ¿É¼Ç ¼³Á¤ ±×¸². 6-25 UserDir ¼³Á¤ ±×¸². 6-26 UserDir ¼³Á¤ ±×¸². 6-27 DirectoryIndex ¼³Á¤ ±×¸². 6-28 AccessFileName ¼³Á¤ ±×¸². 6-29 .htaccess ¼³Á¤ ±×¸². 6-30 CacheNegotiatedDocs ¼³Á¤ ±×¸². 6-31 UseCanonicalName ¼³Á¤ ±×¸². 6-32 TypeConfig ¼³Á¤ ±×¸². 6-33 DefaultType ¼³Á¤ ±×¸². 6-34 mod_mine_magic ¼³Á¤ ±×¸². 6-35 HostnameLookups ¼³Á¤ ±×¸². 9-36 ErrorLog ¼³Á¤ ±×¸². 6-37 LogLevel ¼³Á¤ ±×¸². 6-38 LogFormat ¼³Á¤ ±×¸². 6-39 CustomLog ¼³Á¤ ±×¸². 6-40 agent_log , referrer_log ¼³Á¤ ±×¸². 6-41 single logfile ¼³Á¤ ±×¸². 6-42 ServerSignature ¼³Á¤ ±×¸². 6-43 Alias ¼³Á¤ ±×¸². 6-44 ScriptAlias ¼³Á¤ ±×¸². 6-45 ScriptAlias µð·ºÅ丮 ¼³Á¤ ±×¸². 6-46 Redirect ¼³Á¤ ±×¸². 6-47 IndexOptions ¼³Á¤ ±×¸². 6-48 AddIcon ¼³Á¤ ±×¸². 6-49 DefaultIcon ¼³Á¤ ±×¸². 6-50 AddDescription ¼³Á¤ ±×¸². 6-51 ReadmeName , HeaderName ¼³Á¤ ±×¸². 6-52 IndexIgnore ¼³Á¤ ±×¸². 6-53 AddEncoding ¼³Á¤ ±×¸². 6-54 AddLanguage ¼³Á¤ ±×¸². 6-55 LanguagePriority ¼³Á¤ ±×¸². 6-56 AddType ¼³Á¤ ±×¸². 6-57 AddHandler ¼³Á¤ ±×¸². 6-58 Action ¼³Á¤ ±×¸². 6-59 MetaDir , MetaSuffix ¼³Á¤ ±×¸². 6-60 Customizable error response ¼³Á¤ ±×¸². 6-61 BrowserMatch ¼³Á¤ ±×¸². 6-62 BrowserMatch ¼³Á¤ ±×¸². 6-63 server status , server info reports ¼³Á¤ ±×¸². 6-64 ¹ö±× ÀÌ¿ë ¹æÁö ¼³Á¤ ±×¸². 6-65 Proxy Server ¼³Á¤ ±×¸². 6-66 ProxyVia ¼³Á¤ ±×¸². 6-67 cache ¼³Á¤ ±×¸². 6-68 NameVirtualHost ¼³Á¤ ±×¸². 6-69 VirtualHost ¼³Á¤ ±×¸².7-1 array Ãâ·Â È­¸é ±×¸² 7-2 °´Ã¼ »ý¼ºÀÇ ¿¹ ±×¸² 7-3 °´Ã¼ Ãâ·Â °á°ú ±×¸².7-4 º¯¼ö »ç¿ë¹üÀ§ ¿¹ ±×¸².7-5 º¯¼ö »ç¿ë¹üÀ§ °á°ú ±×¸². 7-6 °¡º¯ º¯¼ö ¿¹ ±×¸².7-7 °¡º¯ º¯¼ö °á°ú ±×¸².7-8 Æû Çü½Ä º¯¼ö ¿¹ ±×¸². 7-9 Æû Çü½Ä º¯¼ö °á°ú ±×¸² 7-10 ȯ°æ º¯¼ö ¿¹ ±×¸².7-11 ȯ°æ º¯¼ö °á°ú ±×¸².7-12 ½Ã°£ º¯¼öÀÇ ¿¹ ±×¸².7-13 ½Ã°£ º¯¼ö °á°ú ±×¸².7-14 ¿¬»êÀÚ ¿¹ 1 ±×¸².7-15 ¿¬»êÀÚ ¿¹1 °á°ú ±×¸².7-16 ¿¬»êÀÚ ¿¹ 2 ±×¸².7-17 ¿¬»êÀÚ ¿¹2 °á°ú ±×¸².7-18 if , elseif , if   else ¹® ¿¹ ±×¸².7-19 if , elseif , if   else ¹® °á°ú ±×¸².7-20 while¹® ¿¹ ±×¸². 7-21 while ¹® °á°ú ±×¸².7-22 do .. while ¹® ¿¹ ±×¸².7-23 do .. while ¹® °á°ú ±×¸².7-24 switch ¹® ¿¹ ±×¸².7-25 switch ¹® °á°ú ±×¸².7-26 for¹® ¿¹ 1 ±×¸².7-27 for¹® ¿¹2 ±×¸². 7-28 for¹® ¿¹ 3 ±×¸².7-29 for¹® ¿¹ 4 ±×¸². 7-30 for¹® °á°ú 1 ±×¸².7-31 for ¹® °á°ú 2 ±×¸². 8-1 abs( )ÀÇ ¿¹ ±×¸².8-2 abs( ) °á°ú ±×¸². 8-141 Acos, Asin, Atan ÇÔ¼ö ¿¹ ±×¸². 8-142 Acos, Asin, Atan ÇÔ¼ö °á°ú ±×¸². 8-143 Atan2 ÇÔ¼ö ¿¹ ±×¸². 8-144 Atan2 ÇÔ¼ö °á°ú ±×¸². 8-145 bindec ÇÔ¼ö ¿¹ ±×¸². 8-146 bindec ÇÔ¼ö °á°ú ±×¸². 8-147 ceil ÇÔ¼ö ¿¹ ±×¸². 8-148 ceil ÇÔ¼ö °á°ú ±×¸². 8-149 Cos, Dechex ÇÔ¼ö ¿¹ ±×¸². 8-150 Cos, Dechex ÇÔ¼ö °á°ú ±×¸². 8-151 Log, Log10 ÇÔ¼ö ¿¹ ±×¸². 8-152 Log, Log10 ÇÔ¼ö °á°ú ±×¸². 8-153 Max, Min ÇÔ¼ö ¿¹ ±×¸². 8-154 Max, Min ÇÔ¼ö °á°ú ±×¸². 8-155 mt_rand, mt_srand ÇÔ¼ö ¿¹ ±×¸². 8-156 mt_rand, mt_srand ÇÔ¼ö ¿¹ ±×¸². 8-157 number_format ÇÔ¼ö ¿¹ ±×¸². 8-158 number_format ÇÔ¼ö °á°ú ±×¸². 8-159 Exp, Floor ÇÔ¼ö ¿¹ ±×¸². 8-160 Exp, Floor ÇÔ¼ö °á°ú ±×¸². 8-161 srand, rand ÇÔ¼ö ¿¹ ±×¸². 8-162 srand, randÇÔ¼ö °á°ú ±×¸². 8-163 Octdec, Pi, Pow ÇÔ¼ö ¿¹ ±×¸². 8-164 Octdec, Pi, PowÇÔ¼ö °á°ú ±×¸². 8-165 round, sin, sqrt ÇÔ¼ö ¿¹ ±×¸². 8-166 round, sin, sqrt ÇÔ¼ö °á°ú ±×¸².8-3 ¼öÇÐ ÇÔ¼ö ¿¹ ±×¸².8-4 ¼öÇÐ ÇÔ¼ö °á°ú ±×¸². 8-5 basename ÇÔ¼ö ¿¹ ±×¸². 8-6 basename ÇÔ¼ö °á°ú ±×¸². 8-167 copy ÇÔ¼ö ¿¹ ±×¸². 8-168 copy ÇÔ¼ö °á°ú ±×¸². 8-169 Unlink ÇÔ¼ö ¿¹ ±×¸². 8-170 Unlink ÇÔ¼ö °á°ú ±×¸². 8-171 dirname ÇÔ¼ö ¿¹ ±×¸². 8-7 diskfreespace( ) ÇÔ¼ö ¿¹ ±×¸². 8-8 diskfreespace( ) ÇÔ¼ö °á°ú ±×¸². 8-173 fgets ¿Í °ü·Ã ÇÔ¼öµé ¿¹ ±×¸². 8-174 fgets ¿Í °ü·Ã ÇÔ¼ö °á°ú ±×¸². 8-175 fgetss ÇÔ¼ö ¿¹ ±×¸². 8-176 fgetss ÇÔ¼ö °á°ú ±×¸². 8-177 file ÇÔ¼ö ¿¹ ±×¸². 8-178 file ÇÔ¼ö °á°ú ±×¸². 8-9 file_exists( ) ÇÔ¼ö ¿¹ ±×¸². 8-10 file_exists( ) ÇÔ¼ö °á°ú ±×¸².8-11 fileatime( ) ÇÔ¼ö ¿¹ ±×¸². 8-12 fileatime( ) ÇÔ¼ö °á°ú ±×¸². 8-13 filectime( ) ÇÔ¼ö ¿¹ ±×¸². 8-14 filectime( ) ÇÔ¼ö °á°ú ±×¸². 8-15 fileinode( ) ÇÔ¼ö ¿¹ ±×¸². 8-16 fileinode( ) ÇÔ¼ö °á°ú ±×¸². 8-17 filemtime( ) ÇÔ¼ö ¿¹ ±×¸². 8-18 filemtime( ) ÇÔ¼ö °á°ú ±×¸². 8-19 fileowner( ) ÇÔ¼ö ¿¹ ±×¸². 8-20 fileowner( ) ÇÔ¼ö °á°ú ±×¸². 8-21 fileperms( ) ÇÔ¼ö ¿¹ ±×¸². 8-22 fileperms( ) ÇÔ¼ö °á°ú ±×¸². 8-23 filesize( ) ÇÔ¼ö ¿¹ ±×¸². 8-24 filepsize( ) ÇÔ¼ö °á°ú ±×¸². 8-25 filetype( ) ÇÔ¼ö ¿¹ ±×¸². 8-26 filetype( ) ÇÔ¼ö °á°ú ±×¸². 8-179 fpassthru ÇÔ¼ö ¿¹ ±×¸². 8-180 fpassthru ÇÔ¼ö °á°ú ±×¸². 8-181 fputs ÇÔ¼ö ¿¹ ±×¸². 8-182 fputs ÇÔ¼ö °á°ú ±×¸². 8-183 fread ÇÔ¼ö ¿¹ ±×¸². 8-184 fread ÇÔ¼ö °á°ú ±×¸². 8-185 ftell ÇÔ¼ö ¿¹ ±×¸². 8-186 ftell ÇÔ¼ö °á°ú ±×¸². 8-187 fwrite ¿Í readfile ÇÔ¼ö ¿¹ ±×¸². 8-188 fwrite ¿Í readfile ÇÔ¼ö °á°ú ±×¸². 8-27 is_dir( ) ÇÔ¼ö ¿¹ ±×¸². 8-28 is_dir( ) ÇÔ¼ö °á°ú ±×¸². 8-29 is_executable( ) ÇÔ¼ö ¿¹ ±×¸². 8-30 is_executable( ) ÇÔ¼ö °á°ú ±×¸². 8-31 is_file( ) ÇÔ¼ö ¿¹ ±×¸². 8-32 is_file( ) ÇÔ¼ö °á°ú ±×¸². 8-33 is_link( ) , symlink( ) ÇÔ¼ö ¿¹ ±×¸². 8-34 is_link( ) , symlink( ) ÇÔ¼ö °á°ú ±×¸². 8-189 is_readable ÇÔ¼ö ¿¹ ±×¸². 8-190 is_readable ÇÔ¼ö °á°ú ±×¸². 8- 192 is_writeable ÇÔ¼ö ¿¹ ±×¸². 8-192 is_writeable ÇÔ¼ö °á°ú ±×¸². 8-35 lstat( ) ÇÔ¼ö ¿¹ ±×¸². 8-36 lstat( ) ÇÔ¼ö °á°ú ±×¸². 8-37 touch( ) ÇÔ¼ö ¿¹ ±×¸². 8-38 touch( ) ÇÔ¼ö °á°ú ±×¸². 8-39 ÆÄÀÏ ½Ã½ºÅÛ ÇÔ¼ö ¿¹ ±×¸². 8-40 ÆÄÀÏ ½Ã½ºÅÛ ÇÔ¼ö °á°ú ±×¸². 8-41 mysql test Å×ÀÌºí »ý¼º ±×¸². 8-42 test Å×ÀÌºí¿¡ Ãß°¡µÈ µ¥ÀÌÅÍ ±×¸². 8-43 mysql_affected_rows( ) ÇÔ¼ö ¿¹ ±×¸². 8-44 mysql_affected_rows( ) ÇÔ¼ö °á°ú ±×¸². 8-45 mysql_fetch_array( ) ÇÔ¼ö ¿¹ ±×¸². 8-46 mysql_fetch_array( ) ÇÔ¼ö °á°ú ±×¸². 8-47 mysql ÇÔ¼ö ¿¹1 ±×¸². 8-48 mysql ÇÔ¼ö ¿¹1 °á°ú ±×¸². 8-49 mysql ÇÔ¼ö ¿¹2 ±×¸². 8-50 mysql ÇÔ¼ö ¿¹2 °á°ú ±×¸². 8-51 base64 ÇÔ¼ö ¿¹ ±×¸². 8-52 base64 ÇÔ¼ö °á°ú ±×¸². 8-53 parse_url( ) ÇÔ¼ö ¿¹ ±×¸². 8-54 parse_url( ) ÇÔ¼ö °á°ú ±×¸². 8-55 urlencode( ) , urldecode( ) ÇÔ¼ö ¿¹ ±×¸². 8-56 urlencode( ) , urldecode( ) ÇÔ¼ö °á°ú ±×¸². 8-57 array( ) ÇÔ¼ö ¿¹ ±×¸². 8-58 array( ) ÇÔ¼ö °á°ú ±×¸². 8-59 array_count_values( ) ÇÔ¼ö ¿¹ ±×¸². 8-60 array_count_values( ) ÇÔ¼ö °á°ú ±×¸². 8-61 array_keys( ) ÇÔ¼ö ¿¹ ±×¸². 8-62 array_keys( ) ÇÔ¼ö °á°ú ±×¸². 8-63 array_merge( ) ÇÔ¼ö ¿¹ ±×¸². 8-64 array_merge( ) ÇÔ¼ö °á°ú ±×¸². 8-65 array_pop( ) ÇÔ¼ö ¿¹ ±×¸². 8-66 array_pop( ) ÇÔ¼ö °á°ú ±×¸². 8-67 array_push( ) ÇÔ¼ö ¿¹ ±×¸². 6-68 array_push( ) ÇÔ¼ö °á°ú ±×¸². 6-69 array_reverse( ) ÇÔ¼ö ¿¹ ±×¸². 6-70 array_reverse( ) ÇÔ¼ö °á°ú ±×¸². 8-71 arrat_shift( ) ÇÔ¼ö ¿¹ ±×¸². 8-72 array_shift( ) ÇÔ¼ö °á°ú ±×¸². 8-73 array_slice( ) ÇÔ¼ö ¿¹ ±×¸². 8-74 array_slice( ) ÇÔ¼ö °á°ú ±×¸². 8-75 array_splice( ) ÇÔ¼ö ¿¹ ±×¸². 8-76 array_splice( ) ÇÔ¼ö °á°ú ±×¸². 8-77 array_unshift( ) ÇÔ¼ö ¿¹ ±×¸². 8-78 array_unshift( ) ÇÔ¼ö °á°ú ±×¸². 8-79 compact( ) ÇÔ¼ö ¿¹ ±×¸². 8-80 compact( ) ÇÔ¼ö °á°ú ±×¸². 8-81 count( ) ÇÔ¼ö ¿¹ ±×¸². 8-82 count( ) ÇÔ¼ö °á°ú ±×¸². 8-83 each( ) ÇÔ¼ö ¿¹ ±×¸². 8-84 each( ) ÇÔ¼ö °á°ú ±×¸². 8-85 end( ) ÇÔ¼ö ¿¹ ±×¸². 8-86 end( ) ÇÔ¼ö °á°ú ±×¸². 8-87 extract( ) ÇÔ¼ö ¿¹ ±×¸². 8-88 extract( ) ÇÔ¼ö °á°ú ±×¸². 8-89 in_array( ) ÇÔ¼ö ¿¹ ±×¸². 8-90 in_array( ) ÇÔ¼ö °á°ú ±×¸². 8-91 key( ) ÇÔ¼ö ¿¹ ±×¸². 8-92 key( ) ÇÔ¼ö °á°ú ±×¸². 8-93 list( ) , ksort( ) ÇÔ¼ö ¿¹ ±×¸². 8-94 list( ) , ksort( ) ÇÔ¼ö °á°ú ±×¸². 8-95 range( ) ÇÔ¼ö ¿¹ ±×¸². 8-96 range( ) ÇÔ¼ö °á°ú ±×¸². 8-97 µð·ºÅ丮 ÇÔ¼ö ¿¹ ±×¸². 8-98 µð·ºÅ丮 ÇÔ¼ö °á°ú ±×¸². 8-99 date( ) ÇÔ¼ö ¿¹ ±×¸². 8-100 date( ) ÇÔ¼ö °á°ú ±×¸². 8-101 getdate( ) ÇÔ¼ö ¿¹ ±×¸². 8-102 getdate( ) ÇÔ¼ö °á°ú ±×¸². 8-103 gettimeofday( ) ÇÔ¼ö ¿¹ ±×¸². 8-104 gettimeofday( ) ÇÔ¼ö °á°ú ±×¸². 8-105 ´Þ·Â ¼Ò½º °á°ú ±×¸². 8-106 stringÇÔ¼ö ¿¹1 ±×¸². 8-107 stringÇÔ¼ö ¿¹1 °á°ú ±×¸². 8-108 stringÇÔ¼ö ¿¹2 °á°ú ±×¸². 8-109 imagecolorallocate( ) ÇÔ¼ö ¿¹ ±×¸². 8-110 imagecolorallocate( ) ÇÔ¼ö °á°ú ±×¸². 8-111 imagerectangle( ) ÇÔ¼ö ¿¹ ±×¸². 8-112 imagerectangle( ) ÇÔ¼ö °á°ú ±×¸². 8-113 imagefilledrectangle( ) ÇÔ¼ö ¿¹ ±×¸². 8-114 imagefilledrectangle( ) ÇÔ¼ö °á°ú ±×¸². 8-115 imagepolygon( ) ÇÔ¼ö ¿¹ ±×¸². 8-116 imagepolygon( ) ÇÔ¼ö °á°ú ±×¸². 8-117 imagefilledpolygon( ) ÇÔ¼ö ¿¹ ±×¸². 8-118 imagefilledpolygon( ) ÇÔ¼ö °á°ú ±×¸². 8-119 imageline( ) ÇÔ¼ö ¿¹ ±×¸². 8-120 imageline( ) ÇÔ¼ö °á°ú ±×¸². 8-121 imagedashedline( )ÇÔ¼ö ¿¹ ±×¸². 8-122 imagedashedline( ) ÇÔ¼ö °á°ú ±×¸². 8-123 imagesetpixel( ) ÇÔ¼ö ¿¹ ±×¸². 8-124 imagesetpixel( ) ÇÔ¼ö °á°ú ±×¸². 8-125 imagestring( ) ÇÔ¼ö ¿¹ ±×¸². 8-126 imagestring( ) ÇÔ¼ö °á°ú ±×¸². 8-127 imagestringup( ) ÇÔ¼ö ¿¹ ±×¸². 8-128 imagestringup( ) ÇÔ¼ö °á°ú ±×¸². 8-129 imagechar( ) ÇÔ¼ö ¿¹ ±×¸². 8-130 imagechar( ) ÇÔ¼ö °á°ú ±×¸². 8-131 imagearc( ) ÇÔ¼ö ¿¹ ±×¸². 8-132 imagearc( ) ÇÔ¼ö °á°ú ±×¸². 8-133 imagefill( ) ÇÔ¼ö ¿¹ ±×¸². 8-134 imagefill( ) ÇÔ¼ö °á°ú ±×¸². 8-135 imagecolortransparent( ) ÇÔ¼ö ¿¹ ±×¸². 8-136 imagecolortransparent( ) ÇÔ¼ö °á°ú ±×¸². 8-137 exec( ) ÇÔ¼ö ¿¹ ±×¸². 8-138 exec( ) ÇÔ¼ö °á°ú ±×¸². 8-139 system( ) ÇÔ¼ö ¿¹ ±×¸². 8-140 system( ) ÇÔ¼ö °á°ú ±×¸².9-1 ÇÊÀÚÀÇ mysql ÀÛ¾÷ ȯ°æ ±×¸². 9-2 mysql Á¢¼ÓÇϱ⠱׸². 9-3 mysql ¹öÀü°ú Áö±Ý ³¯Â¥ ¾Ë¾Æº¸±â ±×¸². 9-4 now( ) ÇÔ¼ö ±×¸². 9-5 show databases ±×¸². 9-6 µ¥ÀÌÅͺ£À̽º ¸¸µé±â ±×¸². 9-7 µ¥ÀÌÅͺ£À̽º È®ÀÎ ±×¸². 9-8 Å×ÀÌºí ¸¸µé±â ±×¸². 9-9 Å×À̺í ÀÚ·áÇü ¾Ë¾Æº¸±â ±×¸². 9-10 works_table.sql ±×¸². 9-11 Å×ÀÌºí¿¡ µ¥ÀÌÅÍ ÀÔ·ÂÇϱâ(ÆÄÀÏ) ±×¸². 9-12 where and ¿¹ 1 ±×¸². 9-13 where and ¿¹ 2 ±×¸². 9-14 where or ¿¹ ±×¸². 9-15 where and, or ¿¹ ±×¸². 9-16 regexp ¿¹ ±×¸². 9-17 order by ¿¹ ±×¸². 9-18 order by DESC ¿¹ ±×¸². 9-19 count( ) ¿¹ ±×¸². 9-20 group by ¿¹ 1 ±×¸². 9-21 group by ¿¹ 2 ±×¸². 9-22 ÇÑ »ç¶÷ÀÌ ¸ÃÀº ÀÏ ¼ö ±×¸². 9-23 Å×ÀÌºí¿¡ Çʵå(¿­) Ãß°¡Çϱ⠱׸². 9-24 Å×À̺íÀÇ Æ¯Á¤ Çʵå(¿­) »èÁ¦Çϱ⠱׸². 9-25 ƯÁ¤ ·¹ÄÚµå »èÁ¦Çϱ⠱׸². 9-26 ƯÁ¤ ·¹ÄÚµå ¼öÁ¤Çϱ⠱׸². 9-27 µ¥ÀÌÅͺ£À̽º º¸±â ±×¸². 9-28 mysql µ¥ÀÌÅͺ£À̽º ³»¿ë ±×¸². 9-29 db Å×ÀÌºí ¼Ó¼º ±×¸². 9-30 db Å×À̺í Äõ¸® (Host,Db,User) ±×¸². 9-31 test µ¥ÀÌÅͺ£À̽º »ç¿ëÀÚ µî·Ï ±×¸². 9-32 db Å×À̺íÀÇ test µ¥ÀÌÅͺ£À̽º »ç¿ëÀÚ Ãß°¡ È®ÀÎ ±×¸². 9-33 user Å×ÀÌºí ¼Ó¼º ±×¸². 9-34 user Å×À̺í Äõ¸®(Host,User,Password) ±×¸². 9-35 user Å×ÀÌºí¿¡ cry »ç¿ëÀÚ µî·Ï ±×¸². 9-36 mysql Ãß°¡ »ç¿ëÀÚ Á¢¼Ó È®ÀÎ ±×¸². 9-37 cry °èÁ¤ µ¥ÀÌÅͺ£À̽º »ç¿ë °¡´É Å×½ºÆ® ±×¸². 9-38 mysqldump ¿¹ ±×¸². 10-1 + * ¿¬»êÀÚ ¿¹ ±×¸². 10-2 / - ¿¬»êÀÚ ¿¹ ±×¸². 10-3 ºñ±³ ¿¬»êÀÚ != ±×¸². 10-4 ºñ±³ ¿¬»êÀÚ >= ±×¸². 10-5 ºñ±³ ¿¬»êÀÚ between ±×¸². 10-6 ºñ±³ ¿¬»êÀÚ in ±×¸². 10-7 MONTHNAME ±×¸². 10-8 QUARTER ±×¸². 10-9 YEAR ±×¸². 10-10 HOUR ±×¸². 10-11 MINUTE ±×¸². 10-12 SECOND ±×¸². 10-13 PERIOD_ADD ±×¸². 10-14 CURDARE ¿¹ 1 ±×¸². 10-15 CURDARE ¿¹ 2 ±×¸². 10-16 CURTIME ¿¹ 1 ±×¸². 10-17 CURTIME ¿¹ 2 ±×¸². 10-18 NOW ¿¹ 1 ±×¸². 10-19 NOW ¿¹ 2 ±×¸². 10-20 UNIX_TIMESTAMP ¿¹ 1 ±×¸². 10-21 UNIX_TIMESTAMP ¿¹ 2 ±×¸². 10-22 FROM_UNIXTIME ¿¹ 1 ±×¸². 10-23 FROM_UNIXTIME ¿¹ 2 ±×¸². 10-24 FROM_UNIXTIME ¿¹ 3 ±×¸². 10-25 DATE_FORMAT ¿¹ 1 ±×¸². 10-26 DATE_FORMAT ¿¹ 2 ±×¸². 10-27 TO_DAYS ¿¹ 1 ±×¸². 10-28 TO_DAYS ¿¹ 2 ±×¸². 10-29 FROM_DAYS ¿¹ 1 ±×¸². 10-30 FROM_DAYS ¿¹ 2 ±×¸². 10-31 DATE_ADD ¿¹ 1 ±×¸². 10-32 DATE_ADD ¿¹ 2 ±×¸². 10-33 DATE_ADD ¿¹ 3 ±×¸². 10-34 DATE_ADD ¿¹ 4 ±×¸². 10-35 DATE_ADD ¿¹ 5 ±×¸².10-36 PERIOD_DIFF ±×¸². 10-37 HEX ±×¸². 10-38 OCT ±×¸². 10-39 BIN ±×¸². 10-40 CONV ¿¹ 1 ±×¸². 10-41 CONV ¿¹ 2 ±×¸². 10-42 ASCII ±×¸². 10-43 FIELD ±×¸². 10-44 LOWER ±×¸². 10-45 UPPER ±×¸². 10-46 LOAD_FILE ±×¸². 10-47 SPACE ±×¸². 10-48 REVERSE ±×¸². 10-49 INSERT ±×¸². 10-50 SUBSTRING_INDEX ±×¸². 10-51 REPEAT ±×¸². 10-52 LTRIM ±×¸². 10-53 RTRIM ±×¸². 10-54 TRIM ¿¹ 1 ±×¸². 10-55 TRIM ¿¹ 2 ±×¸². 10-56 TRIM ¿¹ 3 ±×¸². 10-57 CONCAT ±×¸². 10-58 LEFT ±×¸². 10-59 RIGHT ±×¸². 10-60 LOCATE ±×¸². 10-61 LPAD ±×¸². 10-62 RPAD ±×¸². 10-63 USER ±×¸². 10-64 VERSION ±×¸². 10-65 PASSWORD ±×¸². 11-1 ¸ÞÀÎ È­¸é ±×¸². 11-3 äÆà ¸ðµå ±×¸². 11-4 ÀÚ·á½Ç ±×¸². 11-5 ÀÚ·á ¼³¸í ±×¸². 11-6 ÀÀ´ä ±Û ¿Ã¸®±â ±×¸². 11-7 ÀÚ·á ±Û ¼öÁ¤Çϱ⠱׸². 11-8 ÀÚ·á »èÁ¦ Çϱ⠱׸². 11-9 ÀÚ·á µî·ÏÇϱ⠱׸². 11-10 °æ¸Å °Ô½ÃÆÇ ¸ÞÀÎ È­¸é ±×¸². 11-11 °æ¸Å ¼³¸í º¸±â ±×¸². 11-12 ÀÔÂû Çϱ⠱׸². 11-13 °æ¸Å ¼öÁ¤ Çϱ⠱׸². 11-14 °æ¸Å »èÁ¦ Çϱ⠱׸². 11-15 °æ¸Å ¸¶°¨ ±×¸². 11-16 ÀüÀÚÁ¦Ç° ¸ÞÀÎ È­¸é ±×¸². 11-17 ¹Ù±¸´Ï Ç׸ñ ±×¸². 11-18 »óÇ° ÁÖ¹® Çϱ⠱׸². 11-19 °è»ê¼­ ±×¸². 11-20 admin ·Î±×ÀÎ È­¸é ±×¸². 11-21 ÀÚ·á½Ç admin È­¸é ±×¸². 11-22 »õ·Î¿î ÀÚ·á½Ç »ý¼º ±×¸². 11-23 °æ¸Å admin ¸ÞÀÎ È­¸é ±×¸². 11-24 µ¥ÀÌÅÍ º£À̽º admin ¿µ¿ª ±×¸². 11-25 »õ·Î¿î µ¥ÀÌÅÍ º£À̽º À̸§ ÀԷ¶õ ±×¸². 11-26 Å×À̺í Ç׸ñ ±×¸². 11-27 »õ·Î¿î Å×ÀÌºí »ý¼º È­¸é ±×¸². 11-28 Å×À̺í Çʵå Á¤º¸ ±×¸². 11-29 ¼îÇÎ ¸ô admin ¸ÞÀÎ È­¸é(ÀüÀÚÁ¦Ç°) ±×¸². 11-30 »óÇ° ¼öÁ¤ Çϱ⠱׸². 11-31 »õ »óÇ° µî·Ï Çϱ⠱׸². 11-32 ȸ¿ø °ü¸® admin ¸ÞÀÎ È­¸é ±×¸². 11-33 ȸ¿ø Ãß°¡ ±×¸². 11-34 ȸ¿ø ¼öÁ¤ ±×¸². 12-1 ¸ÞÀÎ È­¸é ±×¸². 12-2 userin.sql ±×¸². 12-3 ȸ¿ø °¡ÀÔ È­¸é ±×¸². 12-4 ¿¡·¯ È­¸é ¿¹ ±×¸². 13-1 ÀÚ·á½Ç ¸ÞÀÎ È­¸é ±×¸². 13-2 filetest.sql ±×¸². 13-3 µî·ÏµÈ ±ÛÀÌ ¾øÀ» °æ¿ì ±×¸². 13-4 ÀÚ·á½Ç ¼öÁ¤ È­¸é ±×¸². 13-5 ƯÁ¤ ÀÚ·á º¸±â È­¸é ±×¸². 13-6 ÀÚ·á µî·Ï ¿¡·¯ È­¸é ±×¸². 13-7 ÀÀ´ä ±Û ÀÔ·ÂÇϱ⠱׸². 13-8 »õ·Î¿î ÀÚ·á µî·ÏÇϱ⠱׸². 13-9 ÆÄÀÏ upload Çϱ⠱׸². 13-10 ÀÚ·á Áö¿ì±â È­¸é ±×¸². 14-1 °æ¸Å °Ô½ÃÆÇ ¸ÞÀÎ È­¸é ±×¸². 14-2 libchaltest.sql ±×¸².14 -3 °æ¸Å ¼öÁ¤ È­¸é ±×¸². 14-4 °æ¸Å ¼¼ºÎ Á¤º¸ º¸±â ±×¸². 14-5 ÀÔÂû È­¸é ±×¸². 14-6 °æ¸Å µî·Ï È­¸é ±×¸². 14-7 °æ¸Å »èÁ¦ È­¸é ±×¸². 14-8 ÀÔÂû »èÁ¦ È­¸é ±×¸². 14-9 °æ¸Å ¸¶°¨ È­¸é ±×¸². 15-1 ¼îÇÎ ¸ô À½¾Ç Ç׸ñ ±×¸². 15-2 shop.sql ±×¸². 15-3 ¹Ù±¸´Ï È­¸é ±×¸². 15-4 »óÇ° ÁÖ¹®Çϱâ È­¸é ±×¸². 15-5 »óÇ° ÁÖ¹® ÇöȲ È­¸é ±×¸². 16-1 adminp.sql ±×¸². 17-1 ±×¸². 17-2 ±×¸². 17-3 ±×¸². 17-4 ±×¸². 17-5 ±×¸². 17-6 ±×¸². 17-7 ±×¸². 17-8 ±×¸². 17-9 ±×¸². 17-10 ±×¸². 17-11 ±×¸². 17-12 ±×¸². 17-13 ±×¸². 17-14 chat_view.php ±×¸². 17-15 chat.php
ID
Password
Join
Be careful how you get yourself involved with persons or situations that can't bear inspection.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2003-08-10 11:52:29
Processing time 0.0212 sec