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

ϸϸƷζPHP³ÌÐòµÄËã·¨

http://prato.bokele.com/?ArticleID=15302
    ÔÚÒ»°ãµÄÓ¦ÓÃÖУ¬PHPµÄ³ÌÐòÔ±»á±È½ÏÉÙµÄ×¢Òâµ½php³ÌÐòµÄϸ΢Ëã·¨¶ÔÐÔÄÜÓ°ÏìµÄÎÊÌ⣬µ«ÔÚ´¦ÀíһЩ±È½ÏÕ¼ÓÃ×ÊÔ´µÄ¶«Î÷µÄʱºò£¬Êʵ±µ÷ÕûËã·¨£¬»áÈóÌÐòµÄÐÔÄÜÕû±¶µÄÌá¸ß¡£
    Õ⼸Ì죬ÎÒÔÚÑо¿·Ö´ÊµÄËã·¨£¬Èç¹û²»Ô¤ÏÈÔØÈë´ÊµäµÄ»°£¬ÄÇÖÖÔËËãËٶȼòÖ±²Ò²»È̶ã¬Òò´ËÎÒ¿¼ÂÇÁËÔ¤ÏÈÔØÈë´ÊµäÔÚÒ»¸öÊý×éÖеÄ×ö·¨£¬ÎÒÊÖÉÏÓÐÒ»¸öÊ®¶àÍò´Ê»ãµÄ´Êµä£¬¿ªÊ¼µÄʱºò£¬ÓÃÕâÑùµÄ·½Ê½ÔØÈ룺
$fp = fopen(dirname(__FILE__)."/mydic.txt","r");
while($wd = fgets($fp,1024)){
 $ws = split("`",trim($wd));
 $m_dic[$ws[0]][$ws[1]] = $ws[2];
}
fclose($fp);
ÕâÑùÒ»²âÊÔ£¬·¢ÏÖ·ÖÎöʱºòÂýÍÌÍ̵ģ¬ºóÀ´Í¨¹ý¼ì²âÖ´ÐÐʱ¼ä²Å·¢ÏÖ£¬Ô­À´ÔØÈë´Êµä¾ÓÈ»ÓÃÁË 1.5 Ãë¶à£¬Ò²Äѹ֣¡
Êý¾Ý¸ñʽΪ£º
0ÁУºÇ°Á½´ÊµÄÆ´Òô£¬1ÁÐΪ£º´Ê£¬2ÁÐΪ£º´ÊµÄ³¤¶È
È磺
al`°ÂÁÖÆ¥¿ËÔ˶¯»á`14
al`°¢À­²®µÄÀÍÂ×˹`14
as`°£Èû¶í±ÈÑǸßÔ­`14
wp`ÍúÆÌ×âÊÛ`8  
wq`ÍøÇòÍõ×Ó`8  
wq`ÍâÆó·þÎñ`8
ÎÒÊÔһϲ»×÷ÈÎÔË×÷Ë㣬ֻ¶ÁÒ»±éÊý¾ÝÎļþ£º
$fp = fopen(dirname(__FILE__)."/mydic.txt","r");
while($wd = fgets($fp,24)){
 //$ws = split("`",trim($wd));
 //$m_dic[$ws[0]][$ws[1]] = $ws[2];
}
fclose($fp);
¾­²âÊÔÖ»ÓÃÁË£º0.18 Ã룬ÏÔÈ»ÕæÕýÕ¼ÓÃʱ¼äµÄ´úÂëÊÇ£º
$ws = split("`",trim($wd));
$m_dic[$ws[0]][$ws[1]] = $ws[2];
ÕâÁ½ÐдúÂ룬ÎÒ°ÑËü»»³ÉÕâ¸öÑù×Ó£º
$fp = fopen(dirname(__FILE__)."/mydic.txt","r");
while($wd = fgets($fp,24)){
 $WordEnd = strpos($wd,"`",3);
 $m_dic[$wd[0].$wd[1]][substr($wd,3,$WordEnd-3)] = ($WordEnd-3)*2;
}
fclose($fp);
ÕâÑù²âÊÔ¾ÍÖ»ÓÐ 0.7 Ãë¶à£¬È»ºó°Ñ´ÊµäÖдʵij¤¶ÈÈ¥³ý£¬±äΪ£º
$fp = fopen(dirname(__FILE__)."/mydic.txt","r");
while($wd = fgets($fp,18)){
 $WordEnd = strlen($wd)-2;// 2ÊÇ" "µÄ³¤¶È
 $m_dic[$wd[0].$wd[1]][substr($wd,3,$WordEnd-3)] = ($WordEnd-3)*2;
}
fclose($fp);
ÓÖ¿ìÁË 0.07 Ãë×óÓÒ£¬ËÙ¶ÈÔÚ 0.63 ÃëÖÐÅÇ»²£¬ÕâºÍÔ­À´µÄ 1.5 ÊǶà´óµÄ²î±ðѽ£¡


