CNET中国旗舰网站

ZDNet China | CNET科技资讯网 | 政府采购 | 行业网站联盟





 
标题: [求助] 为什么小弟asp文件中文显示会是乱码?
MANGO02
灵玉会员
Rank: 8Rank: 8



UID 307619
精华 1
积分 6056
帖子 659
威望 2760
ZD币 857 元
阅读权限 180
注册 2008-3-14
状态 离线
  楼主
发表于 2008-4-25 14:59  资料  个人空间  短消息  加为好友 
开发者在线

为什么小弟asp文件中文显示会是乱码?

为什么小弟asp文件中文显示会是乱码?   
   
  具体文件如下:   
   
   
  <!--#include   file="conn.asp"-->   
          <style   type="text/css">   
  <!--   
  .STYLE3   {font-size:   12px}   
  -->   
          </style>   
  <%     
  session.Timeout=20   
  session("userID")=cstr(session.SessionID)   
   
  response.Expires=0   
      const   intpagesize=6   
  dim   intcur,inttotal,I   
  dim   cn,rst,strconn,strsql   
  if   request.ServerVariables("content_length")=0   then   
  intcur=1   
  else   
  intcur=cint(request.form("curpage"))   
  select   case   request.form("page")   
  case   "ê×ò3"   
  intcur=1   
  case   "é?ò?ò3"   
  intcur=intcur-1   
  case   "??ò?ò3"   
  intcur=intcur+1   
  case   "?2ò3"   
  intcur=cint(request.form("lastpage"))   
  end   select   
  end   if   
   
  set   rst   =   Server.CreateObject("ADODB.Recordset")   
  strsql="select   *   from   books"   
  rst.Open   strsql,conn,3,3   
  '??PageSizeê?D?éè?aò?ò3é?òa??ê?μ?????êy   
  rst.PageSize   =   intPageSize   
  inttotal=rst.pagecount   
  If   Not   rst.EOF   then                                 'è?1?????2??a???òéè??μ±?°?????ù?úμ?ò3o?   
          rst.AbsolutePage   =   intCur   
  end   if   
  %>   
  <title>í?é?êéμê</title>   
  </head>   
  <body>   
  <p><center><h2>í?é?êéμê</h2>   
  <hr>   
  <b>±?êéμê??óDí?êé<%=rst.recordcount%>???·??12<%=inttotal%>ò3   μ±?°ê?μú<%=intcur%>ò3</b>   
  <p>   
  <form   name=""   method=post   action="<%=request.servervariables("script_name")%>">   
  <input   type="hidden"name="curpage"value="<%=intcur%>">   
  <input   type="hidden"name="lastpage"value="<%=inttotal%>">   
  <input   type="submit"name="page"value="ê×ò3">   
  <%   
  'è?1?μ±?°2?ê?μúò?ò3?ò??ê?"é?ò?ò3"°′?¥   
  if   intcur>1   then   
  %>   
  <input   type="submit"name="page"value="é?ò?ò3">   
  <%end   if%>   
  <%   
  'è?1?μ±?°2?ê?×?oóò?ò3?ò??ê?"??ò?ò3"°′?¥   
  if   intcur<=rst.pagecount-1   then   
  %>   
  <input   type="submit"name="page"value="??ò?ò3">   
  <%end   if%>   
  <input   type="submit"name="page"value="?2ò3">   
  </form>   
  </p>   
  <%   
  'ê1ó?±í????ê?SQLêy?Y?a?D±í??μ??úèY   
  I=0   
  response.Write"<table   border   cellspacing=1   cellpadding=7>"   
  response.Write"<tr   heght=30><td   width=40>"&"±ào?"&_   
  "<td   width=260>"&"í?êé??3?"&"</td>"&_   
  "<td   width=180>"&"í?êé×÷??"&"</td>"&_   
  "<td   width=40>"&"????"&"</td>"&_   
  "<td   width=70>"&"ê?·?1o?ò"&"</td></tr>"   
  do   while   not   rst.eof   and   I<rst.pagesize   
  response.Write"<tr   height=30><td   width=40>"&   rst.absoluteposition   &_   
  "<td   width=260>"&rst("bookname")&"</td>"   &_   
  "<td   width=180>"&rst("writer")&"</td>"   &_   
  "<td   width=40>"&rst("price")&"</td>"   &_   
  "<td   width=70><a   href=addcart.asp?bookid="&   rst("BookID")   &_   
  ">1o?ò</a></td></tr>"   
  rst.movenext'??1a±êò?μ???ò?????   
  I=I+1   
  loop   
  response.write   "</table>"   
  rst.close   
  %>   
  <hr>   
  <a   href="showcart.asp">2é?′1o?ò3μ?Dμ?éì?·</a>   
  </center>   
  </body>   
  </html>   
   
   
   
   
   
   
  请各位高人帮帮忙呀!谢谢了!   
   
  另外小弟想知道怎样改变里面字体的颜色和背景的颜色!请各位高人一起告诉我吧,小弟刚学这个ASP,急呀!因为是我这学期的项目,请帮帮忙,谢谢了!




顶部
热点频道推荐: C/S开发| 数据库| WEB开发| 嵌入式| 项目管理|
 



当前时区 GMT+8, 现在时间是 2009-1-10 11:33

  Powered by Discuz! 5.5.0 © 2001-2007 Comsenz Inc.
Processed in 0.076468 second(s), 3/3 queries

清除 Cookies - 联系我们 - ZDNetChina中文社区 - 无图版