网站后台添加文章,出现ADODB.Stream 错误 '800a0bbc'

添加完文章显示../article/599.html-->OkADODB.Stream错误'800a0bbc'写入文件失败。D:\CLIENTWEB\HOUNING\WW... 添加完文章显示
../article/599.html --> Ok

ADODB.Stream 错误 '800a0bbc'

写入文件失败。

D:\CLIENTWEB\HOUNING\WWWROOT\HOUNING\../AppCode/fun/CreateHtml.asp,行 17
显示文件添加成功,但主页上打开是没有这页的,‘找不到主页’
哪里出错了!!
下面是上面提到出错的代码,高手帮忙分析下!!
<%
Html_SysSiteUrl = GetPageUrlPath()

'生成静态页面
Private Sub ToHtml(FromURL,FilePath)
Response.Write("<a href=""" & FilePath & """ target=""_blank"">" & FilePath & " --> Ok</a><br>")
FilePath = Server.MapPath(FilePath)
Set objXmlHttp=Server.createObject("Microsoft." & "XMLHTTP")
objXmlHttp.open "GET",FromURL,false
objXmlHttp.send()
binFileData=objXmlHttp.responseBody
Set objXmlHttp = Nothing
Set objAdoStream=Server.createObject("ADODB." & "Stream")
objAdoStream.Type=1
objAdoStream.Open()
objAdoStream.Write(binFileData)
objAdoStream.SaveToFile FilePath,2
objAdoStream.Close()
Set objAdoStream = Nothing
End Sub

Private Sub Index_Html()
FromURL = Html_SysSiteUrl & "../index.asp?rnd=" & Now()
FilePath = "../index.html"
Call ToHtml(FromURL,FilePath)

FromURL = Html_SysSiteUrl & "../c/rss.asp?rnd=" & Now()
FilePath = "../rss.xml"
Call ToHtml(FromURL,FilePath)
End Sub

Private Sub Ads_Html()
FromURL = Html_SysSiteUrl & "../inc/ads.asp?rnd=" & Now()
FilePath = "../a2j/astr.js"
Call ToHtml(FromURL,FilePath)
End Sub

'==========================生成新闻文章静态页===================================
Private Sub Article_Page_Html(ID)
Sql="select top 1 ID,ChannelID,Content from Ok3w_Article where IsPass=1 and IsDelete=0"
If ID<>"" Then Sql=Sql& " and ID=" & ID
Sql=Sql & " order by ID desc"
Set oRs = Conn.Execute(Sql)
h_ID = oRs(0)
ChannelID = oRs(1)
Content = oRs(2)
oRs.Close
Set oRs = Nothing

If InStr(Content,"[Ok3w_NextPage]")>0 Then
Content_Tmp = Split(Content,"[Ok3w_NextPage]")
Page_Count = Ubound(Content_Tmp)+1
Else
Page_Count = 1
' cLen = Len(Content)
' If cLen Mod 2000 = 0 Then
' Page_Count = cLen \ 2000
' Else
' Page_Count = cLen \ 2000 + 1
' End If
End If

For iPage=1 To Page_Count
If iPage = 1 Then
FilePath = "../" & HTML_Article_Path & h_ID & ".html"
Else
FilePath = "../" & HTML_Article_Path & h_ID & "_" & iPage & ".html"
End If
If ChannelID=1 Then
FromURL = Html_SysSiteUrl & "../show.asp?id=" & h_ID & "&thisPage=" & iPage & "&rnd=" & Now()
Else
FromURL = Html_SysSiteUrl & "../about.asp?id=" & h_ID & "&thisPage=" & iPage & "&rnd=" & Now()
End If
Call ToHtml(FromURL,FilePath)
Next
End Sub

'=======================生成文章列表
展开
 我来答
kf8002
2010-07-22 · TA获得超过135个赞
知道小有建树答主
回答量:245
采纳率:0%
帮助的人:222万
展开全部
代码应该没什么问题

据我估计,你的空间可能不支持fso所致。
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式