注册 登录
编程论坛 WEB前端(UI)

[求助]权限的问题

触电 发布于 2006-10-30 10:04, 542 次点击

[求助]关于权限的问题<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>文件存取组件</title>
</head>

<body>
<%
set fsobj=server.createobject("scripting.filesystemobject")
sourcefile=server.mappath("asp_memo.txt")
targetfile=server.mappath("new_memo.txt")

if fsobj.fileexists(sourcefile)=true then

if request("btncopy")="复制" then
fsobj.CopyFile sourcefile,targetfile
show="asp_memo.txt复制一份为new_memo.txt"

elseif request("btndel")="删除" then
fsobj.DeleteFile sourcefile,true
show="asp_memo.txt已经删除"

end if

else

show="此路径下没有asp_memo.txt文本文件"

end if
%>

<form action="c12_9_1.asp" method="post">
<h3>文件的操作</h3>
<p>操作"。。。。。。。。。。。文本文件"</p>
<p>
<input type="submit" name="btncopy" value="复制" />
<input type="submit" name="btndel" value="删除" />
</p>
<p><%=show%></p>
</form>


</body>
</html>


运行该程序总是说我没权限....为什么呢

2 回复
#2
触电2006-10-30 10:05

Microsoft VBScript 运行时错误 错误 '800a0046'

没有权限

/ch12/c12_9_1.asp,行 17

#3
风过无影2006-11-01 19:09

找到网站的根目录;右键--属性--安全--高级中-加一个用户everyone并且选择完全控制
试试下;
你的可能要这个用户

1