用模板生成文件示例
来源:互联网 发布:单片机湿度程序 编辑:程序博客网 时间:2024/06/08 16:04
<%...
price="ZZZZZ"
priceRed="要替换的内容"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
News_mb="gg.html" '模板页
Set news_list_mb = fso.OpenTextFile(Server.MapPath(News_mb),1)
tmpmb=news_list_mb.readall
news_list_mb.close
tmpmb=replace(tmpmb, "{price}",price)
tmpmb=replace(tmpmb, "{price}",priceRed)
filename="gg.js" '要生成的文件
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set files = fso.CreateTextFile(Server.MapPath(filename),true)
files.WriteLine tmpmb
Response.flush
files.close
%>
price="ZZZZZ"
priceRed="要替换的内容"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
News_mb="gg.html" '模板页
Set news_list_mb = fso.OpenTextFile(Server.MapPath(News_mb),1)
tmpmb=news_list_mb.readall
news_list_mb.close
tmpmb=replace(tmpmb, "{price}",price)
tmpmb=replace(tmpmb, "{price}",priceRed)
filename="gg.js" '要生成的文件
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set files = fso.CreateTextFile(Server.MapPath(filename),true)
files.WriteLine tmpmb
Response.flush
files.close
%>
- 用模板生成文件示例
- Ruby erb模板文件生成html网页的示例
- php用Smarty模板生成html文件
- php用Smarty模板生成html文件
- java用ireport模板生成PDF文件
- freemarker 模板生成 文件
- Xcode生成模板文件
- 通过模板生成静态页面示例
- jsp生成xml文件示例
- jsp生成xml文件示例
- jsp生成xml文件示例
- freemarker模板生成word文件
- 根据模板生成word文件
- 用JDOM包实现生成XML文件的简单示例
- Extjs示例的模板jsp文件
- 用MyGeneration模板生成NHibernate映射文件和关系
- 用FreeMaker和模板生成文件的方法
- 用jxl模板生成xls文件,并插入图片
- 如何用CSC.exe来编译C#程序!
- MYSQL limit的优化
- 厦门主要IT企业名单(至20071205)
- 使用函数递归实现基于PHP和MySQL的动态树型菜单
- 聊天中提到的几个基础问题
- 用模板生成文件示例
- System.Web.UI.Page
- Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The s
- Session永久有效的实现方法
- 18位身份证标准
- 我有个datawindow 有三个参数传递的,我想当我传递三个新的参数的时候 可不可以保留原来的数据
- 如何编写Linux设备驱动程序
- 我要“植树造林”
- asp:限制重复的次数