官方首页 | 无图版 | BBS首页
PJBlog3 2.8.5.157 新版发布 下载|升级(2008.8.26) 大话PJ3 | PJ3评测反馈 | PJ3发展建议 PJ纪念版T-shirt设计大赛投票结束大奖揭晓! PJ3内测团队主创人员身份,性格,特点吐血大曝光
PJBlog技术支持论坛使用问题总索引 PJ-Blog 3 斑竹日志 【独家】我使用过的三种空间,与客服的精彩故事 Z-Blog,Wordpress,Bo-Blog转换到PJBlog
 16 12
发新话题
打印

[已解决] 日志乱码

本主题由 无心 于 2008-3-25 10:08 关闭

日志乱码

不知道我的博客什么时候出现的乱码,如下图

我的博客地址:http://www.cehen.com

[ 本帖最后由 ┍.⺌無痕 于 2008-2-19 09:59 编辑 ]
附件: 您所在的用户组无法下载或查看附件
我的博客:http://www.cehen.com

TOP

浏览器编码
宽容大气.千万别小气.大度.是成功人的前提.
学会了宽容.才会认识到这个虚拟世界的精彩......
HaPBoyBlog.Cn

TOP

呵呵 这个我碰到过 很简单。
用记事本打开:class\cls_default.asp

然后选 “文件”--“另存为”--在下面编码处改成“UTF-8”
然后保存就可以了

原因可能是你曾经用记事本打开过class\cls_default.asp
然后直接就保存了 ,记事本默认将编码设置了 “ANSI”编码,
但网站上面有
<meta http-equiv="Content-Language" content="UTF-8" />
语句告诉浏览器使用的是“UTF-8”编码 所以浏览器将该页需要的代码都以“UTF-8”编码翻译,所以造成了将“ANSI”编码编译处乱码的错误。。。

不知道我这样解释LZ明白不。。。

TOP

建议不要使用微软自带的记事本直接更改源代码

凤凰号来火星我只能来地球避一下了
出租自用4核服务器3GECC内存,外高桥电信,100M/50元

TOP

引用:
原帖由 蓝海豚 于 2008-2-16 22:00 发表
呵呵 这个我碰到过 很简单。
用记事本打开:class\cls_default.asp

然后选 “文件”--“另存为”--在下面编码处改成“UTF-8”
然后保存就可以了

原因可能是你曾经用记事本打开过class\cls_default.asp
然后 ...
已经按你说的改了下,但还是一样,不知道问题出在哪
我的博客:http://www.cehen.com

TOP

是修改了什么后,开始这样的。具体一点行吗?

TOP

用记事本打开:class\cls_default.asp

然后选 “文件”--“另存为”--在下面编码处改成“UTF-8”
然后保存

还是没有变化
我的博客:http://www.cehen.com

TOP

<%
'==================================
'  系统首页类文件
'  以 Bigik.cn 文件修改为基础(带标题小日历)
'  更新时间:
'  20080118 03
'  blog.dengzhe.com
'==================================

'**********************************************
'日志列表处理
'**********************************************
function ContentList()'日志列表
  Dim webLog,webLogArr,webLogArrLen,Log_Num,PageCount,CanRead,ViewType,ViewDraft,strSQL,ViewTag
  Dim getCate,ArticleList
  PageCount=0
  set getCate=new Category
  ViewDraft=checkstr(Request.QueryString("display"))
  ViewTag=checkstr(Request.QueryString("tag"))
  CanRead=False
               
                If len(checkstr(Request.QueryString("distype")))>0 Then
                     Response.Cookies(CookieNameSetting)("ViewType")=checkstr(Request.QueryString("distype"))
                else
                  if len(Request.Cookies(CookieNameSetting)("ViewType"))<1 then
                     if blog_DisMod then
                        Response.Cookies(CookieNameSetting)("ViewType")="list"
                     else
                        Response.Cookies(CookieNameSetting)("ViewType")="normal"
                     end if
                  end if
                end if
               
                Dim CT
                  CT=""
                    IF IsInteger(cateID)=True Then
                         getCate.load(cateID)
                         CT="分类: "&getCate.cate_Name&" | "
                           if getCate.cate_Secret then
                                   if not stat_ShowHiddenCate and not stat_Admin then  %>
                     <div style="margin:10px 0px 10px 0px"><strong>抱歉,没有找到任何日志!</strong></div>
