追加100分UNICODE ASP 文件不被支持大哥们帮我看看是哪里错了?
解决一下吧。成功后追加100分
技术信息(用于支持人员)
错误类型:
Active Server Pages, ASP 0239 (0x***********)
UNICODE ASP 文件不被支持。
/cheshi.asp, 第 1 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
网页:
GET /cheshi.asp
时间:
2007年3月14日, 下午 02:43:06
详细信息:
Microsoft 支持
<!--#include file="IncTop1.asp"-->
<!--#include file="Inctop2.asp"-->
<table border="1" width="760" cellspacing="5" cellpadding="5" id="table6" style="border-collapse: collapse" bordercolor="#E1E1E1">
<tr>
<td height="40" bgcolor="#E1E1E1"> </td>
</tr>
<tr>
<td><table width=100%><tr>
<%i=0
Rs.Open "Select * From ShiChang order by ShiChangHao",Conn,1,1
Do while not rs.eof
i=i+1
%>
<td width="200" align="center">
<table border="1" width="100%" style="border-collapse: collapse" bordercolor="#E1E1E1" id="table8" cellspacing="0" cellpadding="0">
<tr>
<td><%
if Right(Trim(rs(4)),3)="swf" then
%><embed src="<%=rs(4)%>" quality=high height="80" width="200" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" border=0>
<%else%><a href="PaiHang.asp?id=<%=rs(0)%>"><img border="0" height="80" width="200" src="<%=rs(4)%>" style="border-style:solid; border-color:#C0C0C0; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"></a>
<%end if%></td>
</tr>
</table>
</td><td align=center width="150">
<table border="0" width="100%" id="table7">
<tr>
<td height="26" bgcolor="#BC5B03" align="center"><b><a href="PaiHang.asp?id=<%=rs(0)%>"><font color="#FFFFFF"><%=rs(1)%></font></a></b></td>
</tr>
<tr>
<td height="26" bgcolor="#FF9900" align="center">
<a target="_blank" title="查看原始图片" href="KanTu.asp?U=<%=rs(5)%>">平面图</a></td>
</tr>
<tr>
<td height="26" bgcolor="#808000" align="center">
<a href="PaiHang.asp?id=<%=rs(0)%>">排行榜</a></td>
</tr>
</table>
</td>
<%
if i mod 2 =0 then
response.write "</tr><tr><td height=20></td></tr><tr>"
else
response.write "<td width=100></td>"
end if
rs.movenext
loop
rs.close
%>
</tr></table>
</td>
</tr>
</table>
<BR>
<!--#include file="IncFoot.asp"-->
参考答案:asp不支持unicode的格式
但是支持utf-8格式
utf-8几乎包含了所有unicode字符
使用方法
1.把asp文件用记事本打开,另存为 utf-8 格式
所有包含文件同样改为utf-8格式
2.把asp文件第一行改为 <%@ LANGUAGE = VBScript CodePage = 65001%>
这句应该在所有包含文件以前
3.在html部分的head内添加
<meta http-equiv="content-type" content="text/html; charset=utf-8">
应该作为head部分的第一行,一定要在title之前
然后应该可以了