ximalangyashan 2023-04-13 21:46 采纳率: 98.9%
浏览 6
已结题

Microsoft VBScript 运行时错误 错误 '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

  • 写回答

3条回答 默认 最新

  • CSDN专家-showbo 2023-04-13 22:01
    关注

    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
    %>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 4月21日
  • 已采纳回答 4月13日
  • 创建了问题 4月13日

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度