html代码在前台显示的问题,请教
我的是NB的文章管理系统,现在的问题是他的公告不能显示含有html代码的内容,只能显示纯文本的内容
代码如下:
<!--#include file="Conn.asp" -->
<!--#include file="Include/Inc.asp" -->
<%
Dim PostId
Dim Title,Content,AddTime
PostId=SafeRequest("postid",1)
If PostId<>"" Then
SQL="Select Title,Content,AddTime From [NB_Placard] Where Id="&PostId
Set Rs=Conn.Execute(SQL)
If Not rs.eof And Not rs.bof Then
Title=Rs(0)
Content=Rs(1)
AddTime=Rs(2)
End If
End If
%>
<html>
<head>
<title><%=SysInfo(0)%> - 站点公告</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
body
{
background-attachment: fixed;
background-repeat: repeat-y;
background-position: center;
background-color: #FFFFFF;
font-family: "宋体";
font-size: 12px;
}
a {
color: #000000;
text-decoration: none;
}
a:hover {
color: #999999;
text-decoration: underline;
}
TD {
font-family: "宋体";
font-size: 12px;
}
TR {
font-family: "宋体";
font-size: 12px;
}
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0" cellpadding="5" cellspacing="0" align="center" style="border: 1 solid #000000">
<tr bgcolor="#efefef" valign="middle">
<td align="left" width="70%"><%=Title%></td>
<td align="center"><%=FormatDateTime(AddTime,2)%></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" colspan="2"><%=HTMLEncode(Content)%></td>
</tr>
<tr>
<td bgcolor="#efefef" colspan="2" align="center"><a href="javascript:window.close();">关闭窗口</a> | <a href="moreplacard.asp">更多公告</a></td>
</tr>
</table>
</body>
</html>
请教如何修改?
代码如下:
<!--#include file="Conn.asp" -->
<!--#include file="Include/Inc.asp" -->
<%
Dim PostId
Dim Title,Content,AddTime
PostId=SafeRequest("postid",1)
If PostId<>"" Then
SQL="Select Title,Content,AddTime From [NB_Placard] Where Id="&PostId
Set Rs=Conn.Execute(SQL)
If Not rs.eof And Not rs.bof Then
Title=Rs(0)
Content=Rs(1)
AddTime=Rs(2)
End If
End If
%>
<html>
<head>
<title><%=SysInfo(0)%> - 站点公告</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
body
{
background-attachment: fixed;
background-repeat: repeat-y;
background-position: center;
background-color: #FFFFFF;
font-family: "宋体";
font-size: 12px;
}
a {
color: #000000;
text-decoration: none;
}
a:hover {
color: #999999;
text-decoration: underline;
}
TD {
font-family: "宋体";
font-size: 12px;
}
TR {
font-family: "宋体";
font-size: 12px;
}
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0" cellpadding="5" cellspacing="0" align="center" style="border: 1 solid #000000">
<tr bgcolor="#efefef" valign="middle">
<td align="left" width="70%"><%=Title%></td>
<td align="center"><%=FormatDateTime(AddTime,2)%></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" colspan="2"><%=HTMLEncode(Content)%></td>
</tr>
<tr>
<td bgcolor="#efefef" colspan="2" align="center"><a href="javascript:window.close();">关闭窗口</a> | <a href="moreplacard.asp">更多公告</a></td>
</tr>
</table>
</body>
</html>
请教如何修改?
...全文
相关推荐
网博士网店系统商品信息不发布,前台不显示
这通常是网店模板中的一个HTML文件,用于展示商品属性。如果商品信息在前台没有显示,可能是这个模板文件出现了错误或者配置不当,导致商品属性无法正确渲染。
FastAdmin添加前台页面[项目源码]
在使用这些函数时,需要确保正确的路径指向公共文件夹中的HTML文件,以避免因路径错误导致的页面组件无法正确加载的问题。
layui table设置前台过滤转义等方法
我们可以在模板中使用JavaScript代码来转义HTML特殊字符,保证显示的内容不会被解释为HTML代码。
织梦添加上传pdf文件并且前台显示的操作
[图片示例](pic)#### 四、前端显示PDF文件1. **修改模板代码**: - 在织梦中,通过编辑模板文件可以实现PDF文件在前端的显示。
shopex解决最新版站点栏目隐藏前台依然显的问题
检查模板文件,特别是与栏目显示相关的PHP或HTML代码,确保它们尊重后台的栏目显示设置。3. **插件冲突**:提供的"plugins"文件夹暗示可能涉及到插件功能。


