我正在使用 SUN One(以前称为 Chillisoft)服务器托管的 ASP 站点上工作。我在加载 XML 文件时遇到问题,我使用的代码如下
dim directory
set directory = Server.CreateObject("MSXML2.DOMDocument")
if(directory.load(Server.MapPath("directory.xml"))) then
Response.Write("Loaded")
else
Response.Write("NotLoaded")
If directory.parseError.errorCode Then
Response.Write( "Parse error" )
end if
end if
我的 asp 页面和 directory.xml 都在同一个文件夹“/public_html/”中。
我认为问题可能与 mappath 找不到文件有关,但没有返回错误,所以不知道该怎么做。
谢谢