打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
为动态网站制作RSS内容输出的程序模版
<?xml version="1.0" encoding="gb2312"?>
<%
dim url,db,dbpath,conn,show_username
dim rs,SQL
db="data/oblog221.mdb" ‘这里修改数据库路径或名称
Set conn = Server.CreateObject("ADODB.Connection")
dbpath="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
conn.Open dbpath
%>
<rss VERSION="2.0">
 <channel>
  <TITLE>网站或栏目的名称</TITLE>
  <LINK>网站或栏目的URL地址</LINK>
  <description>网站或栏目的简要介绍</description>
<%
show_username=replace(request.QueryString("name"),"‘","")
‘set rs = Server.CreateObject("ADODB.Recordset")
if show_username<>"" then
 SQL="select top 10 * from blog where username=‘"&show_username&"‘ and ishide<>‘true‘ and passcheck<>‘false‘ and isnull(ispassword)=true and (isnull(blog_password)=true or blog_password=‘‘) order by id desc"
else
 SQL = "Select top 10 * from blog where ishide<>‘true‘ and passcheck<>‘false‘ and isnull(ispassword)=true and (isnull(blog_password)=true or blog_password=‘‘) order by id desc"
end if
set rs=conn.execute(SQL)
if rs.Eof or rs.Bof then
  response.write "<item></item>"
end if
while not rs.Eof
    response.Write "<item>"
 response.write "<link>"&url&"more.asp?name="&rs("username")&"&id="&rs("id")&"</link>"
 Response.write "<title><![CDATA["&rs("topic")&"]]></title>"
 response.write "<creator>"&rs("username")&"</creator>"
 response.write "<PubDate>"&rs("addtime")&"</PubDate>"
  response.write "<description><![CDATA["&rs("logtext")&"]]></description>"
 response.write "</item>"
 rs.MoveNext         
wend                 
set rs=nothing
conn.Close
set conn = nothing
%></channel></rss>
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
asp 学习笔记
ASP连接SQL服务器代码
c#更新数据库中数据
asp制作用户登陆界面--龙二
Response.End()用法 - 我的空间的日志 - 网易博客
asp防止同时登陆的问题
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服