µù¥U
µn¿ý
º¶
½×¾Âª©³W
¸T¤î¦Cªí
»¡©ú
¦a¹Ï
¼Æ¦ì®Ñ»
¨p¤H®ø®§ (0)
¤½¦@®ø®§ (0)
½×¾Â¥ô°È (0)
¨t²Î®ø®§ (0)
¦n¤Í®ø®§ (0)
©«¤l®ø®§ (0)
³Â»¶®a±Ú°Q½×ª©ª©
»
PHP
»
PHP+MySQL ¤Jªù¹ê§@
» 7-2 PHP»PMySQLªº³sµ²
ªð¦^¦Cªí
¤U¤@¥DÃD
¤W¤@¥DÃD
µo©«
7-2 PHP»PMySQLªº³sµ²
¤p»x
µoµu®ø®§
¥[¬°¦n¤Í
¤p»x
(¤p»x)
·í«eÂ÷½u
´¿¸g¤]¬O¤ô¹q¤u
UID
9
©«¤l
1190
¥DÃD
394
ºëµØ
113
¿n¤À
1747
ª÷¿ú
1747
ÂI¦W
1
§@·~¨t²Î
Vista
³nÅ骩¥»
Office 2003
¾\ŪÅv
200
©Ê§O
¨k
¨Ó¦Û
¥xÆW
¦b½u®É¶¡
490 ¤p®É
µù¥U®É¶¡
2010-5-1
³Ì«áµn¿ý
2024-11-25
¡@¼ÊºÙ:
¤p»x
¡@ÀY»Î:
´¿¸g¤]¬O¤ô¹q¤u
ºÞ²zû
©«¤l
1190
¥DÃD
394
ºëµØ
113
¿n¤À
1747
ÂI¦W
1
§@·~¨t²Î
Vista
³nÅ骩¥»
Office 2003
¾\ŪÅv
200
©Ê§O
¨k
¨Ó¦Û
¥xÆW
µù¥U®É¶¡
2010-5-1
³Ì«áµn¿ý
2024-11-25
1
#
¸õÂà¨ì
»
˧Ǭݩ«
¥´¦L
¦rÅé¤j¤p:
t
T
µoªí©ó 2011-4-20 08:30
|
¥u¬Ý¸Ó§@ªÌ
7-2 PHP»PMySQLªº³sµ²
7-2 PHP»PMySQLªº³sµ²
¤W£¸¸`¯S§O»¡©ú¡Gn¹ï¸ê®Æ®w¦s¨ú¸ê®Æ¥²¶·¥ý¶i¦æ¸ê®Æ®wªº³sµ²ªº°Ê§@¡AYn¦s¨úMySQLªº¸ê®Æ¥ç¤£¨Ò¥~¡An§Q¥ÎPHP¹ïMySQL Server¶i¦æ³sµ²°Ê§@¥i¨Ï¥ÎPHPªºMySQL¸ê®Æ®w¨ç¼Æ¡G¡umysql_connect()¡v©Î¡umysql_pconnect()¡v¨ç¼Æ¡C
mysql_connect() ¨ç¼Æ
resource mysql_connect ( [string server [, string username [, string password [, bool new_link [, int client_flags]]]]])
½Æ»s¥N½X
·í¸ê®Æ®w³sµ²¦¨¥\«h¦^¶Ç³s½uªº½s¸¹¡AY³s½u¥¢±Ñ«h¦^¶Ç0¡]False¡^¡C
mysql_pconnect() ¨ç¼Æ
resource mysql_pconnect ( [string server [, string username [, string password [, int client_flags]]]])
½Æ»s¥N½X
·í¸ê®Æ®w³sµ²¦¨¥\«h¦^¶Ç³s½uªº½s¸¹¡AY³s½u¥¢±Ñ«h¦^¶Ç0¡]False¡^¡C
mysql_close() ¨ç¼Æ
bool mysql_close ( [resource link_identifier])
½Æ»s¥N½X
mysql_connect()¨ç¼Æ¬O¼È®É©Êªº³s½u¡A¨C¦¸³sµ²³£·|¨Ï¸ê®Æ®w²£¥Í¤@Ó·sªº³s½uªÌ¡A©Ò¥H¨C¦¸³sµ²«á¡A·í¤£»Ýn¦¹³s½u®É´N¸Ó¥Î¡umysql _close()¡v¨ç¼ÆÃö³¬³sµ²¡A¤£µM±zªº¸ê®Æ®w©Î¦øªA¾¹t¾á¤Ó«´N·|¥X°ÝÃD¡A¤£¹L¡A·íPHPµ{¦¡°õ¦æ§¹²¦«á¡A«h»P¸ê®Æ®wªº³sµ²·|¦Û°ÊÃö³¬¡A¦]¦¹¥i¤£¥²¦A§Q¥Î¡umysql _close()¡v¨ç¼ÆÃö³¬³sµ²¡C
¼Ó¥D¼ö©«
½×¾Â¤£Åý¸ê¾ú¤ñ¸û²Lªº¤H¤U¸ü¬d¬Ýªþ¥óªº¥Î·N
EXCEL±MÄÝ°Q½×°Ï¦Û§Y¤é°_¤¤¾Ç¥Í¥H¤W·|û¤è
³Â»¶®a±Ú°Q½×°Ï ³q¥Îª©³W
OFFICE °ò¦±Ð¾Ç¼Æ¦ì¤Æ
ATX ¹q·½¨ÑÀ³¾¹¤â°Ê±Ò°Ê(¤£±µ¥D¾÷ªO±Ò°Ê)
¦Ò¼{Ãö³¬½×¾Âºô¯¸
³Â»¶®a±Ú°Q½×°ÏÁô¨pÅv¬Fµ¦»¡©ú
³Â»¶®a±Ú°Q½×°Ï ¸Û¼xª©¥D
¥Ñ½׾ÂÂà¶iªº¤¤¾Ç¥Íµ¥¯Å¥H¤W·|û,½ÐÃöª`!
14-2 ¸ê®Æ®w¹Ï¤ù¦s¨ú
¦¬ÂÃ
¤À¨É
¤ß¦w¡A¥¦w
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!
¤p»x
µoµu®ø®§
¥[¬°¦n¤Í
¤p»x
(¤p»x)
·í«eÂ÷½u
´¿¸g¤]¬O¤ô¹q¤u
UID
9
©«¤l
1190
¥DÃD
394
ºëµØ
113
¿n¤À
1747
ª÷¿ú
1747
ÂI¦W
1
§@·~¨t²Î
Vista
³nÅ骩¥»
Office 2003
¾\ŪÅv
200
©Ê§O
¨k
¨Ó¦Û
¥xÆW
¦b½u®É¶¡
490 ¤p®É
µù¥U®É¶¡
2010-5-1
³Ì«áµn¿ý
2024-11-25
¡@¼ÊºÙ:
¤p»x
¡@ÀY»Î:
´¿¸g¤]¬O¤ô¹q¤u
ºÞ²zû
©«¤l
1190
¥DÃD
394
ºëµØ
113
¿n¤À
1747
ÂI¦W
1
§@·~¨t²Î
Vista
³nÅ骩¥»
Office 2003
¾\ŪÅv
200
©Ê§O
¨k
¨Ó¦Û
¥xÆW
µù¥U®É¶¡
2010-5-1
³Ì«áµn¿ý
2024-11-25
2
#
µoªí©ó 2011-4-20 08:31
|
¥u¬Ý¸Ó§@ªÌ
mysql _pconnect()¨ç¼Æ¬O¿W¥e©Êªº³s½u¡A·í»P¸ê®Æ®w©¹ªðªº¸ê®Æ¤j®É¡A¥i¨Ï¥Î¦¹¨ç¼Æ³sµ²¸ê®Æ®w¡A§Y¨ÏPHPµ{¦¡¤w¸g°õ¦æ§¹²¦¡A¦¹³s½u¨ÌµM¦s¦b¡AY¦¹³s½u¼È®É¨S¦³¥Î¨ì«h³s½u¶i¤J¡u¥ð¯v¡]sleep¡^¡vª¬ºA¡A·í§Ú̦A¦¸¥Hmysql _pconnect()¨ç¼Æ³s½u®É¡A¥i¥Hª½±µ¨Ï¥Î¥ý«e¥Î§¹¶¢¸mªº³s½u¡A¦Ó¤£¥²««Ø¡C
¥»®Ñ½d¨ÒY»Ý»PMySQL Server«Ø¥ß³sµ²¡A¬Ò¨Ï¥Îmysql_connect()¨ç¼Æ¡C
³z¹Lmysql_connect()¨ç¼Æ»PMySQL Server«Ø¥ß³sµ²¡A¦³¥²nªº¤TӰѼơG¡u¥D¾÷¡v¡B¡u±b¸¹¡v»P¡u±K½X¡v¡G
mysql_connect ("¥D¾÷¦WºÙ", "±b¸¹", "±K½X") ;
½Æ»s¥N½X
¨Ò¦p¡G
mysql_connect ("localhost", "root", "12345a") ;
½Æ»s¥N½X
¥D¾÷¦WºÙ¡G·íPHPµ{¦¡»PMySQL Server¬O¦ì©ó¦P¤@³¡¾÷¾¹®É¶ñ¼g¡ulocalhost¡vªí¥Ü¥»¾÷¡AYPHPµ{¦¡»PMySQL Server¤£¦b¦P¤@³¡¾÷¾¹¡A«h¶ñ¤JMySQL Server©Ò¦bªº¾÷¾¹¦ì§}¡]IP¡^¡C
±b¸¹¡G¦³Åvµn¤JMySQL Serverªº¨Ï¥ÎªÌ±b¸¹¡C
±K½X¡G¦³Åvµn¤JMySQL Serverªº¨Ï¥ÎªÌ±K½X¡C
¹ê¨Ò¡G¡]½d¨Òex07_04.php¡^
<?
$userName="root"; //±b¸¹
$password="12345"; //±K½X
$hostName="localHost"; //¥D¾÷(Server)¦WºÙ
//«Ø¥ß¸ê®Æ³sµ²
if (!(@ $link=mysql_connect($hostName, $userName, $password)))
{
printf("<Br> ³sµ²¥D¾÷ %s µo¥Í¿ù»~ <br>", $hostName);
exit();
}
else
{
printf("<Br> ³sµ²¥D¾÷ %s ¦¨¥\ <br>", $hostName);
exit();
}
?>
½Æ»s¥N½X
¤ß¦w¡A¥¦w
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!
TOP
ÀR«ä¦Û¦b :
¡i®É¶¡¦pÆp¥Û¡j®É¶¡¹ï¤@Ó¦³´¼¼zªº¤H¦Ó¨¥¡A´N¦pÆp¥Û¯ë¬Ã¶Q¡F¦ý¹ï·M¤H¨Ó»¡¡A«o¹³¬O¤@§âªd¤g¡A¤@ÂI»ùȤ]¨S¦³¡C
ªð¦^¦Cªí
¤U¤@¥DÃD
¤W¤@¥DÃD
EXCEL±MÄÝ°Q½×°Ï
Excel£¸¯ë°Ï
Excelµ{¦¡°Ï
¶i¶¥À³¥Î±M°Ï
OFFICE ¨t¦C
Word
PowerPoint
Access
Office¤£¤À°Ï
µ{¦¡»y¨¥
VB »P VB.Net
C »P C#
Java »P J#
µ{¦¡³]p¤£¤À°Ï
¸ê®Æ®w
ORACLE
My SQL
MS SQL
ºô¶³]p
ASP »P ASP.NET
PHP
PHP+MySQL ¤Jªù¹ê§@
JavaScript
FLASH / ActionScript
HTM/ HTML/ CSS
ºô¶³]p¤£¤À°Ï
¹q¸£»P§@·~¨t²Î
¹q¸£¦UºØµwÅé°Q½×
¤@¯ë¹q¸£³nÅé°Q½×
½×¾Â¨Æ°È
ºÞ²z¤½§i
§ë¶D¤Ï¬M
·s¤â´ú¸Õ
·R ¡E ¥Í¬¡
¤½¯q§G§iÄæ
¥Í¬¡»P·P°Ê
[¦¬Âæ¹¥DÃD]
[Ãöª`¦¹¥DÃDªº·s¦^´_]
[³q¹L QQ¡BMSN ¤À¨Éµ¹ªB¤Í]
¥Ó½Ð¤Í±¡Ãì±µ
Facebook¯»µ·