WindowsXPËÑË÷PHP¡¢XMLµÈÎļþÄڵİüº¬ÎÄ×ÖµÄÉèÖ÷½·¨
µ±ÎÒÃÇÓÃWINDOWSËÑË÷ij°üº¬Ä³ÎÄ×ÖµÄÎļþʱ£¬¿ÉÒÔÔÚ“°üº¬ÎÄ×Ö”´¦ÌîÉÏËÑË÷´Ê¡£µ«ÊÇһЩ²»³£¼ûµÄºó׺ÃûÎļþWINDOWS²»»áËÑË÷£¬È磺£¬.log¡¢.dll¡¢.js¡¢.asp¡¢.xml¡¢.xsl¡¢.hta¡¢.css¡¢.wsh¡¢.cpp¡¢.c »ò .hµÈ¼°ÎÞºó׺ÃûµÄÎļþ¡£¶ÔÓÚÎҵȳÌÐò°®ºÃÕßÀ´ËµÊµÔÚÌ«²»·½±ãÁË£¬ËäÈ»ÓГÎı¾Ìæ»»´óʦ”µÈÈí¼þÄÜ×öÕ⹤×÷£¬µ«ÓÐʱ»¹ÊÇÖ±½ÓÓÃWIN·½±ã¡£
½â¾ö°ì·¨ÊÇ£¬ÐÞ¸Ä×¢²á±í£º
´òµ½ÈçÏÂ×Ó¼ü£º
HKEY_LOCAL_MACHINE \ SYSTEM\CurrentControlSet \ Control\ContentIndex
½«¡¡“FilterFilesWithUnknownExtensions”µÄ¡¡DWORD ÖµÉèÖÃΪ 1¡£
¸ã¶¨
Ïà¹ØÎĵµ£º
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml;
namespace WebApplication2
{
/// <summary>
/// XMLHelper XMLÎĵµ²Ù×÷¹ÜÀíÆ÷
&nb ......
/*
ÓÃ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>ÔªËز¢½«Æä×÷ ......
XMLµÄ²úÉú?
XMLµÄÈ«³ÆÊÇExtensible Markup Language,Òâ˼ÊÇ¿ÉÀ©Õ¹µÄ±ê¼ÇÓïÑÔ£¬ËüÊDZê׼ͨÓñê¼ÇÓïÑÔ(Standard Generalized Markup Language, SGML)µÄÒ»¸ö×Ó¼¯¡£SGML¹¦Äܷdz£Ç¿´ó£¬ÊÇ¿ÉÒÔ¶¨Òå±ê¼ÇÓïÑÔµÄÔªÓïÑÔ¡£
W3C×éÖ¯ÓÚ2004Äê2ÔÂ4ÈÕ£¬·¢²¼ÁËXML1.1µÄÍƼö±ê×¼£¬ÕâÊÇ×îеÄXML°æ±¾£¬²»¹ýÄ¿Ç°´ó¶àÊýµÄÓ¦Óû¹ÊÇ»ùÓÚXML1.0µÄ ......
XmlDocument doc = new XmlDocument();
XmlDeclaration dec = doc.CreateXmlDeclaration("1.0", "GB2312", null);
doc.AppendChild(dec);
//´´½¨Ò»¸ö¸ù½Úµã£¨Ò»¼¶£©
XmlElement root = doc.CreateElement("First");
doc.AppendChild(root);
//´´½¨½Úµã£ ......