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

php ÓÃdomÊä³öxmlÏà¹Ø ÎÊÌâ

ÓÃdom×Ô¶¯Éú³ÉxmlÎĵµ£¬ÀïÃæÓÃÁ˸öcreateCDATASectionÕâ¸öº¯ÊýÓÃÀ´Éú³Écdata¡£µ«Êǽá¹ûÏÔʾʱ£¬cdataÀïµÄÖÐÎÄÎÞ·¨ÏÔʾ£¬Ó¢Îĵϰ¾Í¿ÉÒÔ£¬ÄÄλ֪µÀÔõô½â¾ö£¬°ï°ïСµÜ
ΪʲôcreateCDATASection()ÀïÓÐÖÐÎÄÎÞ·¨ÏÔʾ


Èç¹ûÎļþ±¾ÉíÊÇutf-8µÄ»°,Ö±½ÓÓÃ,Èç¹û²»ÊÇ,ÓÃiconvת»».
PHP code:
$doc = new DOMDocument("1.0",'utf-8');

$node = $doc->createElement("para");
$data = $doc->createCDATASection("ÎÒ°®PHP");
//$data = $doc->createCDATASection(iconv('gbk','utf-8',"ÎÒ°®PHP"));
$node->appendChild($data);
$newnode = $doc->appendChild($node);

echo $doc->saveXML();


»¹ÓиöÇë½ÌÏ£¬¾ÍÊDz»ÓÃÕâ¸öº¯ÊýµÄʱºò£¬±ÈÈç ÓÃdomʵÏÖ <dd>ÌìÏë </dd>  Õâ¸öµÄʱºòΪʲôÖÐÎÄÒ²²»ÄÜÏÔÊ¾ÄØ 

ÒýÓÃ
»¹ÓиöÇë½ÌÏ£¬¾ÍÊDz»ÓÃÕâ¸öº¯ÊýµÄʱºò£¬±ÈÈç ÓÃdomʵÏÖ <dd>ÌìÏë </dd>  Õâ¸öµÄʱºòΪʲôÖÐÎÄÒ²²»ÄÜÏÔÊ¾ÄØ 

ÖÐÎIJ»ÏÔʾ,¾ÍÊDZàÂëµÄÎÊÌâ.
Ò»¶¨Òª±£Ö¤ÇÒ±ØÐë,²Ù×÷µÄÖÐÎÄÊÇutf-8µÄ.

Äã˵µÄÊÇʲôÒâ˼£¬²»Ã÷°×£¬¸Õѧphp

ÒýÓÃ
Äã˵µÄÊÇʲôÒâ˼£¬²»Ã÷°×£¬¸Õѧphp

Òâ˼¾ÍÊÇ˵,dom²Ù×÷µÄÖÐÎÄÒª¶¼×ª³Éutf-8


Âé·³Äú¸ø¾Ù¸öÀý×Óߣ¬Ð»ÁË¡£


ÓеãÁ˽âÁË¡£Ð»Ð»ÁË


Ïà¹ØÎÊ´ð£º

¸¶·ÑÇóÒ»¶Îphp´úÂ룬֧³ÖÌÔ±¦½»Ò× - PHP / »ù´¡±à³Ì

¸÷λ´óÏÀ 
ÇóÒ»¶Îphp´úÂë 
¿ÉÒÔʵÏÖÒÔϹ¦ÄÜ 
Õë¶Ô²»Í¬µÄä¯ÀÀÆ÷ÏÔʾ²»Í¬µÄͼƬ 
¾ÍÊÇÓÐÒ»ÕÅͼƬ£¬Ö»Ïë¸øie6Óû§¿´µ½ 
Èç¹ûie7¡¢chrome¡¢firefoxÓû§ä¯ÀÀÔòÏÔʾÁíÍâÒ»ÕÅͼƬ  ......

¿Õ¼äÉÏphpÎļþ²»ÄÜä¯ÀÀ£¬ä¯ÀÀ¾ÍÏÂÔØphpÎļþ

ÔÚ¹úÍâµÄ¿Õ¼ä£¬ÆäËüµÄphpÕ¾µã¶¼Õý³££¬¿ÉÖ»ÓÐ×î½ü½¨µÄÕâ¸öÕ¾µã£¬Ö»ÒªÒ»ä¯ÀÀphpÎļþ¾Í³öÏÖÏÂÔØÌáʾ£¬ÏÂÔØÏÂÀ´µÄÎļþ¶¼ÊÇ´øÓÐphpÔ´Â룬¸÷λ·¹ýµÄ£¬°ï°ïÎÒ£¬¿´¿´Ê²Ã´Ô­Òò£¬ÏÈлÁË¡£
¿Õ¼ä²»Ö§³Ö¡£
»òÕßÄãµÄÕ˺ÅûÓп ......

¸¶·ÑÇóÒ»¶Îphp´úÂ룬֧³ÖÌÔ±¦½»Ò×

¸÷λ´óЩ
ÇóÒ»¶Îphp´úÂë
¿ÉÒÔʵÏÖÒÔϹ¦ÄÜ
Õë¶Ô²»Í¬µÄä¯ÀÀÆ÷ÏÔʾ²»Í¬µÄͼƬ

¾ÍÊÇÓÐÒ»ÕÅͼƬ£¬Ö»Ïë¸øie6Óû§¿´µ½
Èç¹ûie7¡¢chrome¡¢firefoxÓû§ä¯ÀÀÔòÏÔʾÁíÍâÒ»ÕÅͼƬ

¼Û¸ñ²»ÒªÌ«ÀëÆ×¾ÍÐÐ ......

ASP³ÌÐòÔ±ÈçºÎתȥ×ö PHP »ò JSP

ASP³ÌÐòÔ±ÈçºÎתȥ×ö PHP »ò JSP
Õâ½áÌùÂÊ....
ASP ×öµÃºÃµÄ»°,תPHP,Äã»á·¢ÏÖ¸ü¼òµ¥.. ¸ü·½±ã...

²î±ð²»´óÂð

PHP²»ÊÇÒªÔÚLinux ÉÏ¿ª·¢µÄÂð WindowsÉÏÓÃÌ×¼þºÃÏñ²»Êµ¼ÊÁ˵㣬¹ãLinuxÕâ¸ö¿²¾ÍÄѹýÈ¥ÁË£¬IISÓ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