<%
                                   exit function
                                   end if
                           end if
                        End If

                If Request.Cookies(CookieNameSetting)("ViewType")="list" Then ViewType="list" Else ViewType="normal"
                if ViewType="list" then
                  strSQL="log_ID,log_CateID,log_Author,log_Title,log_PostTime,log_IsShow,log_CommNums,log_QuoteNums,log_ViewNums,log_IsTop"
                else
                  strSQL="log_ID,log_CateID,log_Author,log_Title,log_PostTime,log_IsShow,log_CommNums,log_QuoteNums,log_ViewNums,log_IsTop,log_Intro,log_Content,log_edittype,log_DisComment,log_ubbFlags,log_tag"
                end if
               
                'row序号: 0     ,1         ,2         ,3        ,4           ,5         ,6           ,7            ,8           ,9        ,10       ,11         ,12          ,13            ,14          ,15
                If len(ViewTag)>0 then
                  dim getTag,getTID
                  set getTag=new tag
                  getTID=getTag.getTagID(ViewTag)
                  if getTID<>0 then
                        SQLFiltrate=SQLFiltrate & " log_tag LIKE '%{"&getTID&"}%' AND "
                        Url_Add=Url_Add & "tag="&Server.URLEncode(ViewTag)&"&"
                        CT="Tag: "&ViewTag&" | "
                  end if
                  set getTag=nothing
                end if

'=================Load Cache List============================
            set ArticleList=new ArticleCache
                  if ArticleList.loadCache and len(ViewTag)<1 and IsInteger(log_Year)=false and IsInteger(log_Month)=false and IsInteger(log_Day)=false and ViewDraft<>"draft" then
                    if IsInteger(cateID)=True then
                          ArticleList.outHTML "C"&cateID,ViewType,CT
                    else
                      if stat_Admin Or stat_ShowHiddenCate then
                            ArticleList.outHTML "A",ViewType,CT
                          else
                              ArticleList.outHTML "G",ViewType,CT
                          end if
                    end if
                      exit function
                  end if
               
'=================Load DB List===============================
          if stat_ShowHiddenCate or stat_Admin then
                SQL="SELECT "&strSQL&" FROM blog_Content "&SQLFiltrate&" log_IsDraft=false ORDER BY log_IsTop ASC,log_PostTime DESC"
          else
                SQL="SELECT "&strSQL&" FROM blog_Content As T,blog_Category As C "&SQLFiltrate&" T.log_CateID=C.cate_ID and C.cate_Secret=false and log_IsDraft=false ORDER BY log_IsTop ASC,log_PostTime DESC"
          end if
          
                'if stat_ShowHiddenCate or stat_Admin then

                        If ViewDraft="draft" and len(memName)>0 then
                          ViewType="list"
                          SQL="SELECT "&strSQL&" FROM blog_Content "&SQLFiltrate&" log_IsDraft=true and log_Author='"&memName&"' ORDER BY log_IsTop ASC,log_PostTime DESC"
                        end if
               
                Set webLog=Server.CreateObject("Adodb.Recordset")

                webLog.Open SQL,CONN,1,1
                SQLQueryNums=SQLQueryNums+1

                If webLog.EOF or webLog.BOF Then
                  If ViewDraft="draft" then%>
                        <div style="margin:10px 0px 10px 0px"><strong>抱歉,没有找到任何草稿!</strong></div>
                  <%else%>
                        <div style="margin:10px 0px 10px 0px"><strong>抱歉,没有找到任何日志!</strong></div>
                  <%end if
                exit function
                Else
                  If ViewDraft="draft" then Url_Add=Url_Add&"display=draft&"
                    If ViewType="list" Then blogPerPage=blogPerPage*4
                    webLog.PageSize=blogPerPage
                    webLog.AbsolutePage=CurPage
                    Log_Num=webLog.RecordCount
                      if webLog.EOF or webLog.BOF then %>
                                <div style="margin:10px 0px 10px 0px"><strong>抱歉,没有找到任何日志!</strong></div>
