apacheÖÐphpÁ¬½ÓÔ¶³ÌÊý¾Ý¿â·þÎñÆ÷µÄÎÊÌâ
ÎÊÌâÃèÊö£ºÒ»¸öÁ¬½ÓÔ¶³ÌÊý¾Ý¿âµÄPHP½Å±¾testdb.php£¬ÔÚä¯ÀÀÆ÷ÖÐÔËÐУºhttp://localhost/testdb.php£¬³öÏÖ´íÎó£ºCan't connect to MySQL server on '10.60.56.220' (13)£¬µ«ÊÇÔÚ±¾µØÓÃphpÃüÁîÐÐÔËÐУºphp testdb.php£¬È´Õý³£µØÁ¬ÉÏÁËÊý¾Ý¿â²¢¶Á³öÁËÆäÖеÄÊý¾Ý¡£
Ó¦ÓóÌÐò»·¾³£º±¾µØIP£º10.60.56.90£¬±¾µØµçÄÔÉϰ²×°Apache 2.2.3ºÍphp 5.1.6£¬Ô¶³ÌÊý¾Ý¿â·þÎñÆ÷IP£º10.60.56.220£¬Êý¾Ý¿âÊÇmysql 5.0.45£¬±¾µØÏµÍ³ºÍÔ¶³Ìϵͳ¶¼ÊÇcentos 5.3¡£
½â¾ö·½·¨ÍêÈ«À´×ÔÓÚhttp://www.ehow.com/how_2090983_connect-remote-database-under-selinux.html£¬½â¾ö·½·¨Òì³£¼òµ¥£¬Ö»ÐèÒªÔÚ±¾µØµçÄÔÉÏÔËÐÐÒ»ÌõÃüÁ
setsebool -P httpd_can_network_connect=1
µ±È»£¬ÒªÓÐhttp·þÎñÆ÷ÉϵÄrootȨÏÞ£¬ÒòΪֻÓÐrootÓû§²ÅÄܹÜÀíselinux¡£
¹ØÓÚselinuxµÄÏêϸ֪ʶ£¬²Î¼û
°Ù¶È°Ù¿Æ£ºhttp://baike.baidu.com/view/487687.htm
WIKI£ºhttp://en.wikipedia.org/wiki/Security-Enhanced_Linux
selinux project£ºhttp://selinuxproject.org/page/Main_Page
ÔÚhttp://docs.fedoraproject.org/selinux-managing-confined-services-guide/¿ÉÒÔÏÂÔØµ½selinuxµÄÉèÖÃÎĵµ£¬ÆäÖÐÓÐÒ»ÕÂÊÇרÃŽ²½âapacheµÄÉèÖòÎÊýµÄ£¬³ýÁËapacheÒÔÍ⣬»¹ÓÐftp, mysql, cvs, bind, scp, nfs, sambaµÈµÈһЩ·þÎñµÄ²ÎÊý¡£
Ïà¹ØÎĵµ£º
1¡¢Êý×éµÄÉêÇëºÍʹÓãº
$array=array(array(2,324,34));
echo $array[0][1];
Ö±½ÓÉêÇëʹÓãº
$student[0][0]="ÎÒ";
$student[0][1]="ÊÇ";
$student[1][0]="Ë";
$student[1][1]="ά";
echo $student[1][0];
2¡¢±éÀú£º ......
PHPDocumentÊÇ´ÓÄãµÄÔ´´úÂëµÄ×¢ÊÍÖÐÉú³ÉÎĵµ£¬Òò´ËÔÚ¸øÄãµÄ³ÌÐò×ö×¢Ê͵Ĺý³Ì£¬Ò²¾ÍÊÇÄã±àÖÆÎĵµµÄ¹ý³Ì¡£
¡¡¡¡´ÓÕâÒ»µãÉϽ²£¬PHPdoc´ÙʹÄã񻄿³ÉÁ¼ºÃµÄ±à³Ìϰ¹ß£¬¾¡Á¿Ê¹Óù淶£¬ÇåÎúÎÄ×ÖΪÄãµÄ³ÌÐò×ö×¢ÊÍ£¬Í¬Ê±¶à¶àÉÙÉÙÒ²±ÜÃâÁËʺó±àÖÆÎĵµºÍÎĵµµÄ¸üв»Í¬²½µÄһЩÎÊÌâ¡£
¡¡¡¡ÔÚphpdocumentorÖУ¬×¢ÊÍ·ÖΪÎĵµÐÔ×¢ ......
×î½üÔÚ×öPHPÓëÊý¾Ý¿â½»»¥µÄproject£¬¼±ÓÚÇó³É£¬Ä£·ÂÁËÏÂÀý×ӾͿªÊ¼¶¯ÊÖ£¬½á¹ûÎó°Ñmysql_fetch_arrayд³ÉÁËmysql_fetch_row,囧ÊÂÀ´ÁË£¬·¢ÏÖ·µ»ØµÄÊý×é¾ÓÈ»ÊÇindex=>valueµÄÐÎʽ£¬¶øÃ÷Ã÷¼ÇµÃÊÇfield name=>valueµÄ¹þ£¬²éÊÖ²á²ÅÃ÷°×¡£
1. mysql_fetch_arrayµÄº¯ÊýÔÐÍÊÇ
array mysql_fetch_array ( resour ......
1.PHP×Ö·û´®²Ù×÷³£Óõķ½·¨
php´®Öл¹ÓÐÒ»¸öÌØÊâµÄ»¨À¨ºÅ²Ù×÷·û¡£µ±ÓÃË«ÒýºÅÖ¸¶¨×Ö·û´®Ê±£¬ÆäÖеıäÁ¿»á±»½âÎö¡£ÔÚË«ÒýºÅÖеĴ®ÖÐÈç¹ûÓöµ½$£¬½âÎöÆ÷»á¾¡¿ÉÄÜ¶àµØÈ¡µÃºóÃæµÄ×Ö·ûÒÔ×é³ÉÒ»¸öºÏ·¨µÄ±äÁ¿Ãû£¬Èç¹ûÏë±íʾָ¶¨Ãû×ֵĽáÊø£¬Óû¨À¨ºÅ°Ñ±äÁ¿ÃûÀ¨ÆðÀ´¡£Çë¿´ÒÔÏ´úÂ룺
<?php
$beer = 'heineke ......
¡¡¡¡ËäÈ»PHPÊÇWebÓ¦Óÿª·¢ÖÐ×î¹ã·ºÊ¹ÓõĻ·¾³£¬µ«Ëü»¹ÊÇÒ»¶È±»ÈÏΪÎÞÔµÆóÒµ¼¶¿ª·¢¡£InfoQ×éÖ¯ÁËÒ»¸öÐéÄâ×ù̸С×éÀ´ÌÖÂÛÓïÑÔ/ƽ̨µÄÑݱ估PHPÔÚÆóÒµ»·¾³ÏµÄÊÊÓÃÐÔ¡£
¡¡¡¡Zeev Suraski£¬Zend Technologies¹«Ë¾´´Ê¼ÈË£¬¸Ã¹«Ë¾Ö÷Òª¹Ø×¢PHPµÄ½øÕ¹¡£
¡¡¡¡Rob Nicholson£¬¸ß¼¶¼¼ÊõÑÐÔ±, ÔøÎªIBM±àд¹ý³ÌÐòÉè¼ÆÓïÑÔÔËÐÐʱ¡£
¡¡¡ ......