国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

用ASP+FSO生成JS文件

2024-05-04 11:02:29
字體:
來源:轉載
供稿:網(wǎng)友

復制代碼 代碼如下:<!--#include file="conn.asp"--> 
<% 
set js = server.CreateObject("ADODB.RecordSet") 
sql="select top 10 * from article order by id desc" 
set js = conn.Execute (Sql) 
do while not js.eof 
    title=js("title") 
addate=js("addate") 
foolcat = foolcat + "<li><a href=""/"& js("id")&".htm"">" &title&" "&addate&"</a></li><br>"  
js.movenext 
loop 
'生成JS文件 
foolcat = "" + foolcat + "" 
foolcat = "document.write('" & foolcat & "')" 
FolderPath = Server.MapPath("./") 
Set fso = Server.CreateObject("Scripting.FileSystemObject") 
Set fout = fso.CreateTextFile(FolderPath&"/top10.js") 
fout.WriteLine foolcat 
'關閉連接 
fout.close 
set fout = nothing 
js.close 
set js = nothing 
conn.close 
set conn=nothing 
%> 

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 泽州县| 新巴尔虎右旗| 科技| 沙坪坝区| 施秉县| 夏河县| 拉孜县| 广灵县| 贵定县| 广东省| 靖远县| 通城县| 稷山县| 杭锦旗| 永顺县| 仁化县| 剑阁县| 牙克石市| 武乡县| 尼木县| 越西县| 高雄县| 和静县| 大石桥市| 津市市| 岳西县| 南靖县| 平顺县| 集安市| 万宁市| 关岭| 米林县| 颍上县| 土默特左旗| 苍梧县| 宁国市| 乌审旗| 社旗县| 高陵县| 承德市| 改则县|