用FSO读出的文章,如何分页
这里把读出来
mypath=trim(rs2("new_info"))
set fso=server.CreateObject("scripting.filesystemobject")
if not fso.fileexists(mypath) then
set ts=fso.OpenTextFile(server.MapPath(mypath),1,true)
response.write ts.readall 这里显示,
ts.close
set ts=nothing
end if
如果,文章过长,我怎么分页啊
有人说用算字数的方法,,可是在我的文件里还有HTML的代码都要给算进去了,有什么方法可以分页呢,
谢谢能给个全点的
<%
aabb=request.querystring("aabb")/1
if aabb="" or aabb<0 then aabb=0
set ff=server.createobject("scripting.filesystemobject")
set fff=ff.opentextfile("f:/asp/66.txt")
do while not fff.atendofstream
fff.skipline
bb=bb+1
loop
fff.close
set fff=ff.opentextfile("f:/asp/66.txt")
aa=(bb+9)\10
if aabb=aa then aabb=aabb-1
jj=aabb*10
while jj>0
fff.skipline
jj=jj-1
wend
response.write "<a href='jj.asp?aabb="&aabb-1&"'>上一页</a> <a href='jj.asp?aabb="&aabb+1&"'>下一页</a> "
response.write "<a href='jj.asp?aabb=0'>首页</a> <a href='jj.asp?aabb="&aa-1&"'>尾页</a> 共"&aa&"页 第"&aabb+1&"页<br>"
for i=1 to 10
response.write fff.readline&"<br>"
if fff.atendofstream then exit for
next
%>
这里我先谢谢了,不过有点问题,读出来的图片有的没了,或读不出来,
有没有别的方法了谢谢
<%
aabb=request.querystring("aabb")/1
if aabb="" or aabb<0 then aabb=0
set ff=server.createobject("scripting.filesystemobject")
set fff=ff.opentextfile("f:/asp/66.txt")
do while not fff.atendofstream
fff.skipline
bb=bb+1
loop
fff.close
set fff=ff.opentextfile("f:/asp/66.txt")
aa=(bb+9)\10
if aabb=aa then aabb=aabb-1
jj=aabb*10
while jj>0
fff.skipline
jj=jj-1
wend
response.write "<a href='jj.asp?aabb="&aabb-1&"'>上一页</a> <a href='jj.asp?aabb="&aabb+1&"'>下一页</a> "
response.write "<a href='jj.asp?aabb=0'>首页</a> <a href='jj.asp?aabb="&aa-1&"'>尾页</a> 共"&aa&"页 第"&aabb+1&"页<br>"
for i=1 to 10
response.write fff.readline&"<br>"
if fff.atendofstream then exit for
next
%>
<%
aabb=request.querystring("aabb")/1
if aabb="" then aabb=0
set ff=server.createobject("scripting.filesystemobject")
set fff=ff.opentextfile("f:/asp/66.txt")
do while not fff.atendofstream
fff.skipline
bb=bb+1
loop
fff.close
set fff=ff.opentextfile("f:/asp/66.txt")
aa=(bb+9)\10
if aabb=aa then aabb=aabb-1
jj=aabb*10
while jj>0
fff.skipline
jj=jj-1
wend
response.write "共"&aa&"页 <a href='jj.asp?aabb="&aabb+1&"'>下一页</a> 第"&aabb+1&"页<br>"
for i=1 to 10
response.write fff.readline&"<br>"
if fff.atendofstream then exit for
next
%>