PHPÓëħÊÞ
ͨ¹ýħÊÞ¿´PHPÉè¼Æģʽ
Ç°¶Îʱ¼ä¿´µ½ÓÐÈËÓÃħÊÞÀ´½âÊÍÉè¼Æģʽ£¬¸Ð¾õºÜÓÐÒâ˼£¬ÓÚÊÇÎÒ°ÑËü¸ÄÁ˸ģ¬ÓÖÌí¼ÓÁËЩÉè¼ÆģʽÄÚÈÝ£¬½ñÌì·¢³öÀ´¡£ÓÐЩµØ·½½è¼øÁËÇ°È˵ÄÄÚÈÝ£¬Ã»ÓÐ×¢Ã÷£¬ÇëÇ°È˲»Òª¼û¹Ö°¡¡£
ÕâÀïÓôó¼Ò¸ÐÐËȤµÄħÊÞ3À´ÌÖÂÛPHPµÄ¼¸ÖÖ³£¼ûµÄÉè¼Æģʽ£ºµ¥¼þģʽ¡¢²ßÂÔģʽ¡¢¹¤³§Ä£Ê½¡¢¹Û²ìÕßģʽ¡£½ñÌì¾Í½²ÕâËĸö°É£¬ÒÔºó¼ÌÐø¡£ÕâЩÉè¼Æģʽ£¬¶¼ÊÇÕë¶ÔÃæÏò¶ÔÏóÀ´ËµµÄ£¬ËùÒÔ¶¼ÓÃPHP5£¬ÁíÍâÔÚÕâÀïÎÒÏë˵µÄÊÇPHP4´Ó2008Äê8ÔÂ8ÈÕ£¨ÎҼǵÃÊǺͱ±¾©°ÂÔË»áͬһÌ죬û²éÖ¤£¬ºÇºÇ£©µÄʱºò¹Ù·½¾Í·¢ÁË×îºóÒ»¸öPHP4µÄ²¹¶¡£¬ÕâÒâζÕâPHP4µÄʱ´úÒѾÖսᣬËùÒÔ£¬ÎÒ½¨Òé´ó¼ÒÏÖÔھͱðÀíPHP4°É£¬¾ÍÒÔPHP5À´Ëµ°É¡£
Ò»¡¢µ¥¼þģʽ£º
ÎÊÌâµÄÌá³ö£ºÄ³Ð©Ó¦ÓóÌÐò×ÊÔ´ÊǶÀÕ¼µÄ£¬ÒòΪÓÐÇÒÖ»ÓÐÒ»¸ö´ËÀàÐ͵Ä×ÊÔ´¡£ÀýÈ磬ͨ¹ýÊý¾Ý¿â¾ä±úµ½Êý¾Ý¿âµÄÁ¬½ÓÊǶÀÕ¼µÄ¡£ÄúÏ£ÍûÔÚÓ¦ÓóÌÐòÖй²ÏíÊý¾Ý¿â¾ä±ú£¬ÒòΪÔÚ±£³ÖÁ¬½Ó´ò¿ª»ò¹Ø±Õʱ£¬ËüÊÇÒ»ÖÖ¿ªÏú£¬ÔÚ»ñÈ¡µ¥¸öÒ³ÃæµÄ¹ý³ÌÖиüÊÇÈç´Ë¡£
ÎÊÌâµÄ½â¾ö£ºÄÇôÏÂÃæÎÒÃǾͿªÊ¼ÍæħÊÞ°É¡£Ê×ÏÈË«»÷war3.exe£¬Õâʱºò¾Í¿ªÊ¼ÔËÐÐħÊÞÁË¡£ÎÒÃÇÓôúÂëÀ´ÊµÏÖ°É¡£¡£
< ?php
class War3 {
public function __construct() {
echo "War3 is Running.",
}
}
$war = new War3();
ÔËÐУ¡ºÜºÃ£¬Êä³öWar3 is Running.ÎÒÃÇÒѾ¿ÉÒÔ¿ªÊ¼ÓÎÏ·ÁË£¬µ«ÊÇ£¬Èç¹ûÎÒÔÚ´úÂëĩβÔÙ¼ÓÈë
$war2 = new War3();
$war3 = new War3();
»áÔõôÑùÄØ£¿ÎÒÃÇÊÔÊÔ£¬Êä³ö½á¹û£ºWar3 is Running.War3 is Running.War3 is Running.ÍêÁË£¬Èç¹û²»Ð¡ÐÄË«»÷ÁËÁ½´Î¾Í¿ªÁË3¸öħÊÞ£¬ÄÇÈç¹ûÔÙË«»÷¼¸´Î£¬ÄǵçÄԿ϶¨±¬µô¡£¡£¡£ÎÒÃÇ»¹ÊÇÀ´ÏëÏë½â¾ö·½·¨°É¡£¡£¡£¼ÈÈ»ÎÒÃDz»ÄÜÕâôËæÒâµÄ¾Í°ÑÕâ¸öÀàʵÀý»¯ÁË£¬ÄÇôÎÒÃǾͰѹ¹Ô캯Êý¸Ä³É˽Óз½·¨¡£
class War3 {
private function __construct() {
echo "War3 is Running.",
}
}
¿ÉÊÇ˽ÓбäÁ¿ÍⲿÊÇÎÞ·¨·ÃÎʵģ¬ÕâÑùÒÔÀ´£¬ÎÒÃǾÍÁ¬Ò»¸ö¶¼´ò²»¿ªÁË°¡¡£±ð¼±£¬ÎÒÃÇÔÙ¸øËû¼ÓÒ»¸ö²»ÓÃͨ¹ýʵÀý»¯£¬ÍⲿҲÄÜ·ÃÎʵĺ¯Êý£¬ÄǾÍÊǾ²Ì¬º¯Êý
class War3 {
private function __construct() {
echo "War3 is Running.",
}
public static function runWar() {
}
}
ͨ¹ýÕâ¸ö¾²Ì¬µÄ·½·¨runWar()ÎÒÃÇÀ´¿ØÖÆÀàWar3µÄʵÀý»¯£¬ÄÇô»¹È±ÉÏÒ»¸ö±êʶ£¬ÎÒÃÇÔÙ´´½¨Ò»¸ö±êʶ£¬Í¨¹ýÕâ¸ö±êʶÀ´±íʾÎÒÃǵÄÀàÊÇ·ñÒѾÊ
Ïà¹ØÎĵµ£º
¡¡¡¡¸÷´óÍøÂç±à³ÌÓïÑÔµÄ10Äê·ÜÕ½£¬¸÷ÓÐËù³¤¡¢¸÷ÁìǧÇï¡£½ñÈÕ¶ÔÓÚÎÒÃǵÄÍøÕ¾±à³ÌÓïÑÔ:ASP¡¢JSP¡¢PHP¡¢ASP.NET½øÐÐʵ¼ÊÓ¦ÓÃͳ¼Æ:
¡¡¡¡ASP:50%
¡¡¡¡JSP:10%
¡¡¡¡PHP:20%
¡¡¡¡ASP.NET:20%
¡¡¡¡¸ù¾ÝÒÔÉÏͳ¼ÆÀ´×öÒ»ÏÂÌÖÂÛ¡£ASP¼¼ÊõÈç½ñÌì¿ÉÒÔ˵ÒѳÉΪ¹ýÈ¥£¬µ«ÈÔÕ¼Êг¡µÄ50%£¬ÒòΪµ±Ê±ASP¼¼ÊõµÄÐËÆ𣬶Դ󲿷ֱà³Ì ......
class_exists — Åж¨Ò»¸öÀàÊÇ·ñÒѾ±»¶¨Òå
get_class_methods — »ñȡij¸öÀàÖÐËùÓз½·¨µÄÃû³Æ
get_class_vars — »ñÈ¡Ò»¸öÀàÖÐËùÓеÄÌØÐÔ
get_class — ·µ»ØÒ»¸ö·½·¨ËùÔÚµÄÀàÃû
get_declared_classes — ÏÔʾÒѶ¨ÒåµÄÀàµÄÐÅÏ¢
get_declared_interfaces — ÏÔʾÒѶ¨ÒåµÄ½Ó¿ÚµÄÐÅÏ¢
get ......
PHP trim() º¯Êý
¶¨ÒåºÍÓ÷¨
trim() º¯Êý´Ó×Ö·û´®µÄÁ½¶Ëɾ³ý¿Õ°××Ö·ûºÍÆäËûÔ¤¶¨Òå×Ö·û¡£
Óï·¨
trim(str,charlist)
²ÎÊý 1 strΪ´ý²Ù×÷µÄ×Ö·û´®£¬²ÎÊý 2 charlist ¿ÉÑ¡£¬Ö¸¶¨ÁËÏëҪȥ³ýµÄÌØÊâ·ûºÅ¡£
Èç¹ûµÚ¶þ¸ö²ÎÊýû¸øÖµ£¬Ô¤Éè»áÈ¥³ýÏÂÁÐÕâЩ×ÖÔª£º
" " (ASCII 32&nbs ......
<?php
/*
* Created on 2008-10-25
*
* developer by Alex.do QQ:20779512
* PHP 5.0
*/
class mdbClass {
var $dbPath = 'database/#123123#.mdb'; //Êý¾Ý¿â·¾¶
var $tabName; & ......