phpQueryÕ¼Óùý¶àÄÚ´æµÄ½â¾ö·½·¨
phpQueryÊÇÒ»¸öÓÃphpʵÏÖµÄÀàËÆjQueryµÄ¿ªÔ´ÏîÄ¿£¬¿ÉÒÔÔÚ·þÎñÆ÷¶ËÒÔjQueryµÄÓï·¨ÐÎʽ½âÎöÍøÒ³ÔªËØ¡£ Ïà¶ÔÓÚÕýÔò»òÆäËü·½Ê½Æ¥ÅäÍøÒ³·½Ê½£¬phpQueryʹÓÃÆðÀ´Òª·½±ãµÄ¶à¡£
ÔÚʹÓÃphpQuery²É¼¯Íøҳʱ£¬Óöµ½Ò»¸öÎÊÌ⣺ÔÚ´¦Àí´óÁ¿ÍøÒ³Ö®ºó£¬phpQueryÕ¼ÓõÄÄÚ´æÊýÁ¿·Ç³£¾ªÈË£¨ºÜ¿ì¾Í³¬¹ýÁË1G)£¬
±ÈÈçÕâ¶Î´úÂ룺
while (true) { phpQuery::newDocumentFile($htmlFile); // ´¦ÀíÍøÒ³ÔªËØ... echo memory_get_usage() . "\n"; }
½÷É÷ÔËÐÐÉÏÃæÕâ¶Î´úÂ룬Ëü»áºÜ¿ìÓùâÄãµÄÄÚ´æ¡£
¾¹ý²é¿´phpQueryµÄÔ´´úÂëÖÕÓÚ·¢ÏÖÁËÎÊÌâËùÔÚ£¬phpQueryÔÚÿ´¦ÀíÒ»¸öÍøÒ³¾Í»á²úÉúÒ»¸öDOMDocumentWrapper ¶ÔÏ󣬶øÿ¸öDOMDocumentWrapper ¶ÔÏó»á±»±£´æÔÚ¾²Ì¬³ÉÔ±$documentsÖУ¨phpQuery::createDocumentWrapperÖУ©£¬Õâ¸ö±äÁ¿ÊÇÒ»¸öÊý×飬ÿ½âÎöÒ»¸öÍøÒ³Êý×éÔªËؾÍÔö¼ÓÒ»¸ö¡£
phpQuery::$documents[$wrapper->id] = $wrapper;
ÕÒµ½ÎÊÌâºó£¬½â¾ö¾ÍºÜÈÝÒ×ÁË£¬Ã¿´Î½âÎöÍêÒ»¸öÍøÒ³£¬°ÑphpQuery::$documentsÖÿռ´¿É¡£
while (true) { phpQuery::newDocumentFile($htmlFile); // ´¦ÀíÍøÒ³ÔªËØ... phpQuery::$documents = array(); echo memory_get_usage() . "\n"; }ÄÚ´æÕ¼ÓÃÎȶ¨ÁË¡£
ÍƼöÐÅÏ¢
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- php³£ÓÃÕýÔò±í´ïʽ
- phpÐÔÄܼà²âÄ£¿éXHProf
- ÈÃCI¿ò¼ÜÖ§³Öservice²ã
- ʹÓÃPHPÉú³É´øLOGOµÄ¸öÐÔ»¯¶þάÂëͼÏñ
- ¹ØÓÚCodeIgniterÄã¿ÉÄܲ»ÖªµÀµÄ5¸ö֪ʶµã
- Memcache ºÁÃ뼶³¬Ê±¼°ÆäËû³£¼ûÎÊÌâ»ã×Ü
- [PHP±Ê¼Ç]PHPQueryÒ»¸ö´¦ÀíDOMµÄÀûÆ÷
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- PHP»ñÈ¡Óû§µÄÕæʵIP£¬²¢ÅжÏÊÇ·ñÄÚÍøIP
- PHP ´íÎóÈÕÖ¾ error_log
- ÀûÓÃbigpipe»úÖÆʵÏÖÒ³ÃæÄ£¿éµÄÒì²½äÖȾ chunked¼¼Êõ
- php¿ØÖÆÎļþÏÂÔØËÙ¶È
- js + php ¶ÁÈ¡¡¢²¥·ÅÊÓƵÁ÷ ¼æÈÝfirefox£¬c....
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- UNICODE Óë UTF-8 µÄ¹Øϵ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- phpʹÓÃmb_detect_encoding¼ì²â×Ö·û´®±àÂë
ÆÀÂÛ