<%
                          exit function
                      end if
                    webLogArr=webLog.GetRows(Log_Num)
                    webLog.close
                    Set webLog=Nothing
                    webLogArrLen=Ubound(webLogArr,2)
                      If ViewDraft="draft" then%>
                        <div class="pageContent" style="text-align:Right;overflow:hidden;heightpx;line-height0%"><span style="float:left">草稿列表</span><%=MultiPage(Log_Num,blogPerPage,CurPage,Url_Add,"","floateft")%></div>
                      <%else%>
                        <div class="pageContent" style="text-align:Right;overflow:hidden;heightpx;line-height0%"><span style="float:left"><%=CT%></span><%=MultiPage(Log_Num,blogPerPage,CurPage,Url_Add,"","floateft")%> 预览模式: <a href="<%=Url_Add%>distype=normal" accesskey="1">普通</a> | <a href="<%=Url_Add%>distype=list" accesskey="2">列表</a></div>
                      <%end if
                      If ViewType="list" Then%>
                        <div class="Content-body" style="text-aligneft"><table cellpadding="2" cellspacing="2" width="100%">
                      <%end if
                    Do Until PageCount=webLogArrLen+1 or PageCount=blogPerPage
                          IF IsInteger(cateID)=False Then
                                getCate.load(webLogArr(1,PageCount))
                          end if
                          '是否有权限查看日记
                          If stat_Admin=True then CanRead=True
                                If webLogArr(5,PageCount) Then CanRead=True
                                  If webLogArr(5,PageCount)=False And webLogArr(2,PageCount)=memName then CanRead=True
                                        If ViewType="list" Then
                                                         '====================================
                                                         '  列表模式
                                                         '====================================
                                                         OutList webLogArr,PageCount,getCate,ViewDraft,CanRead
                                        Else
                                                         '====================================
                                                         '  正常模式
                                                         '====================================
                                                         OutNomal webLogArr,PageCount,getCate,CanRead
                                        End If       
                                  PageCount=PageCount+1
                          CanRead=False
                          Loop
                            If ViewType="list" Then%>
                            </table></div>
                            <%end if%>
                          <div class="pageContent"><%=MultiPage(Log_Num,blogPerPage,CurPage,Url_Add,"","float:Left")%></div>
                          <%end If
                end Function
               
' ----------------------- 输出普通模式--------------------
'------------------------ Bigik.cn 基础上的加强输出普通模式(带标题小日历)修正了一些asp错误
'------------------------ Start 20080115 01----- blog.dengzhe.com
function OutNomal(webLogArr,PageCount,getCate,CanRead)
  if getCate.cate_Secret then
    if not stat_ShowHiddenCate and not stat_Admin then exit function
        end if
  dim getTag
  set getTag=new tag
%>

