½â¾öPHPÄÚ´æÒç³öµÄÎÊÌâ
Allowed memory size of 33554432 bytes exhausted (tried to allocate 4554 bytes)
ÓÐʱºòÎÒÃÇÔÚÔËÐÐphp³ÌÐòµÄʱºò»á·¢ÏÖ Fatal Error: Out of memory ÕâÑùµÄÌáʾ¡£ ÕâÓпÉÄÜÊdzÌÐòÖÐÓõ½ÁË´óÁ¿Á˱äÁ¿ºÍ¶ÔÏ󣬵¼Ö·ÖÅäµÄÄÚ´æ²»¹»Óá£ÎÒ¾ÍÓöµ½ÕâÑùÒ»¸ö´íÎóÔõô¸ÄÒ²¸Ä²»ÁË£¬ºóÀ´ÉÏÍø²éÁËһЩ×ÊÁÏ£¬¿ÉÊÇÐÞ¸ÄÁËphp.iniÎļþÀïµÄmemory_limit²ÎÊý£¬¿ÉÊÇÎÞÂÛÎÒÔõô¸Ä»¹ÊÇÓÐÕâ¸ö´íÎóÌáʾ£¬ÌرðÓôÃÆ£¡ºóÀ´ÎÒʵÔÚûÓа취ÁË£¬¾ÍÔÚQQȺÀïÃæÇóÖú£¬ÓÐÈ˸æËßÎÒÔÚÎҵijÌÐò´úÂëÖмÓÈë“init_set("memory_limit", "128M");”ÕâÐдúÂë¾Í¿ÉÒÔÁË£¬ÓÚÊÇÎÒÊÔÁËһϣ¬»¹ÕæµÄÐÐÁË¡£ÏÖÔÚÎÒ°Ñ×Ô¼º½â¾öÕâ¸öÎÊÌâµÄÁ½ÖÖ°ì·¨·ÖÏí¸ø´ó¼Ò£¬Ï£ÍûÄܰﵽºÍÎÒÒ»ÑùÓöµ½ÀàËÆÎÊÌâµÄÈËÃÇ¡£
·½·¨Ò»£ºÎÒÃÇ¿ÉÒÔÔÚphp.iniÎļþÖаÑmemory_limit²ÎÊýĬÈϵÄ128MÐÞ¸ÄΪ256M»òÕ߸ü´ó£º
memory_limit = 128M
·½·¨¶þ£ºÈç¹ûÊÇÐéÄâÖ÷»ú£¬ÎÒÃÇ¿ÉÒÔÔÚ³ÌÐòÐèÒªÓõ½´óÄÚ´æµÄµØ·½Ìí¼Ó£º
init_set("memory_limit", "128M");
ÕâЩ¿ÉÒÔÔÚÓ²¼þ»·¾³·½Ãæ½â¾öÎÒÃǵÄÎÊÌ⣬²»¹ý×îºÃµÄ·½·¨»¹ÊÇÑϸñ¿ØÖƳÌÐòÖÐÄÚ´æµÄËðºÄ¡£¼°Ê±unsetһЩ´ó¶ø²»ÓõıäÁ¿»ò¶ÔÏó¡£
Ïà¹ØÎĵµ£º
/*
ÓÃPHPµÄDOM¿Ø¼þÀ´´´½¨XMLÊä³ö
ÉèÖÃÊä³öÄÚÈݵÄÀàÐÍΪxml
*/
header('Content-Type: text/xml;');
//´´½¨ÐµÄxmlÎļþ
$dom = new DOMDocument('1.0', 'utf-8');
//½¨Á¢<response>ÔªËØ
$response = $dom->createElement('response');
$dom->appendChild($response);
//½¨Á¢<books>ÔªËØ²¢½«Æä×÷ ......
×òÌì»Ø¼ÒÀ´£¬½ñÌì´ÖÂÔ¿´ÁËһϡ¶´óµÀPHP¡·£¬ÊéºÜϸ£¬C++µÄÒ²ÊÇ´ó¸Å¿´ÁËһϣ¬×ÜÖ®£¬ÊÕ»ñ²»´ó£¬Ò²ÐíµÚÒ»ÌìµÄÔµ¹Ê°É¡£
±ØÐëÅųý¸ÉÈÅ£¬ËÀÐÄÌ£µØµÄѧϰÁË£¬¸ßЧµÄÍê³Éº®¼ÙµÄÈÎÎñ£¬PHPºÍC++»ù±¾¹¦£¬VC++£¬MFC£¬¿ÉÄܵϰ£¬·ÖÎöÒ»ÏÂDizcussÒ²ÊDz»´íµÄ£¬Ñø³ÉÁ¼ºÃµÄ±à³Ì·ç¸ñºÍϰ¹ß¡£Ï°ëÄ꣬ ......
phpÌØÊâ×Ö·û¹ýÂË
1¡¢¹ýÂ˱êÇ©(HTML)£ºstrip_tags()
ÀýÈ磺
<?php
$text = '<?php ?><p>Test paragraph.</p><!-- Comment -
-> <a href=http://topic.csdn.net/u/20090311/09/"#fragment">Other text</a>';
echo strip_tags($text);
echo "\n";
// ÔÊÐíʹÓÃ<p>ºÍ< ......
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À´ÊÍ·ÅÄÚ´æ¡£Çø±ðÔÚÓÚ£¬Ç°Õß ......
ÔÚ PHP Öб¾Éí´øÓÐÒ»¸öÓà C ÓïÑÔʵÏÖµÄ xmlrpc À©Õ¹£¬½Ð
xmlrpc-epi¡£ÒòΪËüÊÇÓà C ÓïÑÔʵÏֵģ¬ËùÒÔ´ÓËÙ¶ÈÉÏÀ´Ëµ±ÈÓà PHP ʵÏÖµÄÄÇЩ xmlrpc
À©Õ¹Òª¿ìµÄ¶à¡£µ«ÊÇÔÚʵ¼ÊÓ¦ÓÃÖÐÈ´·¢ÏÖºÜÉÙÓÐÈËÓÃÕâ¸öÀ©Õ¹£¬´ó¶¼ÊÇÓà PHP ½Å±¾ÊµÏÖµÄ xmlrpc
µÄÀ©Õ¹¡£ÔÒò¿ÉÄÜÓÐÒÔÏÂÁ½µã£ºÒ»ÊÇÕâ¸öÀ©Õ¹ÐèÒªÔÚ·þÎñÆ÷ÉÏ´ò¿ª£¬Èç¹ûûÓзþÎñÆ÷² ......