现在出现的问题如下:
Server 对象 错误 'ASP 0177 : 800401f3'
Server.CreateObject 失败
/chinaii/manage/news/save.asp,行 23
800401f3
是什么原因啊..下面是原代码:
<!--#include file="../inc/session.asp"-->
<!--#include file="../inc/conn.asp"-->
<%Dim sContent1, i,file_name
function MakedownName()
dim fname
fname = now()
fname = replace(fname,"-","")
fname = replace(fname," ","")
fname = replace(fname,":","")
fname = replace(fname,"PM","")
fname = replace(fname,"AM","")
fname = replace(fname,"上午","")
fname = replace(fname,"下午","")
fname = int(fname) + int((10-1+1)*Rnd + 1)
MakedownName=fname
end function
file_name=MakedownName&"."&"html"
formPath="../../html/"&file_name
if request.form("title")<>"" and request.form("newstype")<>"" and request.form("content")<>"" then
For i = 1 To Request.Form("content").Count
sContent1 = sContent1 & Request.Form("content")(i)
Next
Set Fos=server.CreateObject ("Scripting.FilesystemObject") '创建文件接口
Set DFile=Fos.CreateTextFile(Server.MapPath(formPath))
DFile.Write sContent1
Set Fos=nothing
set rs=server.createobject("adodb.recordset")
if request("id")<>"" then
sql="select * from [news] where id="&request("id")
rs.open sql,conn,1,3
else
sql="select * from [news]"
rs.open sql,conn,1,3
rs.addnew
end if
rs("newstitle")=request.form("title")
rs("newstype")=request.form("newstype")
rs("content")=sContent1
rs("addtime")=date()
if session("sortid")<>"" then
rs("sortid")=session("sortid")
end if
if session("typeid")<>"" then
rs("typeid")=session("typeid")
end if
rs("url")=file_name
if request.form("groupid")<>"" then
rs("groupid")=request.form("groupid")
end if
if request("tj")<>"" then
rs("tj")=request.form("tj")
end if
if session("type_id")<>"" then
rs("type_id")=session("type_id")
end if
rs.update
rs.close
set rs=nothing
response.write"<script language=javascript>alert('恭喜你,发布成功!');"
response.write"this.location.href='default.asp';</script>"
else
response.write"<script language=javascript>alert('请你输入完整的信息!');"
response.write"this.location.href='javascript:history.back();';</SCRIPT>"
end if
%>
请多帮助在线等............