请帮我看看这段ASP代码有什么问题

xiechq 2005-12-12 09:01:33
<%
set file1=Server.CreateObject("Scripting.FileSystemObject")
set text1=file1.opentextfile(".\status.txt")
webstatus=text1.readline
if (webstatus="offline") then
response.redirect("error.html")
end if
text1.close
file1=nothing
%>
...全文
91 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
KimSoft 2005-12-13
  • 打赏
  • 举报
回复
set text1=file1.opentextfile(".\status.txt")
这儿好象要指定绝对路径
你换成这样试试
set text1=file1.opentextfile(Sever.Mappath("status.txt"))
szlzc 2005-12-13
  • 打赏
  • 举报
回复
<%
set file1=Server.CreateObject("Scripting.FileSystemObject")
set text1=file1.opentextfile(".\status.txt")
webstatus=text1.readline
if (webstatus="offline") then
response.redirect("error.html")
end if
text1.close
Set file1 = nothing
%>
wanglh100 2005-12-12
  • 打赏
  • 举报
回复
Set file1 = nothing
xiechq 2005-12-12
  • 打赏
  • 举报
回复
?
xiechq 2005-12-12
  • 打赏
  • 举报
回复
我想用一段代码读一个文件里的内容,如果是offline(下线)就定位到出错网页,否则显示页面
ybfqlyq 2005-12-12
  • 打赏
  • 举报
回复
你想做什麼??要怎麼樣做??

28,406

社区成员

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

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