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

tokyo tyrant ÔÚ php Éϲ»ÄÜ×Ô¶¯·´ÐòÁл¯µÄÎÊÌâ

Ç°Ò»ÕóÊÔÓà tokyo tyrant Åöµ½Ò»¸öÂé·³£¬
ÔÚphpÉÏÓÃmemcache½Ó¿Ú£¬È¡³öÊý¾ÝµÄʱºò£¬²»»á×Ô¶¯·´ÐòÁл¯¡£±ÈÈçÁËÒ»¸ö array(1,2,3,4,5)£¬³öÀ´¾ÍÊÇ 'a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;}' ÁË¡£
ÓÃ
Wireshark ¸ú×ÙÁËһϣ¬·¢Ïֺͱê×¼memcached·µ»ØµÄÊý¾ÝÀï²îÒ»¸ö×Ö½Ú¡£È¥¿´ÁËÏ memcached
ЭÒ飬·¢ÏÖÕâ¸ö×Ö½ÚÊǸö¿Í»§¶ËµÄ±ê¼Ç flag ¡£´æ´¢µÄʱºò·ÅÖÃÕâ¸ö±êÖ¾£¬È¡µÄʱºòÕÕÑù·µ»Ø¡£php µÄ memcache
À©Õ¹Ó¦¸Ã¾ÍÊÇÓÃÕâ¸ö×Ö½ÚÀ´±êÖ¾ÊÇ·ñÊÇ php µÄÊý¾Ý¡£Èç¹ûÆ¥ÅäÔò·´ÐòÁл¯¡£¶Ô±È tokyo tyrant
µÄÔ´´úÂ룬·¢ÏÖËüÔÚ´æÈ¡µÄʱºòÎÞÊÓÁËÕâ¸ö±ê¼Ç루Æäʵ»¹ÎÞÊÓÁËһЩÆäËû¶«Î÷£¬±ÈÈç¹ýÆÚʱ¼äÖ®ÀàµÄ£¬Ö»ÓÃÁË key ºÍ value
ÒÔ¼°ËûÃǵij¤¶È£©£¬ËùÒÔ¾ÍÓÐÁËÕâ¸ö½á¹û¡£
֮ǰ¿¼ÂÇ¸Ä tokyo tyrant £¬×öÁ˸ö²¹¶¡¡£²»¹ýÕýÈç xdanger
Ëù˵£¬Õâ¸ö°ì·¨²»ºÃ¡£Ö®Ç°²âÊԵò»×Ðϸ£¬ºóÀ´ÊÔÁ˼¸¸ö²»Í¬µÄÀàÐÍ£¬¹ûÈ»ÊdzöÁËÎÊÌâ¡£ÓÚÊÇÓÖ¿¼ÂÇÔÙ¸Ä php
µÄ¿Í»§¶Ë¡£ÈÃËü²»¹ÜʲôÀàÐÍ´æ´¢µÄʱºò¶¼È¥×öÐòÁкš£ËƺõÊǽâ¾öÁË·´ÐòÁкÅÎÊÌâ¡£ÕâÑùÐ޸İæµÄ¿Í»§¶Ë·ÅµÄ¶«Î÷Ô­°æµÄÄÜÕý³£¶ÁÈ¡£¬µ«Ô­°æ¿Í»§¶ËÒ»µ©·ÅÁ˳£¹æÖµ¾Í»á³ö벡¡£ÕâÒ»ÏÂͬʱ¸ÄÁË¿Í»§¶ËºÍ·þÎñ¶Ë£¬ÁíÍ⣬ѹËõµÄÎÊÌâÒ²»¹ÊÇû½â¾ö¡£¿´À´Õâ¸öÎÊÌ⻹ÕæµÄºÜÄÑ¡£
php ¿Í»§¶Ë²¹¶¡£¬ÐÞ¸Ä memcache.c
 http://syre.blogbus.com/files/12229540080.diff

 tokyo tyrant ²¹¶¡£¬ÐÞ¸Ä ttserver.c
