想给asp网站调用文章标题作为网页title怎么做?
下面是文章页的代码:<%@language="VBSCRIPT"codepage="936"%><!DOCTYPEHTMLPUBLIC"-//W3C//DTDXHTML1...
下面是文章页的代码:
<%@ language="VBSCRIPT" codepage="936" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<!--#include file="include/lianjie.asp" -->
<!--#include file="include/hanshu.asp" -->
<!--#include file="include/page.asp" -->
<%
fenlei=request.QueryString("fenlei")
id=request.QueryString("id")
set rs12=server.createobject("adodb.recordset")
exec="select * from news where id=" & id
rs12.open exec,conn,1,1
if rs12.eof then
response.Write ""
response.End()
end if
fenlei=rs12("fenlei")
%>
<title><%=fenlei%> - <%=getSetting("mingcheng")%></title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script src="js/flash.js" type="text/javascript"></script>
</head>
<body>
<div id="n_container">
<!--#include file="_top.asp"-->
<div id="PageBody">
<!--#include file="_left.asp"-->
<div class="n_right">
<div class="nav">您的当前位置:<a href="/">首页</a> >> <a href="news.asp?fenlei=<%=Server.URLEncode(fenlei) %>"><%=fenlei %></a> >> </div>
<div class="title"><%=rs12("title")%></div>
<div class="time">添加时间:<%=FormatDate(rs12("data"),"YYYY-MM-DD")%> 阅读次数:<%=getHits("news",ID,true)%></div>
<div class="content"><%call longTextBreak(rs12("content"))%></div>
</div>
<div class="clear"></div>
</div>
<!--#include file="_foot.asp"-->
</div>
</body>
</html> 展开
<%@ language="VBSCRIPT" codepage="936" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<!--#include file="include/lianjie.asp" -->
<!--#include file="include/hanshu.asp" -->
<!--#include file="include/page.asp" -->
<%
fenlei=request.QueryString("fenlei")
id=request.QueryString("id")
set rs12=server.createobject("adodb.recordset")
exec="select * from news where id=" & id
rs12.open exec,conn,1,1
if rs12.eof then
response.Write ""
response.End()
end if
fenlei=rs12("fenlei")
%>
<title><%=fenlei%> - <%=getSetting("mingcheng")%></title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script src="js/flash.js" type="text/javascript"></script>
</head>
<body>
<div id="n_container">
<!--#include file="_top.asp"-->
<div id="PageBody">
<!--#include file="_left.asp"-->
<div class="n_right">
<div class="nav">您的当前位置:<a href="/">首页</a> >> <a href="news.asp?fenlei=<%=Server.URLEncode(fenlei) %>"><%=fenlei %></a> >> </div>
<div class="title"><%=rs12("title")%></div>
<div class="time">添加时间:<%=FormatDate(rs12("data"),"YYYY-MM-DD")%> 阅读次数:<%=getHits("news",ID,true)%></div>
<div class="content"><%call longTextBreak(rs12("content"))%></div>
</div>
<div class="clear"></div>
</div>
<!--#include file="_foot.asp"-->
</div>
</body>
</html> 展开
展开全部
<title><%=fenlei%> - <%=getSetting("mingcheng")%></title>
改为
<title><%=rs12("title")%> - <%=fenlei%> - <%=getSetting("mingcheng")%></title>
改为
<title><%=rs12("title")%> - <%=fenlei%> - <%=getSetting("mingcheng")%></title>
更多追问追答
追问
上传后打开内容页会出现这个提示的报错
Active Server Pages 错误 'ASP 0126'
找不到包含文件
/news_detail.asp,行 6
找不到包含文件 'betterway/include/lianjie.asp'。
追答
找不到包含文件 = 对应位置没有文件存在
检查是否有文件存在?
有的话,相对或绝对位置错误
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询