关于使用fso组件生成html的例子
2005-12-26 22:44
483 查看
很久没有做asp了。近来有朋友又问到了这个。其实网上例子很多。或许因为懒的去internet找,所以给他写了一个。顺便也贴上来。例子如http://www.photk.com
<%
Function writehtml(mulu,mului,messag)
pageh=mulu
i=mului
msga=messag
Set fs=Server.CreateObject("Scripting.FileSystemObject")
all_tree2=server.mappath("stocklist")&"/"&pageh
if (fs.FolderExists(all_tree2)) then'判断今天的文件夹是否存在
else
response.write all_tree2
fs.CreateFolder(all_tree2)
end if
files=pageh&i&".html"
filez=all_tree2&"/"&files
set ts = fs.createtextfile(filez,true)
ts.write(msga) '就是这么简单。
ts.close
set ts=nothing
if err.number<>0 or err then
writehtml=0
else writehtml=1
end if
set fs=nothing
End Function %>
我的例子都是给初学者看的。老鸟就不用看了。呵呵。
<%
Function writehtml(mulu,mului,messag)
pageh=mulu
i=mului
msga=messag
Set fs=Server.CreateObject("Scripting.FileSystemObject")
all_tree2=server.mappath("stocklist")&"/"&pageh
if (fs.FolderExists(all_tree2)) then'判断今天的文件夹是否存在
else
response.write all_tree2
fs.CreateFolder(all_tree2)
end if
files=pageh&i&".html"
filez=all_tree2&"/"&files
set ts = fs.createtextfile(filez,true)
ts.write(msga) '就是这么简单。
ts.close
set ts=nothing
if err.number<>0 or err then
writehtml=0
else writehtml=1
end if
set fs=nothing
End Function %>
我的例子都是给初学者看的。老鸟就不用看了。呵呵。
相关文章推荐
- 在ASP中使用FSO组件生成HTML页面
- 在ASP中使用FSO组件生成HTML页面
- 在ASP中使用FSO组件生成HTML页面
- 在ASP中使用FSO组件生成HTML页面
- 在ASP中使用FSO组件生成HTML页面
- 在ASP中使用FSO组件生成HTML
- 在ASP中使用FSO组件生成HTML页面
- 关于win2003企业版中FSO组件不能使用的问题
- 微信小程序image组件binderror使用例子(对应html、js中的onerror)
- 关于使用Jquery动态生成页面组件的时候,单引号和双引号的注意
- 微信小程序image组件binderror使用例子(对应html、js中的onerror) ,图片失效显示默认图片
- 【JAVA】使用jacob生成的html,关于文字乱码处理,图片无法显示等问题。
- 关于使用RadioButton和CheckBox控件(Asp.net)生成html包含<label>控件的一点认识
- Html 在线编辑器 KindEditor 的使用例子
- HTML中级教程 - 1.关于“Span”和“Div”的使用
- 在laravel中使用Symfony的Crawler组件分析HTML
- 关于polymer原生组件paper-input的部分属性的使用心得
- 使用xmldom在服务器端生成静态html页面
- 关于Vue.js 组件的使用及其概念
- android成长记(2)-------关于apk的生成以及使用