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

´Ð³×ÀÓ

vopos

À̸ÞÀÏ

vopos@happycgi.com

Á¦¸ñ

[´äº¯] [´äº¯] [´äº¯] Ãʺ¸Àε¥¿ä µµµ¥Ã¼ ¸ð¸£°Ú¾î¿ä--help me
³»¿ë
>÷¿¡ Áú¹®À» Àß ¸øÇÑ°Å °°³×¿ä
>Á˼ÛÇϱ¸¿ä
>
>±×³É ¿¬°áÇϸé Àß µÇ¿ä
>¿¹¸¦ µé¾î ½ÇÇàÈ­ÀÏ¿¡¼­
>$connect = mysql_connect("¼­¹ö¸í", "µðºñ¾ÆÀ̵ð", "Æнº");
>À̸®ÇÏ¸é ¿¡·¯°¡ ¾È³ª´Âµ¥
>
>ÀÎŬ·çµå È­ÀÏ (cgi-bin µð·ºÅ丮¿¡ ÀÖ´Â func.php)------------------------
>
>$mysql_host = `µðºñ¼­¹ö¸í`;
>$mysql_db = `µðºñ¸í`;
>$mysql_id = `¾ÆÀ̵ð`;
>$mysql_pw = `Æнº¿öµå`;
>
>include("cgi-bin/func.php");
>
>function page_count($code,$cookie) {
>Global $pres, $total, $todays, $nows, $since, $DOCUMENT_ROOT;
>$todays = date("Y-m-d");
>
>$connect = mysql_connect($mysql_host, $mysql_id, $mysql_pw);<<
>
>À̸®ÇÏ¸é ½ÇÇàÈ­ÀÏ¿¡¼­ ¾ËÁö¸¦ ¸øÇϳ׿ä?
>ÀÎŬ·çµå¸¦ À߸ø Çؼ­ Àΰ¡¿ä?


¾È³çÇϼ¼¿ä, HappyCGI ÆÀÀÇ voposÀÔ´Ï´Ù.

DB connection ºÎºÐÀÌ functionÀ¸·Î µÇ¾îÀÖ´Â µí Çϳ׿ä. function ³»¿¡¼­ Àü¿ª
º¯¼ö(global variable)¸¦ ¾²·Á¸é global ½ÃÄÑÁà¾ß ÇÕ´Ï´Ù.

global $mysql_host,$mysql_db,$mysql_id,$mysql_pw;
$connect = mysql_connect .....;


ÀÌ°Ô ¾Æ´Ï¶ó¸é ´Ù½Ã ±Û ¿Ã·ÁÁÖ¼¼¿ä, °¨»çÇÕ´Ï´Ù.

- vopos
Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
ÀÌÀü°Ô½Ã±Û ±ÞÇÑÁú¹®...Á¦¹ß... 2001-02-05 09:54:28
´ÙÀ½°Ô½Ã±Û Çѱ۸µ½º2.5¿¡·¯ 2001-02-07 12:19:49