为什么提示说找不到文件?
我建了一个虚拟目录practice,并在practice根目录里面建了一个number.txt文件
以下是代码:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<%
sub numberappend()
set file=server.createobject("scripting.filesystemobject")
set numtxt=file.opentextfile(server.mappath("/number.txt"))
application("number")=numtxt.readline
numtxt.close
application("number")=application("number")+1
response.write application("number")
set numtxt=file.creattextfile(server.mappath("/number.txt"),true)
numtxt.writeline(application("number"))
numtxt.close
end sub
application.lock
numberappend
application.unlock
%>
</body>
</html>
提示错误说:
Microsoft VBScript 运行时错误 错误 '800a0035'
文件未找到
/practice/TMP7zcb9niq89.asp, 行11
问题点数:20、回复次数:4Top
1 楼karma(无为MS MVP)回复于 2001-11-27 12:15:05 得分 5
change
server.mappath("/number.txt")
to
server.mappath("number.txt")
Top
2 楼ynduanlian(进一步海阔天高,退一步粉身碎骨)回复于 2001-11-27 12:51:27 得分 5
karma(无为) 与说得对。Top
3 楼huang_2(叽叽喳喳)回复于 2001-11-27 13:11:14 得分 5
当我server.mappath("/number.txt") to server.mappath("number.txt") 后又出现新的错误:
Microsoft VBScript 运行时错误 错误 '800a003e'
输入超出了文件尾
/practice/TMPa6m8cnit2z.asp, 行12
Top
4 楼karma(无为MS MVP)回复于 2001-11-27 13:19:46 得分 5
opentextfile(server.mappath("number.txt"),2, True) 'for writing
Top
相关问题
- 控件为什么总是提示xxx.dcu文件找不到?
- 为什么老是提示没有找到“system.pas”文件!SOS!急!
- 为什么tomcat老是提示找不到class文件呢?
- 为什么总是提示fr_class.pas文件找不到???
- 为什么老是提示找不到包含文件
- 为什么会提示dll文件找不到,疑惑中
- 安装Outlook等控件时为什么老是提示Dsgnintf.dcu文件找不到??????
- <!--#include file="..\common\getRData.asp"-->为什么总是提示找不到文件,没错呀
- 50请教大师了:包含文件写法,为什么总提示找不到连接文件?
- 请问windows2003访问asp文件会提示系统找不到指定的文件。是为什么?




