中国法律网
法律通行证: 用户名: 密码:  注册
律师加盟热线:400-8919-913   律信通 律信通  
律师
公众 咨询 贴吧
律信通 案件委托
频道 房产 婚姻 交通事故 保险 建设工程 劳动
留学
公司 合同 刑事辩护 医疗 知识产权 工商
新闻 宽频 文书 常识 案例
法规 专题 杂志 百科 论文
查找全国各地律师: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 点击各城市名拼音首字母查找律师 公众找律师,信赖律信通!律师做宣传,首选律信通!
公检法司
频道直达: 法界新闻 | 公安 | 检察 | 法院 | 司法 | 工商 | 税务 | 质检 | 聚焦国土 | 矿山与安全
公检法司
明星资讯明星新闻
当前位置: 主页 > 娱乐资讯 > 明星新闻 >

静态生成LIST列表以及静态生成分页页面原理 * from produc

时间:2014-02-03 23:02来源:太空一号 作者:漂泊 中国法律网

   在 replace 一个生成文件名的标签 用 include file 包含入生成的shtml页 或者只写入一个页面 一次生成

方便删除生成的页面

同理 可以用这样的方法生成 index_1.html index_2.html ......

生成的 list_1.html ...list_2.html .... 或者后缀为 .shtml

replace 字符串替换标签<$list$>想知道页页列表 <$pages$>分页

response.write"列表已全部生成!"

next

fl_w.close:set fl_w=nothing

fl_w.write(html)

'相比看列表生成文件名 list_1.htm,list_2.html ,ist_3.html...

set fl_w=fso.createtextfile(server.mappath("list_"&i&".html"),true)

html=replace(html,"<$pages$>",pages)

html=replace(html,"<$list$>",list)

fl_w.close:set fl_w=nothing

html=fl_w.readall()

set fl_w=fso.opentextfile(server.mappath("template.html")) '学习生成模板页路径 在模板需要的地方使用标签

set fso=server.createobject("scripting.filesystefrommobject")

next

response.write "<a href='list_"&j&".ht对于页面ml"&"'>"&"list_"&j&"</a>"

pages=pages&"<a href='list_"&j&".html"&"'>"&j&"</a>"

for j=1 to pcount

pages=pages&chr(13)

pages=""

loop

rs.movenext

list=list&"<li><a href='"&rs("newsID")&".html'>"&rs("Title")&"</a></li>"

do while not rs.eof

list=list&chr(13)

list=""

rs.open sql,conn,1,1

set rs=server.createobject("adodb.recordset")

end if

sql="select top "&psize&" * from products where newsid> (select max(newsID) from (select top "&psize*(i-1)&" newsid from products) as maxid)"

else

sql="select top "&psize&" * from products"

if i=1 then

for i=1 to pcount

end if

set rs=nothing

rs.close

pcount=ceiling(rscount/psize)''*计算总页数

rscount=rs(0)

else

response.end

response.write"没有记录, set rs=nothing

rs.close

produc

if rs.eof then

set rs=conn.exe看着生成cute(sql)

sql="select count(*) from products"

psize=1

end function

end if

ceiling=str

else

ceiling=str1+1

if str-str1>0 then

str1=int(str)

function ceiling(str)

conn.open connstr

set conn=Server.Createobject("ADODB.Connection")

connstr="driver={SQL server};server=(local);uid=sa;pwd=;database=date"

on error resume next

dim conns听听*tr

dim conn

-------------------------------------

<$pages$>

</div>

</ul>

<$list$>

<ul>

<div id="n我不知道分页av">

<link rel="stylesheet" type="text/css" href="css/style.css" />

template.html


看看原理对于list
静态生成LIST列表以及静态生成分页页面原理
相比看produc
成分静态生成LIST列表以及静态生成分页页面原理
听听from
静态
你知道静态
相比看以及
(责任编辑:admin)
------分隔线----------------------------
免费法律咨询 在线提交,三十分钟内百分百回复!
中国法律网 版权所有 邮箱:service@5Law.cn 建议使用:1024x768分辨率,16位以上颜色 | 京ICP备2023040428号-1联系我们 有事点这里    [切换城市▲] 公司法
400-8919-913 工作日:9:00-18:00
周 六:9:00-12:00

法律咨询5分钟内回复
请用微信扫描二维码
关闭

关注网站CEO微信,与CEO对话