http://syre.blogbus.com/files/12227686210.diff


Ïà¹ØÎĵµ£º

PHP һЩ֪ʶ

1.È¡µÃµ±Ç°ÄÚ´æʹÓôóС£ºmemory_get_usage()
2.¼ÆËãÖ´ÐÐʱ¼ä£ºmicrotime(true)
3.ÉèÖÃscriptÖ´ÐÐʱ¼äÏÞÖÆset_time_limit
4.ÉèÖÃÄÚ´æÏÞÖÆini_set("memory_limit","256M");
3.´ÓÔ¶³ÌÏÂÔØÎļþµÄÁ½¸ö·½·¨£º
$contents=file_get_contents("http://www.govtrack.us/data/us/gis/zip4dist-prefix.t ......

PHPÏà¹ØÔÓÏî֪ʶ


php -h¿ÉÒÔ»ñÈ¡°ïÖúÐÅÏ¢¡£PHP°æ±¾ºÅÐÅÏ¢£º/your_current_path/php -v£¬PHPÔËÐнű¾£º/your_current_path/php your_file_path£¬PHPÔËÐÐÓï¾ä/your_current_path/php -r your_code_snippet¡£
´úÂëÖ´ÐнáÊøºó£¬PHP»á¸ù¾Ý¾ßÌåÖ´ÐÐÇé¿ö×Ô¶¯µÄÊÍ·Å£¬Èç¹ûÖ´Ðйý³ÌÖÐÄÚ´æÏûºÄ½Ï´ó£¬¿ÉÒÔÀûÓÃNULL»òunsetÀ´ÊÍ·ÅÄÚ´æ¡£Çø±ðÔÚÓÚ£¬Ç°Õß ......

[ת]asp¡¢php¡¢asp.net¡¢jsp½éÉܼ°ÓÅȱµã±È½Ï


     ÏÖÔÚÖ÷Á÷µÄÍøÕ¾¿ª·¢ÓïÑÔÎÞÍâºõasp¡¢php¡¢asp.net¡¢jspµÈ¡£
     
     ÍøÒ³´Ó¿ªÊ¼¼òµ¥µÄhmtlµ½¸´ÔӵķþÎñÓïÑÔ£¬×ß¹ýÁË10¶à¸öÄêÍ·£¬¸÷ÖÖ¼¼Êõ²ã³ö²»Çµ¥¸öµÄÖ÷Á÷¼¼ÊõÒ²ÔÚ²»¶Ï·­Ðµİ汾£¬ÏÖÔÚ·ÖÎöϸ÷ÖÖÓïÑÔµÄÇø±ð¡¢ÓÅÊÆ¡¢ÁÓÊÆ¡¢¿ª·¢×¢ÒâÊÂÏ
   ......

PHPÓïÑÔ

    PHP£¬ÊÇÓ¢Îij¬¼¶Îı¾Ô¤´¦ÀíÓïÑÔHypertext PreprocessorµÄËõд¡£PHP ÊÇÒ»ÖÖ HTML ÄÚǶʽµÄÓïÑÔ£¬ÊÇÒ»ÖÖÔÚ·þÎñÆ÷¶ËÖ´ÐеÄǶÈëHTMLÎĵµµÄ½Å±¾ÓïÑÔ£¬ÓïÑԵķç¸ñÓÐÀàËÆÓÚCÓïÑÔ£¬±»¹ã·ºµÄÔËÓá£
    PHP ¶ÀÌصÄÓï·¨»ìºÏÁË C¡¢Java¡¢Perl ÒÔ¼° PHP ×Ô´´ÐµÄÓï·¨¡£Ëü¿ÉÒÔ±È CGI »òÕß Perl ¸ü¿ìË ......

php ËõÂÔͼº¯Êý

function getThumbs($filename,$savepath,$d_w,$d_h,$b,$img_name)
{
    if($b)
    {
        $photourl = $savepath."/".$img_name;
    }else
    {
        $photourl = ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