国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開(kāi)通VIP
給你的asp ac站點(diǎn)加rss功能

程序代碼
<%
Response.ContentType="text/xml"
dim db,dbpath,conn
dim rs,SQL
db="shujuku/hotltcom.mdb"‘‘‘‘這里填寫你的數(shù)據(jù)庫(kù)地址
Set conn = Server.CreateObject("ADODB.Connection")
dbpath="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
conn.Open dbpath
%>
<?xml version="1.0" encoding="gb2312"?><rss version="2.0">‘這里是xml的版本和語(yǔ)言聲明
<channel>
‘以下相當(dāng)于html的meta部分,包括標(biāo)題.連接.語(yǔ)言.版權(quán)信息以及l(fā)ogo圖標(biāo)等
<title>簡(jiǎn)單的快樂(lè)</title>
<link>http://siyizhu.com</link>
<Description>簡(jiǎn)單的快樂(lè)</Description>
<language>zh-cn</language>
<copyright>Copyright 2006 hotlt</copyright>
<webMaster>hotlt@tom.com</webMaster>
<image>
<title>簡(jiǎn)單的快樂(lè)</title>
<url>http://siyizhu.com/logo.gif</url>
<link>http://siyizhu.com/</link><description>siyizhu‘s weblog</description></image>
‘以下是連接數(shù)據(jù)庫(kù)數(shù)據(jù)表部分,top 15代表最新的15條,movie是數(shù)據(jù)表
<%
SQL="select top 15 * from movie order by id desc"
set rs=conn.execute(SQL)
if rs.Eof or rs.Bof then
response.write "<item></item>"
end if
while not rs.Eof
Title=rs("Title")‘這里定義Title是標(biāo)題,("Title")為字段名稱
id=rs("id")‘這里定義id是連接id ,("id")為字段名稱
Time=rs("Time")‘這里定義Time是時(shí)間 ,("Time")為字段名稱
Content=replace(replace(left(rs("Content"),200),"<","<"),">",">")‘這里的Content是內(nèi)容的字段名稱
‘以下是rss輸出
response.Write "<item>"
Response.write "<title>"&Title&"</title>" ‘這里是輸出標(biāo)題
response.write "<link>response.write "<author>siyizhu</author>" ‘這里是輸出作者,如果有字段可以調(diào)用字段
response.write "<PubDate>"&Time&"</PubDate>" ‘這里是時(shí)間
response.write "<description><![CDATA["&Content&"]]></description>"‘這里是輸出簡(jiǎn)介,因?yàn)榭赡苡写a.括起來(lái),否則預(yù)覽時(shí)會(huì)提示錯(cuò)誤。
response.write "</item>"
rs.MoveNext
wend
set rs=nothing
conn.Close
set conn = nothing
%>
</channel></rss>


注意事項(xiàng):其中要注意[CDATA*]>的使用,像是內(nèi)容之類的輸出盡量用"[CDATA[ * ]]>",
*為輸出內(nèi)容,應(yīng)為內(nèi)容可能為代碼形式,如有空格或asp代碼.否則可能會(huì)出錯(cuò)誤.

打開(kāi)APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
為動(dòng)態(tài)網(wǎng)站制作RSS內(nèi)容輸出的程序模版
ASP生成RSS實(shí)例解析 - ailincn的日志 - 網(wǎng)易博客
在ASP網(wǎng)頁(yè)中訪問(wèn)Excel文件
常用的ASP連接數(shù)據(jù)庫(kù)的函數(shù)
asp19個(gè)基本技巧
用ASP實(shí)現(xiàn)網(wǎng)上考試系統(tǒng)_天邊的一片云
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服