sqln="select top 1 * from vArticle where apage='"&abname&"'"
rsn.open sqln,conn,1,1
if not rsn.eof then
'do while not rsn.eof
'page_n=len(rsn("aContent"))-len(replace(rsn("aContent"),"[NextPage]",""))
page_n=split(rsn("aContent"),"[NextPage]")
for i=1 to Ubound(page_n)+1
sql="select * from hy_moban where mname='资讯内页'"
rs.open sql,1
okfile=rs("mcontent")
rs.close
set rs=nothing
'if i=1 then
'ppage=1
'else
'ppage=i-1
'end if
'if i=1 and page_n+1>i then
'npage=i+1
'else
'npage=page_n+1
'end if
aFrom=split(rsn("aFrom")&"|","|")
if aFrom(0)="" then
naFrom="未知"
else
naFrom=aFrom(0)
end if
k=i-1
NTitle=rsn("aTitle")&"|"&rsn("akeyword")
okfile=replace(okfile,"$NTitle$",NTitle)
okfile=replace(okfile,"$C_Title$",rsn("C_Title"))
okfile=replace(okfile,"$aTitle$",rsn("aTitle"))
okfile=replace(okfile,"$acount$",rsn("acount"))
okfile=replace(okfile,"$aIntime$",rsn("aIntime"))
okfile=replace(okfile,"$aFrom$",naFrom)
okfile=replace(okfile,"$aContent$",page_n(k))
okfile=replace(okfile,"$aInUser$",rsn("aInUser"))
apage=replace(rsn("apage"),".sHTML","")
asetpage=""
for j=1 to Ubound(page_n)+1
if j=i then
asetpage=asetpage&"["&i&"]"
elseif j=1 then
asetpage=asetpage&"[]"
else
asetpage=asetpage&"["&j&"]"
end if
next
'asetpage="
"
okfile=replace(okfile,"$aSetpage$",asetpage)
myear=year(rsn("aInTime"))&"-"&month(rsn("aInTime"))
if i=1 then
mypage=rsn("apage")
else
mypage=apage&"-haowai-"&i&".sHTML"
end if
Set fso1 = Server.CreateObject("Scripting.fileSystemObject")
Set fout1 = fso1.Createtextfile(Server.MapPath("/"&"article/"&myear&"/"&mypage),true)
fout1.writeline okfile
fout1.close
'rsn.movenext
'loop
next
end if
rsn.close
set rsn=nothing
以上是内存溢出为你收集整理的超长文章分页并生成静态页实例全部内容,希望文章能够帮你解决超长文章分页并生成静态页实例所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)