¿ìËÙÒµÎñͨµÀ

PHP V5ǨÒÆÖ¸ÄÏ

×÷Õß ØýÃû¼¼Êõ À´Ô´ NET±à³Ì ä¯ÀÀ ·¢²¼Ê±¼ä 2012-05-22
" );
?>

Õâ´Î¸Ä¶¯²¢²»´ó¡£Ö»ÊÇÒÆÖÁ PHP V5 Ô¼¶¨¡£ÏÂÒ»²½ÊÇÌí¼Ó¶ÔÀàµÄ·ÃÎÊ¿ØÖÆÒÔÈ·±£ÀàµÄʹÓÃÕßÎÞ·¨Ö±½Ó¶Áд PHP V5ǨÒÆÖ¸ÄÏ - ÁèÖڿƼ¼

¿ìËÙÒµÎñͨµÀ

PHP V5ǨÒÆÖ¸ÄÏ

×÷Õß ØýÃû¼¼Êõ À´Ô´ NET±à³Ì ä¯ÀÀ ·¢²¼Ê±¼ä 2012-05-22
content

ÁèÖڿƼ¼×¨ÒµÌṩ·þÎñÆ÷×âÓᢷþÎñÆ÷Íйܡ¢ÆóÒµÓʾ֡¢ÐéÄâÖ÷»úµÈ·þÎñ£¬¹«Ë¾ÍøÕ¾£ºhttp://www.lingzhong.cn ΪÁ˸ø¹ã´ó¿Í»§Á˽â¸ü¶àµÄ¼¼ÊõÐÅÏ¢£¬±¾¼¼ÊõÎÄÕÂÊÕ¼¯À´Ô´ÓÚÍøÂç,ÁèÖڿƼ¼×ðÖØÎÄÕÂ×÷ÕߵİæȨ£¬Èç¹ûÓÐÉæ¼°ÄãµÄ°æȨÓбØҪɾ³ýÄãµÄÎÄÕ£¬ÇëºÍÎÒÃÇÁªÏHTTP/1.1 401 Access Denied >

  • PHP¸ß¼¶½Ì³Ì(6):PHP Sessions
  • PhotoshopÈëÃÅ:»æÖÆÁ¢ÌåЧ¹û°ÂÔËÎ廷Ч¹ûͼ
  • LinuxϵÄVsftpdÅäÖÃƪ
  • DIVºÍtableÒ³Ãæ²¼¾ÖµÄÇø±ðºÍÁªÏµ
  • ÈçºÎʵÏÖ¶þάÏòÁ¿ - ±à³ÌÈëÃÅÍø
  • ÍøÂçÓªÏú¹«Ë¾ÔÚÔËÓªÖеIJßÂÔ
  • iBATIS 3ÄÚµÄÐÂÌØÐÔ£º½«iBATISÓÃ×÷Ó¦ÓóÌÐòÄÚµÄÒ»Öֳ־ÿò¼Ü - ±à³ÌÈëÃÅÍø
  • Photoshop»æÖƸ߹âË®¾§ÖʸÐË®¾§Æ»¹û
  • Copyright ©1999-2011 ÏÃÃÅÁèÖڿƼ¼ÓÐÏÞ¹«Ë¾ ÏÃÃÅÓÅͨ»¥Áª¿Æ¼¼¿ª·¢ÓÐÏÞ¹«Ë¾ All rights reserved

    µØÖ·(ADD)£ºÏÃÃÅÈí¼þÔ°¶þÆÚÍûº£Â·63ºÅ701E£¨¶«ÄÏÈÚͨÅÔ£© Óʱà(ZIP)£º361008

    µç»°£º0592-5908028 ´«Õ棺0592-5908039 ×ÉѯÐÅÏ䣺web@lingzhong.cn ×ÉѯOICQ£º173723134

    ¡¶ÖлªÈËÃñ¹²ºÍ¹úÔöÖµµçÐÅÒµÎñ¾­ÓªÐí¿ÉÖ¤¡·ÃöB2-20100024  ICP±¸°¸:ÃöICP±¸05037997ºÅ

    items ³ÉÔ±±äÁ¿¡£Õâ´Î¸Ä¶¯ÈçÏÂËùʾ¡£

    Çåµ¥ 3. access2.php5

    <?php
    class Configuration
    {
    ¡¡private PHP V5ǨÒÆÖ¸ÄÏ - ÁèÖڿƼ¼

    ¿ìËÙÒµÎñͨµÀ

    PHP V5ǨÒÆÖ¸ÄÏ

    ×÷Õß ØýÃû¼¼Êõ À´Ô´ NET±à³Ì ä¯ÀÀ ·¢²¼Ê±¼ä 2012-05-22
    content

    ÁèÖڿƼ¼×¨ÒµÌṩ·þÎñÆ÷×âÓᢷþÎñÆ÷Íйܡ¢ÆóÒµÓʾ֡¢ÐéÄâÖ÷»úµÈ·þÎñ£¬¹«Ë¾ÍøÕ¾£ºhttp://www.lingzhong.cn ΪÁ˸ø¹ã´ó¿Í»§Á˽â¸ü¶àµÄ¼¼ÊõÐÅÏ¢£¬±¾¼¼ÊõÎÄÕÂÊÕ¼¯À´Ô´ÓÚÍøÂç,ÁèÖڿƼ¼×ðÖØÎÄÕÂ×÷ÕߵİæȨ£¬Èç¹ûÓÐÉæ¼°ÄãµÄ°æȨÓбØҪɾ³ýÄãµÄÎÄÕ£¬ÇëºÍÎÒÃÇÁªÏµ¡£ÒÔÉÏÐÅÏ¢ÓëÎÄÕÂÕýÎÄÊDz»¿É·Ö¸îµÄÒ»²¿·Ö,Èç¹ûÄúҪתÔر¾ÎÄÕÂ,Çë±£ÁôÒÔÉÏÐÅÏ¢£¬Ð»Ð»!

    Copyright ©1999-2011 ÏÃÃÅÁèÖڿƼ¼ÓÐÏÞ¹«Ë¾ ÏÃÃÅÓÅͨ»¥Áª¿Æ¼¼¿ª·¢ÓÐÏÞ¹«Ë¾ All rights reserved

    µØÖ·(ADD)£ºÏÃÃÅÈí¼þÔ°¶þÆÚÍûº£Â·63ºÅ701E£¨¶«ÄÏÈÚͨÅÔ£© Óʱà(ZIP)£º361008

    µç»°£º0592-5908028 ´«Õ棺0592-5908039 ×ÉѯÐÅÏ䣺web@lingzhong.cn ×ÉѯOICQ£º173723134

    ¡¶ÖлªÈËÃñ¹²ºÍ¹úÔöÖµµçÐÅÒµÎñ¾­ÓªÐí¿ÉÖ¤¡·ÃöB2-20100024  ICP±¸°¸:ÃöICP±¸05037997ºÅ

    items = array();
    ¡¡public function __construct() {
    ¡¡¡¡$this->_items[ ''imgpath'' ] = ''images'';
    ¡¡}
    ¡¡public function get( $key ) {
    ¡¡¡¡return $this->_items[ $key ];
    ¡¡}
    }
    $c = new Configuration();
    echo( $c->get( ''imgpath'' )."\n" );
    ?>

    Èç¹ûÕâ¸ö¶ÔÏóµÄʹÓÃÕ߶¼ÒªÖ±½Ó·ÃÎÊÏîÕóÁУ¬·ÃÎʽ«±»¾Ü¾ø£¬ÒòΪ¸ÃÕóÁб»±ê¼ÇΪ private¡£ÐÒÔ˵ÄÊÇ£¬Ê¹ÓÃÕß·¢ÏÖ get() ·½·¨¿ÉÒÔÌṩ¹ãÊÜ»¶Ó­µÄ¶ÁȡȨÏÞ¡£

    ΪÁË˵Ã÷ÈçºÎʹÓà protected ȨÏÞ£¬ÎÒÐèÒªÁíÒ»¸öÀ࣬¸ÃÀà±ØÐë¼Ì³Ð×Ô Configuration Àà¡£ÎÒ°ÑÄǸöÀà³ÆΪ DBConfiguration£¬²¢¼Ù¶¨¸ÃÀཫ´ÓÊý¾Ý¿âÖжÁÈ¡ÅäÖÃÖµ¡£´ËÉèÖÃÈçÏÂËùʾ¡£

    Çåµ¥ 4. access3.php

    <?php
    class Configuration
    {
    ¡¡protected PHP V5ǨÒÆÖ¸ÄÏ - ÁèÖڿƼ¼

    ¿ìËÙÒµÎñͨµÀ

    PHP V5ǨÒÆÖ¸ÄÏ

    ×÷Õß ØýÃû¼¼Êõ À´Ô´ NET±à³Ì ä¯ÀÀ ·¢²¼Ê±¼ä 2012-05-22
    content

    ÁèÖڿƼ¼×¨ÒµÌṩ·þÎñÆ÷×âÓᢷþÎñÆ÷Íйܡ¢ÆóÒµÓʾ֡¢ÐéÄâÖ÷»úµÈ·þÎñ£¬¹«Ë¾ÍøÕ¾£ºhttp://www.lingzhong.cn ΪÁ˸ø¹ã´ó¿Í»§Á˽â¸ü¶àµÄ¼¼ÊõÐÅÏ¢£¬±¾¼¼ÊõÎÄÕÂÊÕ¼¯À´Ô´ÓÚÍøÂç,ÁèÖڿƼ¼×ðÖØÎÄÕÂ×÷ÕߵİæȨ£¬Èç¹ûÓÐÉæ¼°ÄãµÄ°æȨÓбØҪɾ³ýÄãµÄÎÄÕ£¬ÇëºÍÎÒÃÇÁªÏµ¡£ÒÔÉÏÐÅÏ¢ÓëÎÄÕÂÕýÎÄÊDz»¿É·Ö¸îµÄÒ»²¿·Ö,Èç¹ûÄúҪתÔر¾ÎÄÕÂ,Çë±£ÁôÒÔÉÏÐÅÏ¢£¬Ð»Ð»!

    ·ÖÏíµ½£º ¸ü¶à

    Copyright ©1999-2011 ÏÃÃÅÁèÖڿƼ¼ÓÐÏÞ¹«Ë¾ ÏÃÃÅÓÅͨ»¥Áª¿Æ¼¼¿ª·¢ÓÐÏÞ¹«Ë¾ All rights reserved

    µØÖ·(ADD)£ºÏÃÃÅÈí¼þÔ°¶þÆÚÍûº£Â·63ºÅ701E£¨¶«ÄÏÈÚͨÅÔ£© Óʱà(ZIP)£º361008

    µç»°£º0592-5908028 ´«Õ棺0592-5908039 ×ÉѯÐÅÏ䣺web@lingzhong.cn ×ÉѯOICQ£º173723134

    ¡¶ÖлªÈËÃñ¹²ºÍ¹úÔöÖµµçÐÅÒµÎñ¾­ÓªÐí¿ÉÖ¤¡·ÃöB2-20100024  ICP±¸°¸:ÃöICP±¸05037997ºÅ

    items = array();
    ¡¡public function __construct() {
    ¡¡¡¡$this->load();
    ¡¡}
    ¡¡protected function load() { }
    ¡¡public function get( $key ) {
    ¡¡¡¡return $this->_items[ $key ];
    ¡¡}
    }
    class DBConfiguration extends Configuration
    {
    ¡¡protected function load() {
    ¡¡¡¡$this->_items[ ''imgpath'' ] = ''images'';
    ¡¡}
    }
    $c = new DBConfiguration();
    echo( $c->get( ''imgpath'' )."\n" );
    ?>

    ÕâÕÅÇåµ¥ÏÔʾÁË protected ¹Ø¼ü×ÖµÄÕýÈ·Ó÷¨¡£»ùÀඨÒåÁËÃûΪ load() µÄ·½·¨¡£´ËÀàµÄ×ÓÀཫ¸²¸Ç load() ·½·¨°ÑÊý¾ÝÌí¼Óµ½ items ±íÖС£load() ·½·¨¶ÔÀ༰Æä×ÓÀàÊÇÄÚ²¿·½·¨£¬Òò´Ë¸Ã·½·¨¶ÔËùÓÐÍⲿʹÓÃÕ߶¼²»¿É¼û¡£Èç¹û¹Ø¼ü×Ö¶¼ÊÇ private µÄ£¬Ôò load() ·½·¨²»Äܱ»¸²¸Ç¡£

    ÎÒ²¢²»Ê®·Öϲ»¶´ËÉè¼Æ£¬µ«ÊÇ£¬ÓÉÓÚ±ØÐëÈà DBConfiguration ÀàÄܹ»·ÃÎÊÏîÕóÁжøÑ¡ÓÃÁË´ËÉè¼Æ¡£ÎÒÏ£Íû¼ÌÐøÓÉ Configuration ÀàÀ´Íêȫά»¤ÏîÕóÁУ¬ÒÔ±ãÔÚÌí¼ÓÆäËû×ÓÀàºó£¬ÄÇЩÀཫ²»ÐèÒªÖªµÀÈçºÎά»¤ÏîÕóÁС£ÎÒ×öÁËÒÔϸü¸Ä¡£

    Çåµ¥ 5. access4.php5

    <?php
    class Configuration
    {
    ¡¡private PHP V5ǨÒÆÖ¸ÄÏ - ÁèÖڿƼ¼

    ¿ìËÙÒµÎñͨµÀ

    PHP V5ǨÒÆÖ¸ÄÏ

    ×÷Õß ØýÃû¼¼Êõ À´Ô´ NET±à³Ì ä¯ÀÀ ·¢²¼Ê±¼ä 2012-05-22
    content

    ÁèÖڿƼ¼×¨ÒµÌṩ·þÎñÆ÷×âÓᢷþÎñÆ÷Íйܡ¢ÆóÒµÓʾ֡¢ÐéÄâÖ÷»úµÈ·þÎñ£¬¹«Ë¾ÍøÕ¾£ºhttp://www.lingzhong.cn ΪÁ˸ø¹ã´ó¿Í»§Á˽â¸ü¶àµÄ¼¼ÊõÐÅÏ¢£¬±¾¼¼ÊõÎÄÕÂÊÕ¼¯À´Ô´ÓÚÍøÂç,ÁèÖڿƼ¼×ðÖØÎÄÕÂ×÷ÕߵİæȨ£¬Èç¹ûÓÐÉæ¼°ÄãµÄ°æȨÓбØҪɾ³ýÄãµÄÎÄÕ£¬ÇëºÍÎÒÃÇÁªÏµ¡£ÒÔÉÏÐÅÏ¢ÓëÎÄÕÂÕýÎÄÊDz»¿É·Ö¸îµÄÒ»²¿·Ö,Èç¹ûÄúҪתÔر¾ÎÄÕÂ,Çë±£ÁôÒÔÉÏÐÅÏ¢£¬Ð»Ð»!

    Copyright ©1999-2011 ÏÃÃÅÁèÖڿƼ¼ÓÐÏÞ¹«Ë¾ ÏÃÃÅÓÅͨ»¥Áª¿Æ¼¼¿ª·¢ÓÐÏÞ¹«Ë¾ All rights reserved

    µØÖ·(ADD)£ºÏÃÃÅÈí¼þÔ°¶þÆÚÍûº£Â·63ºÅ701E£¨¶«ÄÏÈÚͨÅÔ£© Óʱà(ZIP)£º361008

    µç»°£º0592-5908028 ´«Õ棺0592-5908039 ×ÉѯÐÅÏ䣺web@lingzhong.cn ×ÉѯOICQ£º173723134

    ¡¶ÖлªÈËÃñ¹²ºÍ¹úÔöÖµµçÐÅÒµÎñ¾­ÓªÐí¿ÉÖ¤¡·ÃöB2-20100024  ICP±¸°¸:ÃöICP±¸05037997ºÅ

    items = array();
    ¡¡public function __construct() {
    ¡¡¡¡$this->load();
    ¡¡}
    ¡¡protected function load() { }
    ¡¡protected function add( $key, $value ) {
    ¡¡¡¡$this->_items[ $key ] = $value;
    ¡¡}
    ¡¡public function get( $key ) {
    ¡¡¡¡return $this->_items[ $key ];
    ¡¡}
    }
    class DBConfiguration extends Configuration
    {
    ¡¡protected function load() {
    ¡¡¡¡$this->add( ''imgpath'', ''images'' );
    ¡¡}
    }
    $c = new DBConfiguration();
    echo( $c->get( ''imgpath'' )."\n" );
    ?>

    ÏÖÔÚ£¬ÏîÕóÁпÉÒÔÊÇ private µÄ£¬ÒòΪ×ÓÀàʹÓÃÊܱ£»¤µÄ add() ·½·¨½«ÅäÖÃÏîÌí¼Óµ½ÁбíÖС£Configuration Àà¿ÉÒÔ¸ü¸Ä´æ´¢ºÍ¶ÁÈ¡ÅäÖÃÏîµÄ·½·¨¶ø²»ÐèÒª¿¼ÂÇËüµÄ×ÓÀà¡£Ö»Òª load() ºÍ add() ·½·¨ÒÔͬÑùµÄ·½·¨ÔËÐУ¬×ÓÀà¾ÍÓ¦µ±²»»á³öÎÊÌâ¡£

    ¶ÔÓÚÎÒÀ´Ëµ£¬Ôö¼ÓÁË·ÃÎÊ¿ØÖÆÊÇ¿¼ÂÇÒÆÖÁ PHP V5 µÄÖ÷ÒªÔ­Òò¡£ÄѵÀ¾ÍÒòΪ Grady Booch ˵ PHP V5 ÊÇËÄ´óÃæÏò¶ÔÏóµÄÓïÑÔ֮һô£¿²»£¬ÒòΪÎÒÔø¾­½ÓÊÜÁËÒ»¸öÈÎÎñÀ´Î¬»¤ 100KLOC C++ ´úÂ룬ÔÚÕâЩ´úÂëÖÐËùÓз½·¨ºÍ³ÉÔ±¶¼±»¶¨ÒåΪ public µÄ¡£ÎÒ»¨ÁËÈýÌìʱ¼äÀ´Çå³ýÕâЩ¶¨Ò壬²¢ÔÚÇå³ý¹ý³ÌÖУ¬Ã÷ÏԵؼõÉÙÁË´íÎóÊý²¢Ìá¸ßÁË¿Éά»¤ÐÔ¡£ÎªÊ²Ã´£¿ÒòΪûÓзÃÎÊ¿ØÖÆ£¬¾Í²»¿ÉÄÜÖªµÀ¶ÔÏóÔõÑùʹÓÃÆäËû¶ÔÏó£¬Ò²¾Í²»¿ÉÄÜÔÚ²»ÖªµÀҪͻÆÆʲôÄѹصÄÇé¿öÏÂ×öÈκθü¸Ä¡£Ê¹Óà C++£¬ÖÁÉÙÎÒ»¹ÓбàÒë³ÌÐò¿ÉÓá£PHP ûÓÐÅ䱸±àÒë³ÌÐò£¬Òò´ËÕâÀà·ÃÎÊ¿ØÖƱäµÃÓú¼ÓÖØÒª¡£

    ÆõÔ¼±à³Ì

    ´Ó PHP V4 ǨÒƵ½ PHP V5 ʱ

    ÁèÖڿƼ¼×¨ÒµÌṩ·þÎñÆ÷×âÓᢷþÎñÆ÷Íйܡ¢ÆóÒµÓʾ֡¢ÐéÄâÖ÷»úµÈ·þÎñ£¬¹«Ë¾ÍøÕ¾£ºhttp://www.lingzhong.cn ΪÁ˸ø¹ã´ó¿Í»§Á˽â¸ü¶àµÄ¼¼ÊõÐÅÏ¢£¬±¾¼¼ÊõÎÄÕÂÊÕ¼¯À´Ô´ÓÚÍøÂç,ÁèÖڿƼ¼×ðÖØÎÄÕÂ×÷ÕߵİæȨ£¬Èç¹ûÓÐÉæ¼°ÄãµÄ°æȨÓбØҪɾ³ýÄãµÄÎÄÕ£¬ÇëºÍÎÒÃÇÁªÏµ¡£ÒÔÉÏÐÅÏ¢ÓëÎÄÕÂÕýÎÄÊDz»¿É·Ö¸îµÄÒ»²¿·Ö,Èç¹ûÄúҪתÔر¾ÎÄÕÂ,Çë±£ÁôÒÔÉÏÐÅÏ¢£¬Ð»Ð»!

    Copyright ©1999-2011 ÏÃÃÅÁèÖڿƼ¼ÓÐÏÞ¹«Ë¾ ÏÃÃÅÓÅͨ»¥Áª¿Æ¼¼¿ª·¢ÓÐÏÞ¹«Ë¾ All rights reserved

    µØÖ·(ADD)£ºÏÃÃÅÈí¼þÔ°¶þÆÚÍûº£Â·63ºÅ701E£¨¶«ÄÏÈÚͨÅÔ£© Óʱà(ZIP)£º361008

    µç»°£º0592-5908028 ´«Õ棺0592-5908039 ×ÉѯÐÅÏ䣺web@lingzhong.cn ×ÉѯOICQ£º173723134

    ¡¶ÖлªÈËÃñ¹²ºÍ¹úÔöÖµµçÐÅÒµÎñ¾­ÓªÐí¿ÉÖ¤¡·ÃöB2-20100024  ICP±¸°¸:ÃöICP±¸05037997ºÅ