近日按照《Python编程金典》16.2节 一个XML论坛的例子写好了论坛的代码(参见肥肥世家《Python编程金典》读书笔记16章)。
在IIS6.0下这个论文可以很好的运行起来,但是在运行到addForums.py和addPost.py的时候都出现了如下错误:
The page cannot be found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
--------------------------------------------------------------------------------
Please try the following:
If you typed the page address in the Address bar, make sure that it is spelled correctly.
Open the localhost home page, and then look for links to the information you want.
Click the Back button to try another link.
HTTP 404 - File not found
Internet Information Services
经过仔细分析后发现是代两个py文件中都有一个 r+
forumFile = open( "../htdocs/XML/" + filename, "r+" ) # 在addPost.py中
forumsFile = open( "XML/forums.xml","r+" ) # 在addForums.py中
原因好像是在访问Web的时候不能采用r+来打开对应的文件。后来我把web对应的虚拟目录全部的权限都打开,结果还是不能解决这个问题。
不知道各位大虾们有人解决过这个问题么?小弟很着急,特向大家求助!先谢谢啦~!
没有评论:
发表评论