<div class="Content">
  <div class="Content-top">
    <div class="Date">
      <div class="DateYM"><%=DateToStr(webLogArr(4,PageCount),"y-m2")%></div>
      <div class="DateD"><%=DateToStr(webLogArr(4,PageCount),"d2")%></div>
      <div class="DateW"><%=DateToStr(webLogArr(4,PageCount),"w2")%></div>
    </div>
    <div class="CheckPoint">
    <div class="titleNbutton">
      <h1 class="ContentTitle">
            <%If CanRead Then%>
          <a class="titleA" href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/article.asp?id=<%=webLogArr(0,PageCount)%>"><%=HtmlEncode(webLogArr(3,PageCount))%></a>
                <%Else%>
          <a class="titleA" href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/article.asp?id=<%=webLogArr(0,PageCount)%>">[隐藏日志]</a>
                <%end If%>
                <%if webLogArr(5,PageCount)=false or getCate.cate_Secret then%>
          <img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/icon_lock.gif" style="margin:10px 0px -3px 2px;" alt=""/>
                <%end if%>
      </h1>
      <%If webLogArr(9,PageCount)=True Then%>
        <div class="BttnE" onclick="TopicShow(this,'log_<%=webLogArr(0,PageCount)%>')"></div>
      <%end if%>
    </div>
      <h2 class="ContentAuthor">
        <img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/User.gif" style="margin:0px 4px -3px 0px" border="0" alt="作者"/>Posted by: <%=webLogArr(2,PageCount)%>
         
                <%if stat_EditAll or (stat_Edit and webLogArr(2,PageCount)=memName) then%>
          <a href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/blogedit.asp?id=<%=webLogArr(0,PageCount)%>"><img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/icon_edit.gif" style="margin:0px 0px -3px 0px" border="0" alt="编辑"/></a>
         
                <%end if%>
                <%if stat_DelAll or (stat_Del and webLogArr(2,PageCount)=memName) then%>
          <a href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/blogedit.asp?action=del&id=<%=webLogArr(0,PageCount)%>" onclick="if (!window.confirm('是否要删除该日志')) return false"><img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/icon_del.gif" style="margin:0px 0px -3px 0px" border="0" alt="删除"/></a>
         
                <%end if%>
                <%if webLogArr(13,PageCount)=true then%>
          <img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/comment.gif" style="margin:0px 0px -3px 0px" border="0" alt="评论"/>
                  <%=webLogArr(8,PageCount)%> Views
           
          不用评论;
           
                <%Else%>
          <img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/comment.gif" style="margin:0px 0px -3px 0px" border="0" alt="评论"/>
                  <%=webLogArr(8,PageCount)%> Views
           
          <a href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/article.asp?id=<%=webLogArr(0,PageCount)%>#comm_top"><%=webLogArr(6,PageCount)%> Comments</a>
           
                <%end If%>
      </h2>
    </div>
  </div>
  <div id="log_<%=webLogArr(0,PageCount)%>"<%if webLogArr(9,PageCount)=true then %> style="display:none"<%end if%>>
    <%if CanRead then
          if webLogArr(12,PageCount)=1 then%>
          <div class="Content-body">
        <div class="Content-Text">
                    <%=UnCheckStr(UBBCode(webLogArr(10,PageCount),mid(webLogArr(14,PageCount),1,1),mid(webLogArr(14,PageCount),2,1),mid(webLogArr(14,PageCount),3,1),mid(webLogArr(14,PageCount),4,1),mid(webLogArr(14,PageCount),5,1)))%>
          </div>
                <%if webLogArr(10,PageCount)<>HtmlEncode(webLogArr(11,PageCount)) then%>
                        <a href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/article.asp?id=<%=webLogArr(0,PageCount)%>" class="more"><img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/skins/kelvin/viewmore.gif" style="margin:0;padding:0px;border:0px" alt="查看更多"/></a>
          <%end if%>
          <%else%>
          <div class="Content-body">
        <div class="Content-Text">
                    <%=UnCheckStr(webLogArr(10,PageCount))%>
          </div>
            <%if webLogArr(10,PageCount)<>webLogArr(11,PageCount) then%>
                    <a href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/default.asp?id=<%=webLogArr(0,PageCount)%>" class="more"><img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/skins/kelvin/viewmore.gif" style="margin:0;padding:0px;border:0px" alt="查看更多"/></a>
          <%end if%>
          <%end if
        Else%>
          <div class="Content-body">该日志是隐藏日志,只有管理员或发布者可以查看!
        <%end if%>
          </div>
    <div class="Content-bottom">
      <div class="ContentBLeft"></div>
      <div class="ContentBRight"></div>
        <img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/folder.gif" style="margin:0px 0px -3px 0px" border="0" alt="分类"/>
        <a href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/default.asp?cateID=<%=webLogArr(1,PageCount)%>" title="<%=getCate.cate_Intro%>"><%=getCate.cate_Name%></a>
         
        <%if len(webLogArr(15,PageCount))>0 then%>
          <img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/tags.gif" style="margin:0px 4px -3px 0px;" alt="Tags"/><%=getTag.filterHTML(webLogArr(15,PageCount))%>
                <%end if%>
    </div>
  </div>
