主题:  请问为什么浏览时会出现html语言?

原本简单

职务:普通成员
等级:1
金币:0.0
发贴:99
#12006/5/11 9:08:02
请问为什么浏览时会出现html语言?我已经是用了“自动换行去除html”功能了。



yiliaocheng

职务:普通成员
等级:2
金币:2.0
发贴:631
#22006/5/11 9:26:47
HTML语言有个特点:符合<html></html>成对格式,如果缺少了任何一个,另一个会显示出来的。



原本简单

职务:普通成员
等级:1
金币:0.0
发贴:99
#32006/5/11 9:29:21
不是啊,是成对出现的,而添加的图片也是以路径的方式显示出来的



yiliaocheng

职务:普通成员
等级:2
金币:2.0
发贴:631
#42006/5/11 9:40:47
你把你显示的代码贴出来看看,不要全部的,只要显示出来部分。



原本简单

职务:普通成员
等级:1
金币:0.0
发贴:99
#52006/5/11 10:01:12

图片如下:

大哥帮忙看看究竟是什么原因?



yiliaocheng

职务:普通成员
等级:2
金币:2.0
发贴:631
#62006/5/11 10:06:29
没有任何问题啊。你还是把全部代码贴上来吧。



原本简单

职务:普通成员
等级:1
金币:0.0
发贴:99
#72006/5/11 10:19:53
<!--#include file="Connections/connDSN.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("prod_id" <> "" Then
Recordset1__MMColParam = Request.QueryString("prod_id"
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset"
Recordset1.ActiveConnection = MM_connDSN_STRING
Recordset1.Source = "SELECT * FROM production WHERE prod_id = " + Replace(Recordset1__MMColParam, "'", "''" + ""
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>                    
function CleanHtmlBr(str)                                                
// 织梦平台 www.e-dreamer.idv.tw                                                
    CleanHtmlBr = Replace(Replace(Replace(Replace(str,"<","&lt;",">","&gt;",vbCrlf, "<br>", chr(32)&chr(32),"&nbsp;&nbsp;"            
End Function                                                        
</SCRIPT>                                    
<table width="588" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="588" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="7"><img src="pin_img/pindao_07.gif" width="7" height="161"></td>
<td><img src="pintu/production.gif" width="581" height="161"></td>
</tr>
<tr>
<td height="25" colspan="2"><table width="588" height="25" border="0" cellpadding="0" cellspacing="0">
<tr>
<td background="pin_img/dian .gif" title="">&nbsp;<img src="pin_img/hand.gif" width="13" height="12">&nbsp;当前位置:<a href="production.asp">艾迪尔产品</a>&nbsp;-&gt;&nbsp;<%=(Recordset1.Fields.Item("prod_type".value)%>&nbsp;-&gt;&nbsp;<%=(Recordset1.Fields.Item("prod_title".value)%></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top"><table width="588" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="500" height="30" valign="middle" background="pin_img/detail.gif"><div align="center" class="STYLE1"><%=(Recordset1.Fields.Item("prod_title".value)%></div></td>
<td width="88" height="30" valign="top">&nbsp;</td>
</tr>

<tr>
<td height="10" colspan="2"><img src="pin_img/pindao_16.gif" width="588" height="16"></td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF" class="ziti"><table width="540" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="ziti" ><%= CleanHtmlBr(Recordset1.Fields.Item("prod_content".value)%></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>



yiliaocheng

职务:普通成员
等级:2
金币:2.0
发贴:631
#82006/5/11 11:06:12
你好象设置HTML的语言屏蔽了
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
function CleanHtmlBr(str)
// 织梦平台 www.e-dreamer.idv.tw
CleanHtmlBr = Replace(Replace(Replace(Replace(str,"<","&lt;",">","&gt;",vbCrlf, "<br>", chr(32)&chr(32),"&nbsp;&nbsp;"
End Function
</SCRIPT>
<%= CleanHtmlBr(Recordset1.Fields.Item("prod_content").value)%>肯定会出问题了。你把它改为:<%=(Recordset1.Fields.Item("prod_content").value)%>试试看



原本简单

职务:普通成员
等级:1
金币:0.0
发贴:99
#92006/5/11 11:17:52
大哥,你真厉害!谢谢啦!