Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

3.2.5 PHPÀà³£Á¿µÄ¾ÖÏÞ

    Èç¹ûÀà³£Á¿ÄÜÍêÈ«ÌýÃüÓÚÎÒÃÇ(do our bidding)»¹ÊÇÏ൱²»´íµÄ£¬µ«ÊÇÆ䲻ѱ֮´¦»¹ÊÇÔçÔçµØ±©Â¶³öÀ´ÁË¡£Àà³£Á¿µÄÖµÖ»ÄÜÔÚ¶¨ÒåʱÉèÖ㬲¢ÇÒ²»ÄÜÔÚÀàµÄ·½·¨Öж¨Òå¡£³£Á¿Ö»Äܱ»³õÉè³ÉÆÕֵͨ(plain value)²»Äܱ»ÉèÖóɶÔÏó¡£ÉõÖÁÔÚ¶¨ÒåÀà³£Á¿Ê±£¬²»ÄÜʹÓÃ×Ö·ûÁ¬½Ó¡£
    ÕýÈçÇ°ÃæÌáµ½µÄ£¬²»Äܸı䳣Á¿µÄÖµ£¬¼´Ê¹ÄãÔÚ²âÊÔµÄʱºòÏ£ÍûÈç´ËÒ²²»ÐС£ÄÇôÎÒÃǸÃÔõô°ìÄØ£¿
    ʹÓÃÀà±äÁ¿À´Ìæ´úÀà³£Á¿
    ×î¼òµ¥ÇÒÏÔ¶øÒ×¼ûµÄ·½·¨ÊÇÓÃÀà±äÁ¿À´´úÌæÀà³£Á¿£¬±È½ÏµäÐ͵ÄÊÇpublicÀàÐ͵ġ£ÒòΪ±äÁ¿¿ÉÒÔÔÚ¶¨ÒåÖ®ºó±»¸Ä±ä£¬ÎÒÃÇ¿ÉÒÔÔÚmethodÖиøËü¸³Öµ£¬¾Í¿ÉÒ԰ѶÔÏ󸳸ø±äÁ¿£¬Ò²ÄÜÔÚ¸³ÖµÇ°ÏÈÍê³ÉÈô¸ÉÎÒÃÇÐèÒªµÄ´¦Àí¡£²»¹ýʵÏÖÆðÀ´ÐèҪһЩС¼¼ÇÉ¡£Èç¹ûÔÚ¹¹Ô캯ÊýÖÐÀ´ÊµÏÖ£¬ÄÇôÔÚÓжÔÏó֮ǰ£¬Õâ¸ö±äÁ¿ÊDz»Äܱ»Ê¹Óõģ¨ÒòΪËü»¹Ã»ÓÐÖµ£©£¬µ±È»ÎÒÃÇ¿ÉÒÔÔÚÀàÉùÃ÷Ö®ºó£¬ÂíÉÏŪ³öÒ»¸ö¶ÔÏóÀ´²¹¾È¡£»¹ÓÐÒ»¸ö°ì·¨£¬¾ÍÊǶ¨ÒåÒ»¸öÀà·½·¨À´³õʼ»¯Àà±äÁ¿¡£¼ÙÉèÎÒÃÇÓõ½¶þ¸ömysqlÊý¾Ý¿ârbacºÍcms£¬
class Connections {
    public static $RBAC;
    public static $CMS;
    public static function init() {                 //ÒëÕß×¢Ô­ÎÄ´Ë´¦Ã»ÓÐstatic
        self::$RBAC =
            new mysqli('localhost','user','password','rbac');  //ÒëÕß×¢£º´Ë´¦±äÁ¿Àï´æ·ÅÁ˶ÔÏó
        self::$CMS =
            new mysqli('localhost','user','password','cms');
    }
}
Connections::init();
     ¾¡¹ÜÕâ¶Î´úÂë¿´ÉÏÈ¥±È½Ï³óªÇÒ±¿×¾£¬µ«ÊÇËüµÄÈ·ÄÜÓ᣶øÇÒÎÒÃÇ»¹ÄܽøÒ»²½°Ñ±äÁ¿ÉèΪ˽Óеģ¬²¢¼ÓÉϾ²Ì¬·ÃÎʵķ½·¨¡£