</div>

<%
  set getTag=nothing
end function
'------------------------ Bigik.cn 基础上的加强输出普通模式(带标题小日历)
'------------------------ End 20071228 05:01------- blog.dengzhe.com

' ----------------------- 输出列表模式 --------------------
function OutList(webLogArr,PageCount,getCate,ViewDraft,CanRead)
                dim logLink,logIcon
                if getCate.cate_Secret then
                if not stat_ShowHiddenCate and not stat_Admin then exit function
                end if%>
                <tr><td valign="top">
                <%If ViewDraft="draft" then
                        logLink="blogedit.asp?id="&webLogArr(0,PageCount)
                        logIcon="<a href=""blogedit.asp?id="&webLogArr(0,PageCount)&""" title=""编辑草稿""><img border=""0"" alt=""编辑草稿"" src=""images/drafts.gif"" style=""margin:0px 4px -2px 0px""/></a>"
                else
                        logLink="article.asp?id="&webLogArr(0,PageCount)
                        logIcon="<a href=""default.asp?cateID="&webLogArr(1,PageCount)&""" ><img border=""0"" alt=""查看 "&getCate.cate_Name&" 的日志"" src="""&getCate.cate_icon&""" style=""margin:0px 2px -3px 0px""/></a>"
                end if
                                                         
                If webLogArr(9,PageCount) Then %><b><%end If%>
                <%=logIcon%>
                <%If CanRead Then%>
                        <a href="<%=logLink%>" title="作者:<%=webLogArr(2,PageCount)%> 日期:<%=DateToStr(webLogArr(4,PageCount),"Y-m-d")%>"><%=HtmlEncode(webLogArr(3,PageCount))%></a>
                <%Else%>
                        <a href="<%=logLink%>">[隐藏日志]</a>
                <%end If
                                                                 
                if webLogArr(5,PageCount)=false or getCate.cate_Secret then %>
                        <img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/icon_lock.gif" style="margin:0px 0px -3px 2px;" alt=""/>
                <%end if%>
                </td>
                <%If webLogArr(9,PageCount) Then %></b><%end If%>
                <%If not ViewDraft="draft" then %>
                        <td valign="top" width="60"><nobr><a href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/article.asp?id=<%=webLogArr(0,PageCount)%>#comm_top" title="评论"><%=webLogArr(6,PageCount)%></a> | <span title="引用通告"><%=webLogArr(7,PageCount)%></span> | <span title="阅读次数"><%=webLogArr(8,PageCount)%></span></nobr></td>               
                <%else%>
                    <td valign="top" width="60"><nobr><%=webLogArr(2,PageCount)%></span></nobr></td>               
                <%end if%>
                </tr>
<%end function%>


哪位好心人帮忙,看下啊,我是个菜鸟,到底是哪个文件出了问题啊?
http://www.cehen.com
我的博客:http://www.cehen.com

TOP

你下载新的cls_default.asp覆盖下

凤凰号来火星我只能来地球避一下了
出租自用4核服务器3GECC内存,外高桥电信,100M/50元

TOP

我把整个class文件都覆盖了,还是不行,和日志乱码相关的文件有哪些啊
我的博客:http://www.cehen.com

TOP

 16 12
发新话题