有关文本操作的请教!

cxx 2001-12-20 11:28:42
<%
testfile=Server.Mappath("testfile.txt")
Set fs = CreateObject("Scripting.FileSystemObject")
set a=fs.opentextfile(testfile,1,false,false)
num=a.readline
a.close

testfile=Server.Mappath("testfile.txt")
Set fs = CreateObject("Scripting.FileSystemObject")
set b=fs.opentextfile(testfile,true,false)
application.lock
num=num+1
b.writeline(num)
application.unlock
b.close



response.write(num)
%>


出错信息
HTTP 500 - 内部服务器错误
Internet Explorer
...全文
68 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
cxx 2001-12-20
  • 打赏
  • 举报
回复
set b=fs.opentextfile(testfile,true,false)改为
set b=fs.createtextfile(testfile,true,false)

好了

lazywolf 2001-12-20
  • 打赏
  • 举报
回复
set b=fs.opentextfile(testfile,true,false)改为
set b=fs.opentextfile(testfile,8,false)
fdzxb 2001-12-20
  • 打赏
  • 举报
回复
IE设置:工具>>Internet选项>>高级>>显示友好HTTP错误 选项不选中

这样能够看到详细的出错信息!

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