phpstudyproÔõôÅþÁ¬Êý¾Ý¿â
ÔÚ phpstudy pro ÖÐÅþÁ¬Êý¾Ý¿âÐèÒªÒÔÏ°취£ºÆô¶¯ phpmyadmin ²¢Ñ¡ÔñÊý¾Ý¿âÃû³Æ¡£½¨ÉèÓû§£¬ÊÚÓèÈ«¾ÖȨÏÞ¡£²éÕÒÖ÷ЧÀÍÆ÷µØµã¡¢Óû§ÃûºÍÃÜÂ롣ʹÓà mysqli º¯ÊýÔÚ php ´úÂëÖÐÅþÁ¬Êý¾Ý¿â¡£
ÔõÑùÔÚ phpStudy Pro ÖÐÅþÁ¬Êý¾Ý¿â
°ì·¨ 1£º·¿ª phpMyAdmin
Æô¶¯ phpStudy Pro£¬µã»÷¡°¹¤¾ß¡± > ¡°phpMyAdmin¡±¡£
ÔÚ·ºÆðµÄ´°¿ÚÖУ¬Ñ¡ÔñÄúÒªÅþÁ¬µÄÊý¾Ý¿âÃû³Æ¡£
°ì·¨ 2£º½¨ÉèÊý¾Ý¿âÓû§
µã»÷¡°Óû§¡±Ñ¡Ï¡£
ÔÚ¡°Ìí¼ÓÓû§ÕÊ»§¡±²¿·Ö£¬ÊäÈëÐÂÓû§Ãû³ÆºÍÃÜÂë¡£
Ñ¡Ôñ¡°ÍâµØ¡±Ö÷»ú¡£
¹´Ñ¡¡°È«¾Ö¡±¸´Ñ¡¿òÀ´ÊÚÓèÓû§¶ÔËùÓÐÊý¾Ý¿âµÄ»á¼ûȨÏÞ¡£
µã»÷¡°½¨ÉèÓû§¡±°´Å¥¡£
°ì·¨ 3£ºÊÚÓèÓû§È¨ÏÞ
Á¬Ã¦Ñ§Ï°¡°PHPÃâ·ÑѧϰÌõ¼Ç£¨ÉîÈ룩¡±£»
ÔÚ¡°Óû§¡±Ñ¡ÏÖУ¬ÕÒµ½Äú¸Õ½¨ÉèµÄÓû§Ãû¡£
µã»÷¡°±à¼È¨ÏÞ¡±Á´½Ó¡£
ÔÚ¡°Êý¾Ý¿â¡±²¿·Ö£¬¹´Ñ¡ÄúÏ£ÍûÊÚÓèÓû§»á¼ûȨÏÞµÄÊý¾Ý¿âµÄ¸´Ñ¡¿ò¡£
ÔÚ¡°È«¾ÖȨÏÞ¡±²¿·Ö£¬¹´Ñ¡¡°ËùÓÐȨÏÞ¡±¸´Ñ¡¿ò¡£
µã»÷¡°ÉúÑÄ¡±°´Å¥¡£
°ì·¨ 4£ºÉèÖà PHP ÅþÁ¬ÐÅÏ¢
ÔÚ phpMyAdmin ÖУ¬µã»÷¡°Êý¾Ý¿â¡±Ñ¡Ï¡£
´ÓÏÂÀÁбíÖÐÑ¡ÔñÄúµÄÊý¾Ý¿âÃû³Æ¡£
ÔÚ¡°Ö÷ЧÀÍÆ÷¡±²¿·Ö£¬²éÕÒÒÔÏÂÐÅÏ¢£º
µØµã£ºÍ¨³£Îª¡°localhost¡±
Óû§Ãû£ºÄúÔÚ°ì·¨ 2 Öн¨ÉèµÄÓû§
ÃÜÂ룺ÄúÔÚ°ì·¨ 2 ÖÐÉèÖõÄÃÜÂë
°ì·¨ 5£ºÔÚ PHP ´úÂëÖÐÅþÁ¬Êý¾Ý¿â
ÔÚÄúµÄ PHP ´úÂëÖУ¬Ê¹ÓÃÒÔϺ¯ÊýÅþÁ¬µ½Êý¾Ý¿â£º
$mysqli = new mysqli("localhost", "Óû§Ãû", "ÃÜÂë", "Êý¾Ý¿âÃû³Æ");
µÇ¼ºó¸´ÖÆ
ÈôÊÇÅþÁ¬Àֳɣ¬$mysqli ±äÁ¿½«°üÀ¨Ò»¸öÖ¸ÏòÊý¾Ý¿âÅþÁ¬µÄ×ÊÔ´¡£
ÒÔÉϾÍÊÇphpstudyproÔõôÅþÁ¬Êý¾Ý¿âµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