楚河之界 2022-09-28 16:14 采纳率: 100%
浏览 25
已结题

asp 错误 '800a000d' 怎么解决

asp 错误 '800a000d' 怎么解决

<%

dim file,fileop
set file=server.createobject("scripting.filesystemobject")
set fileop=file.opentextfile(server.mappath("text.txt"),1,true)
count=fileop.readline()
fileop.close
 
set fileop=file.opentextfile(server.mappath("text.txt"),1)
count=count+1
fileop.write count
response.write count
fileop.close
%>

Microsoft VBScript 运行时错误 错误 '800a000d'
类型不匹配: 'count'
/计算器.asp,行 8

  • 写回答

4条回答 默认 最新

  • CSDN专家-showbo 2022-09-28 16:20
    关注

    count=fileop.readline()这句读出的数据不是数字,自己加下判断不是数字初始化为0

    <%
    dim file,fileop
    set file=server.createobject("scripting.filesystemobject")
    set fileop=file.opentextfile(server.mappath("text.txt"),1,true)
    count=fileop.readline()
    fileop.close
    if not isnumeric(count) then count=0'判断不是数字初始化为0
    set fileop=file.opentextfile(server.mappath("text.txt"),2)'1只读,你要写回内容要用2,要不报错
    count=count+1
    fileop.write count
    response.write count
    fileop.close
    %>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

问题事件

  • 系统已结题 10月6日
  • 已采纳回答 9月28日
  • 创建了问题 9月28日

悬赏问题

  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥50 我撰写的python爬虫爬不了 要爬的网址有反爬机制
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据