public static function getRbac() { return self::$RBAC; }
public static function getCms() { return self::$CMS; }
Ó÷½·¨´úÌæ³£Á¿
Ò»¸öÖ»¶ÁµÄÀà·½·¨Ò²ÐíÊdz£Á¿µÄºÜºÃµÄÒ»¸öÌæ´úÆ·¡£¶øÇÒËüÃÇ¿ÉÒÔ±»Ð´µÃ¼¸ºõһģһÑù£¬¾ÍÏóÓÃPerson::DBTABLE()È¥Ìæ»»Person::DBTABLE£º
public static function D


Ïà¹ØÎĵµ£º

PHPʹÓÃÊý¾Ý¿âÓÀ¾ÃÁ¬½Ó·½Ê½²Ù×÷MySQLµÄÊÇÓë·Ç

PHP³ÌÐòÔ±Ó¦¸Ã¶¼ÖªµÀÁ¬½ÓMySQLÊý¾Ý¿â¿ÉÒÔʹÓÃmysql_pconnect£¨ÓÀ¾ÃÁ¬½Ó£©º¯Êý£¬Ê¹ÓÃÊý¾Ý¿âÓÀ¾ÃÁ¬½Ó¿ÉÒÔÌá¸ßЧÂÊ£¬µ«ÊÇʵ¼ÊÓ¦ÓÃÖÐÊý¾Ý¿âÓÀ¾ÃÁ¬½ÓÍùÍù»áµ¼Ö³öÏÖһЩÎÊÌ⣬ͨ³£µÄ±íÏÖ¾ÍÊÇÔÚ´ó·ÃÎÊÁ¿µÄÍøÕ¾ÉÏʱ³£·¢Éú¶Ï¶ÏÐøÐøµÄÎÞ·¨Á¬½ÓÊý¾Ý¿âµÄÇé¿ö£¬³öÏÖÀàËÆ£¢Too many connections in ...£¢µÄ´íÎóÌáʾÐÅÏ¢£¬ÖØÐÂÆô¶¯·þÎñÆ÷Ó ......

CentOS5 Ï°²×°Apache2+PHP5+MySQL

°²×°apache
# tar -zvxf httpd-2.2.14.tar.gz
# cd httpd-2.2.14
# ./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite
# make
# make install
°²×°MySQL
#yum -y install mysql-server
#yum -y install mysql-devel
°²×° jpeg7
½¨Á¢Ä¿Â¼£º
# mkdir -p /usr/local/jpeg7
# mkdir -p /usr/l ......

windowsϺÍlinuxÏÂPHPÖ§³Öoracle

windowsÏÂ:
1.ÏÂÔØÓÃÓÚ Windows µÄ Instant Client Basic ³ÌÐò°ü:http://download.oracle.com/otn/nt/instantclient/111070/instantclient-basic-win32-11.1.0.7.0.zip
2.½âѹËõ
´´½¨Ò»¸ö×ÓĿ¼£¨ÀýÈ磬d:\oci£©£¬È»ºó´ÓѹËõÎļþÖи´ÖÆÒÔÏ¿⣺
oraociei10.dll
orannzsbb10.dll
oci.dll
µ½´ËĿ¼ÏÂ
´ò¿ªPHP.ini ......

PHPÍæתMySQLÖ®Íâ¼üÔ¼Êø ÄÏÈý·½

ÔÚ±¾ÎÄÖУ¬ÎÒÃǽ«Ñ§Ï°ÈçºÎͨ¹ýPHP 5µÄÒ»¸ö»ù±¾³éÏóÀàʹÓÃÍâ¼üÔ¼ÊøÀ´¸üÐÂÁ½¸öInnoDB±íµÄÊý¾Ý¡£ ÎÒÃǽ«Í¨¹ý¾ßÌåʾÀýÀ´ËµÃ÷ÈçºÎͨ¹ý·þÎñÆ÷¶Ë½Å±¾ÓïÑÔÀ´Ê¹ÓÃÍâ¼üÔ¼Êø¡£
¡¡¡¡Ò»¡¢ÀûÓÃÍâ¼üÔ¼Êø¸üÐÂMySQLÖеÄÊý¾Ý
¡¡¡¡ÏÖÔÚ£¬×îÁ÷ÐеĿªÔ´¹ØϵÐÍÊý¾Ý¿â¹ÜÀíϵͳ·ÇMySQLĪÊô£¬¶øMySQLÓÖÖ§³Ö¶à¸ö´æ´¢ÒýÇ棬ÆäÖÐĬÈϵÄÒ²ÊÇËٶȽϿìµÄ´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