一聚教程网:一个值得你收藏的教程网站

热门教程

构建你的网站新闻自动发布系统之六(转贴)

时间:2022-11-14 23:39:11 编辑:袖梨 来源:一聚教程网

通过定制这段代码,就能制作出符合您要求的网页显示格式。

  添加,删除,显示都讲解完了,最后一项,就是把新闻的详细内容显示出来。

  当用户点击新闻标题,就打开disp.asp文件,同时使用GET这种方式来把参数传递过去,我们看看disp.asp的文件内容

《% @language="vbscript" %》
《!--#include Virtual="/news/data/data.inc"--》
《%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from data where Cstr(news_id)='"&Cstr(request.querystring("news_id"))&"'"
rs.open sql,conn,3,2
%》
《html》

《head》
《meta http-equiv="Content-Type" content="text/html; charset=gb2312"》
《title》《/title》
《/head》

《body topmargin="8" leftmargin="8"》
《div align="center"》《center》

《table border="0" cellpadding="0" cellspacing="0"》
《tr》
《td 》《/td》
《/tr》
《tr》
《td bgcolor="#E6E6E6"》《table border="0" cellpadding="0"》

热门栏目