最近我做XML存储的时候老出现这种讨厌的错误。现在把解决经验总结了一下与大家分享。
现象:
解决方法
1,首先确认你的 Save存储方法中填写的是物理绝对路径:
举例说明一下,下面这段代码是正确的:
<%
Set objXMLdoc =Server.CreateObject("MSXML.DOMDocument")
objXMLdoc.Async=False
objXMLdoc.ValidateOnParse=False
objXMLdoc.Load(Server.mappath("123.xml"))
If objXMLdoc.ReadyState=4 Then
If objXMLdoc.parseError.errorCode = 0 Then
ParseLoad=true
Else
Response.Write objXMLDoc.parseError.reason & "Error code: " & objXMLDoc.parseError.errorCode & "Line: "& objXMLDoc.parseError.Line & ", Character: " & objXMLDoc.parseError.linepos & ", Source: " &objXMLDoc.parseError.srcText & " - " & Now & vbCrLf
End If
End If
objXMLdoc.Save(Server.mappath("123.xml"))
%>
如果你把最后一行写成这样就不正确了:
objXMLdoc.Save("123.xml")
2,其次,必须在IIS中执行一次权限向导
截图说明如下:
下一步:
下一步
是
下一步
完成
都是FAT32 没权限-。-
)
绝对路径问题,我记得要加\ server.path("\123.xml")
直接server.path("123.xml")有时取不到(文件不存在时?
真的嘛
真的嘛
不错
很好
sdsada
sds
I just want to tell you that I am just all new to weblog and certainly enjoyed this blog. More than likely I’m going to bookmark your site . You surely have exceptional posts. Kudos for sharing with us your blog.
Hi! Do you use Twitter? I’d like to follow you if that would be okay. I’m definitely enjoying your blog and look forward to new updates.
I am actually keen of reading content regarding building up new web site, or even regarding Web optimization.
Wow! Thank you! I continually needed to write on my blog something like that. Can I include a part of your post to my site?
Hello There. I discovered your weblog the use of msn. That is an extremely smartly written article. I will be sure to bookmark it and come back to learn more of your helpful information. Thank you for the post. I will definitely comeback.
It’s laborious to search out educated individuals on this topic, however you sound like you understand what you’re speaking about! Thanks