ÈçºÎÀûÓÃAPC»º³åPHP½Å±¾À´Ìá¸ß·þÎñÆ÷ÐÔÄÜ
ÔÌù£ºhttp://www.phpchina.com/html/05/n-2005.html
ÈçºÎÀûÓÃAPC»º³åPHP½Å±¾À´Ìá¸ß·þÎñÆ÷ÐÔÄÜ
·¢²¼Ê±¼ä:2006-10-16 09:01 ¡¡¡¡×÷Õß: bulider.com.cn ¡¡¡¡ÐÅÏ¢À´Ô´:
bulider.com.cn¡¡¡¡[ÎÒÀ´ËµÁ½¾ä
(3765
Ìõ)]
ѧ»áÔõÑùÀûÓÃAPC
»º³åPHP
½Å±¾À´Ìá¸ß·þÎñÆ÷ÐÔÄÜ¡£
Ï£
ÍûÄúµÄWeb·þÎñÆ÷·¢»Ó×î´óµÄÐÔÄÜÂð£¿Èç¹ûÄúÕýÔÚʹÓÃPHP½Å±¾£¬Äú¿ÉÒÔºÜÇáËɵØÀûÓÃPHPµÄAPCÄ£¿éʵÏÖÕâÒ»µã£¬Ëü¶Ôphp
opcode½øÐлº³å£¬¶ø²»ÊÇÆÈʹphpÔÚÿһ´ÎÖ´ÐеÄʱºò¶¼ÖØнâÊÍÿһ¸ö½Å±¾¡£ÔÚÒ»¸öÓÐPEARÖ§³ÖµÄPHP5ϵͳÖУ¬
APCµÄ°²×°ºÍËüµÄÖ´ÐÐÒ»Ñù¼òµ¥£¬ÔÚ¸ùĿ¼ÏÂÖ´ÐУº
# pecl install APC
һЩ·Ö·¢°æ±¾»òÐí»áÌṩAPC¶þ½øÖƵijÌÐò°ü£¬ËùÒÔÄúÒ²Ðí¿ÉÒÔÀûÓÃurpmi php-apc»òapt-getÀ´°²×°php-apc¡£
Ò»µ©APC±»°²×°Ö®ºó£¬±à¼/etc/php.ini¼ÓÈëÒÔÏÂÄÚÈÝ£º
extension=apc.so[apc]apc.enabled
= 1apc.shm_segments = 1apc.shm_size = 30apc.optimization = 0apc.ttl =
7200apc.user_ttl = 7200apc.num_files_hint = 1000apc.mmap_file_mask =
/tmp/apc.XXXXXX
ÕâÑù×öÊÇΪÁ˼¤»îAPC»º³å£¬¶ø²»ÊÇÆô¶¯ÓÅ»¯Æ÷£¨µ±Ç°´¦ÓÚʵÑé½×¶Î£©¡£³ýÁ˼¤»îAPCÖ®Í⣬Ӧ¸Ã×¢ÒâµÄÖØҪѡÏ
ÓÐapc.ttlºÍapc.user_ttl£¬ËüÃǶ¨ÒåÁ˽ű¾±£³ÖÔÚ»º´æÖеÄʱ¼ä£¬ÒÔÃë¼Æ¡£ÕâÒ»µã¶ÔÓÚ´¦ÀíÌṩºÜ¶àÎļþµÄ·þÎñÆ÷À´ËµÕæµÄºÜÖØÒª£»Ëü½«·ÀÖ¹
»º´æÒò±»³Â¾ÉµÄÌõĿװÂú¶øÎÞ·¨ÎªÐµÄÌõÄ¿Ìṩ»º³åµÄÇé¿ö³öÏÖ¡£
ÄúÒ²¿ÉÒÔµ÷Õûapc.num_files_hint£¬ËüΪAPCÌṩÁËÒ»¸ö½ü
ËÆÖµ£¬±íʾÁ˱»ÇëÇóµÄ»ò°üÀ¨ÔÚÄúϵͳÖÐPHPÔ´ÎļþµÄÊýÁ¿¡£ÆäȱʡֵÊÇ1000£¬µ«ÊÇÈç¹ûÄúÖªµÀÒª´¦Àí¸ü¶àÎļþ£¬¿ÉÒÔ½«ÖµÔö¼Óµ½Ò»¸ö×î½Ó½üµÄ¹À¼ÆÖµ¡£Í¬Ñù
µØ£¬Èç¹ûÎļþ»áÉٺܶàµÄ»°£¬Ò²¿ÉÒÔÏàÓ¦µØ¼õÉÙ¡£
×îºó£¬ÔÚAPCÔ´³ÌÐò°üÖУ¬ÓÐÒ»¸ö½Ðapc.phpµÄ½Å±¾£¬ËüÓÃÀ´´ÓAPC»º´æÖлñÈ¡ÏêϸµÄ
Êý¾Ý£¬Ê¹µÃÄúÄܹ»½øÒ»²½µ÷ÕûAPCµÄÉèÖá£ÒªÊ¹ÓÃÕâ¸ö½Å±¾µÄ»°£¬Äú¾ÍÐèÒª±à¼½Å±¾ºÍ¸Ä±äADMIN_PASSWORDÑ¡Ïͨ¹ýµ÷ÕûÑ¡Ï²¢ÀûÓÃÕâ¸ö½Å±¾
È·¶¨ÕâÖֱ仯Ëù²úÉúµÄЧ¹û£¬Äú¾Í¿ÉÒÔÕæÕýÌá¸ßPHP½Å±¾µÄÐÔÄÜÁË
Ïà¹ØÎĵµ£º
LAMPÕâ¸ö´ÊµÄÓÉÀ´×îÔçʼÓڵ¹úÔÓÖ¾“c't Magazine”£¬Michael KunzeÔÚ1990Äê×îÏÈ°ÑÕâЩÏîÄ¿×éºÏÔÚÒ»Æð´´ÔìÁËLAMPµÄËõд×Ö¡£ÕâЩ×é¼þËäÈ»²¢²»ÊÇ¿ª¿ªÊ¼¾ÍÉè¼ÆΪһÆðʹÓõģ¬µ«ÊÇ£¬ÕâЩ¿ªÔ´Èí¼þ¶¼¿ÉÒԺܷ½±ãµÄËæʱ»ñµÃ²¢Ãâ·Ñ»ñµÃ¡£Õâ¾Íµ¼ÖÂÁËÕâЩ×é¼þ¾³£ÔÚÒ»ÆðʹÓá£ÔÚ¹ýÈ¥µÄ¼¸ÄêÀÕâЩ×é¼þµÄ¼æÈÝÐÔ²»¶ÏÍêÉÆ£¬Ô ......
¹ØÓÚ PHP ½Ì³ÌµÄÎÄÕÂÒѾºÜ¶àÁË£¬½ñÌì¸ø´ó¼Ò½éÉܼ¸¸ö³£ÓõÄMYSQLÓï¾ä¡£
ÏÔʾÊý¾Ý¿â»ò±í:
show databases;//È»ºó¿ÉÒÔuse database_name;
show tables;
¸ü¸Ä±íÃû:
alter table table_name rename new_t;
Ìí¼ÓÁÐ :
alter table table_name add column c_n column attributes;
ɾ³ýÁÐ:
alter table table_name ......
ÅäÖÃAPACHEʹÆäÖ§³ÖphpµÄ³É¹¦¾Ñ飨ֻÊǹؼü²¿·ÖÅäÖ㬲¢·ÇÕû¸öÅäÖùý³Ì£©
»·¾³£º
WinXP sp3
Apache2.2
php-5.2.2-Win32.zip½âѹĿ¼D£º\PHP
ÔÚApacheµÄhttpd.confÎļþÖвÉÈ¡ÓüÓÔØÄ£¿éµÄ·½Ê½ÔÚÎļþÖÐÌí¼ÓÓï¾ä£º
LoadModule php5_module "D:/PHP/php5apache2-2.dll"
×¢ÒâÕâÀïÒ»¿ªÊ¼ÎÒÌí¼ÓµÄÊÇD:/PHP/php5apache2.dll ......
×î½üÍ»·¢ÆæÏ룬.net¶¼ÓÐÃüÃû¿Õ¼ä»úÖÆ£º
using System.data;.......,
ÎÒÃÇÔÚ¿ª·¢phpʱ£¬ÊÇ·ñÒ²ÄÜʵÏÖÕâÖÖ»úÖÆÄØ£¬ÎÒÃÇÖªµÀÏÖÔÚµÄphp v5.2.9»¹²»Ö§³ÖÃüÃû¿Õ¼äµÄ¸ÅÄ
µ«Ïà¹Øphp v5.3µÄ ×ÊÁϱíÃ÷ ÒѾʹÓÃÃüÃû¿Õ¼äµÄ¸ÅÄî £º
&nb ......
PHPÖ®¸¸Rasmus LerdorfÔÚ»¥ÁªÍø¼¼Êõ¾«Ó¢ÂÛ̳Éϱíʾ£¬¿ª·¢ºÍ»¥¶¯ÊÇÍøÕ¾³É¹¦µÄ»ù´¡¡£
¡¡¡¡RasmusÒÔÑÇÂíÑ·ºÍÑÅ»¢¾ÙÀý£¬“ÕâЩÍøÕ¾Èç¹ûûÓÐÓû§µÄ»°£¬×öµÃÔÙƯÁÁҲʲô¶¼²»ÊÇ”¡£RasmusÈÏΪ£¬ÍøÕ¾Ò»¿ªÊ¼Ó뱨ֽһÑù£¬½ö½öÊÇ“µ¥Ïò½»Á÷”ÌṩÐÅÏ¢£¬ÓÐÈËÀ´¿´¼´¿É¡£
¡¡¡¡“µ«ÊǶÔÏÖ´úµÄÍøÕ¾À´Ëµ£¬ÕâÒÑ ......