为什么执行这些语句iis就崩溃

citymice 2003-03-31 06:25:14
'产生filesystemobject对象,生成inc问见

rent_list_html="test"

Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath("rent_list.inc"))
fout.WriteLine rent_list_html
fout.close

我在我自己的windows 2000 professional上执行之后

iis就崩溃了,必须重新启动iis才能浏览网页

但是同样的语句我上传到我的虚拟主机上就没有一点问题,而且指定地方生成了文件

为什么我自己的电脑不行了
...全文
39 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
孟子E章 2003-03-31
  • 打赏
  • 举报
回复
server.mappath("rent_list.inc")目录有创建的权限吗》
zhuyngjie 2003-03-31
  • 打赏
  • 举报
回复
代码有问题
给你个函数"
'使用FSO写文件某一行的函数
function FSOlinewrite(filename,lineNum,Linecontent(
if linenum<1 then exit function
dim fso,f,temparray,tempCnt
set fso=server.CreateObject("scripting filesystemobject")
if not fso.fileExists(server.mappath(filename)) then exit function
set f=fso.opentextfile(server.mappath(filename),1)
if not f.AtEndofStream then
tempcnt=f.readall
f.close
temparry=split(tempcnt,chr(13)&chr(10))
if lineNun>ubound(temparray)+1 then
exit function
else
temparray(lineNum-1)=lineContent
end if
tempcnt=join(temparray,chr(13)&chr(10))
set f=fso.createtextfile(server.mappath(filename),true)
f.write tempcnt
end if
f.close
set f=nothing
end function

28,391

社区成员

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

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