南京排名推广(南京产品推广)
35
2022-12-13
本文目录一览:
html网页模板就是用已经成形的网站为框架进行套用,可以在后台进行设置网站的一些信息,把这个网站改变成自己需要的网站信息。你可以在HTML网页模板中进行下载,这种一般是静态的页面,你如果想搭建整站可以使用cms系统。
如果你做的首页模板不需要调用cms的数据,那么随便弄一个html文件,首页可以设为跟cms不同默认静态页文件后缀不同即可,或者更改虚拟主机的默认首页名称和顺序,比如,你可以在你的虚拟主机上设你的首页为star.html,index.html,star.html排在最前就可以了
1、ASP文件中的代码
pencat=rs.Fields.Item("m_content").Value
pencat=replace(pencat,"t_title",n_title)
pencat=replace(pencat,"t_author",n_author)
pencat=replace(pencat,"t_content",n_content)
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath(fpath "\" fname))
fout.WriteLine pencat
fout.close
2、如下给出要生成的网页模板:
html
head
meta http-equiv=""Content-Language"" content=""zh-cn""
meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312""
meta name=""GENERATOR"" content=""Microsoft FrontPage 4.0""
meta name=""ProgId"" content=""FrontPage.Editor.Document""
title/title
/head
body topmargin=""0"" leftmargin=""0""
table border=""0"" width=""760"" height=""100%"" background=""background.jpg""
tr
td width=""752"" height=""10"" colspan=""3""
p align=""center""t_title
/td
/tr
tr
td width=""752"" height=""18"" colspan=""3""
div align=""center""
/div
div align=""center""
font size=""2""
作者:/fontfont color=""#990000""t_author/font
font size=""2""
加入时间:/fontfont color=""#990000""t_date/font
/div
/td
/tr
tr
td width=""15%"" height=""100%"" valign=""top""
/td
td width=""70%"" height=""100%"" valign=""top""
t_content
/td
td width=""15%"" height=""100%"" valign=""top""
/td
/tr
/table
/body
/html
3、解释
(1)pencat=rs.Fields.Item("m_content").Value
pencat为一个字符串变量。
rs.Fields.Item("m_content").Value就是如上2、网页模板的全部HTML字符
(2)pencat=replace(pencat,"t_title",n_title)
pencat=replace(pencat,"t_author",n_author)
pencat=replace(pencat,"t_content",n_content)
以上三句就是将字符串中的字串替换成为你所需要的内容,即ASP中动态获得的内容。
(3)Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath(fpath "\" fname))
fout.WriteLine pencat
fout.close
以上为将刚刚组合所得的网页代码写入文件的过程。第一句定义fso文件,第二句创建输出流文件,其中fpath为你想要存储的文件的路径,fname为文件名;后两句是将字符串写入文件和关闭输出流文件。
CmsEasy_可视化编辑网站系统_适合企业网站建设_网站制作_快速建站
网站内有近二百套免费模版,样式精美,可根据不同的企业行业进行筛选,找到最适合公司的一套模版,带有cmseasy网站程序后台,可在后台对网站前端内容进行修改更新,帮助打造更精美的企业官网。
metinfo.cn/product/ 响应式网站模板,不妨到这一看。我喜欢用这个网站的原因是他的很多模板都是免费的,最主要的一点是,这个网站的页面非常的好看,对于我这个非常喜欢完美的人来说,这个网站满足了我对模板的需求。
官网html模板的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于html模板免费下载、官网html模板的信息别忘了在云尚网络www.ysfad.net进行查找喔。
发表评论
暂时没有评论,来抢沙发吧~