打开的文档为什么是只读的?

xingyv2013 2018-03-06 03:55:39
IIS7.5+ WINDOWN2008 R2
文件所在目录已加入 所有用户可以读写。IIS中还需要哪里设置

response.contenttype="text/html"%>
<script>
function opendoc(f)
{
wordapp=new ActiveXObject("Word.Application");
wordapp.Visible=true;
wordapp.Documents.Open(f);
wordapp.username="<%=session("name")%>";
wordapp.Activate();
document.all.WebBrowser.ExecWB(45,1);
}
</script>
<object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object>
<%
fjname=request("fjname")
set objfs = CreateObject("Scripting.FileSystemObject")
p0=server.MapPath("model.doc")
p1=server.MapPath(fjname)
if objfs.FileExists(p0) then
if not objfs.FileExists(p1) then
objfs.copyfile p0,p1

end if
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
opendoc("http://<%=request.servervariables("server_name")%>/jdfz/sapcxkf/<%=fjname%>");
//-->
</SCRIPT>
<%
else
response.write "对不起!开发需求模板不存在,请与管理员联系!"
end if
set objfs=nothing
%>
...全文
554 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

8,327

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 IIS
社区管理员
  • IIS
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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