Ïà¹ØÎĵµ£º

ÈçºÎÀûÓÃ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¼¼ÇÉ£ºÊ¹ÓÃAPC»º´æÓÅ»¯PHP³ÌÐò

Ô­Ìù£ºhttp://www.itlearner.com/article/2009/4343.shtml
Alternative PHP Cache£¨APC£©ÊÇ PHP µÄÒ»¸öÃâ·Ñ
¹«¿ªµÄÓÅ»¯´úÂ뻺´æ¡£ËüÓÃÀ´ÌṩÃâ·Ñ£¬¹«¿ª²¢ÇÒÇ¿½¡µÄ¼Ü¹¹À´»º´æºÍÓÅ»¯ PHP µÄÖмä´úÂë¡£
ÔÚ Windows Ï£¬APC ÒªÇóÓÐ c:\tmp Ŀ¼£¬²¢ÇÒ¸ÃĿ¼Ҫ¶Ô Web ·þÎñÆ÷½ø³Ì¿Éд¡£
1¡¢°²×°
ÒÔPHP extension ÐÎʽ°²×°
2 ......

Apache + PHP + MySql °²×°


ËùÐèÈí¼þ£¨×¢Òâ°æ±¾£¡£©£º
Apache2.2.3 
PHP5.1.5 
MySQL5.0.24
ÕâÈý¸öÈí¼þ¶¼ÊÇÃâ·ÑµÄ£¬¿É´Ó¹ÙÍøÉÏÏÂÔØ£¬Ä¿Ç°ÎÒËùÓеÄÈí¼þÃûΪ£º
apache_2.2.3-win32-x86-no_ssl.msi 
mysql-5.0.24-win32.zip 
php-5.1.5-Win32.zip
»ùÓÚwindows²Ù×÷ϵͳ£¬ÔÚWindows XPÏ°²×°Ê¹Óãº
1¡¢°²×°¹ý³Ì£º  ......

PHPÓëÊý¾Ý¿â´úÂ뿪·¢¹æ·¶

PHPÖжԸ÷Àà±äÁ¿ÄÚÈݵÄÃüÃû¹æ·¶
£¨1£©Ä¿Â¼ÃüÃû¡¢ÎļþÃüÃû¡¢¾Ö²¿±äÁ¿ÃüÃû£º
ʹÓÃÓ¢ÎÄÃû´Ê¡¢¶¯´Ê£¬ÒÔÏ»®Ïß×÷Ϊµ¥´ÊµÄ·Ö¸ô£¬ËùÓÐ×Öĸ¾ùʹÓÃСд
Ŀ¼£ºupload¡¢templates¡¢install¡¢manage……
Îļþ£ºindex.php ¡¢ register.php  ¡¢ config.php……
±äÁ¿£º$user , $pay_time , $pay_del_co ......

php±àÂëheaderÖвÎÊý˵Ã÷

ÍøÒ³µÄ»º´æÊÇÓÉHTTPÏûϢͷÖеġ°Cache-control¡±À´¿ØÖƵģ¬³£¼ûµÄÈ¡ÖµÓÐprivate¡¢no-cache¡¢max-age¡¢must-revalidateµÈ£¬Ä¬ÈÏΪprivate¡£Æä×÷Óøù¾Ý²»Í¬µÄÖØÐÂä¯ÀÀ·½Ê½·ÖΪÒÔϼ¸ÖÖÇé¿ö£º £¨1£© ´ò¿ªÐ´°¿Ú
ֵΪprivate¡¢no-cache¡¢must-revalidate£¬ÄÇô´ò¿ªÐ´°¿Ú·ÃÎÊʱ¶¼»áÖØзÃÎÊ·þÎñÆ÷¡£
¶øÈç¹ûÖ¸¶¨ÁËmax ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