zzzcms网站微信分享的链接打开500报错,解决办法

来源:互联网 发布:美国非农数据公布网站 编辑:程序博客网 时间:2024/05/21 09:00

有疑问的可以加群162092974咨询
一、根目录找到 inc 文件夹,打开 zzz_mian.asp文件
修改 getURL() 自定义函数

    function getURL(byval t)                dim u,i,h,d,p,su,dir,par,QSItem,para,arr,param        if lcase(request.serverVariables("HTTPS"))="off" then h = "http://" : else : h = "https://" : end if        d = request.serverVariables("SERVER_NAME")        if request.serverVariables("SERVER_PORT")<>80 then p = ":"& request.serverVariables("SERVER_PORT")        su  = request.serverVariables("URL")        dir = left(su,instrRev(su,"/"))        if trim(request.queryString)<>"" then            para = trim(request.queryString)            '增加下面的一句代码,过滤网址,trim()函数不能过滤掉 = ,微信分享之后的链接会自动在网址后面加上一段参数,参数就是 = 开头的,这才导致分享过的网址报错            '增加的代码开始            para = left(para,Instr(para,".html")+Len(fileExt)-1)            '增加的代码结束        else            para = ""        end if        if instr(para,"&") > 0 then para=split(para,"&")(0)        if wapmark then            if ifstrin(para,"/") then para=split(para,"/")(1)            end if         if trim(t)<>"" then            t=cstr(t)            select case t                case "0"                    u = su                case "1"                    u = su & para                case "2"                    u = dir                case "3"                    u=para                case "SID"                    SID=replacestr(replacestr(para,fileExt,""),"list_","")                                      'SID=iif(len(SID)>3,left(SID,3),SID)                    if ifstrin(SID,"_")  then                        u=split(SID,"_")(0)                    else                        if isnul(u) or not ifnum(u) then u=0                    end if                    u = iif(ifnum(u),u,0)                case "page"                if para="" then u=0 :   exit function                dim pages,page,j                    pages=split(replacestr(para,fileExt,""),"_")                                        if Location="content" then                                          if ubound(pages)>1 then u=pages(2)                    else                        u=pages(ubound(pages))                    end if                    u = iif(ifnum(u),u,0)                case "id"                    id=replacestr(para,fileExt,"")                    if instr(id,"_") > 0 then                        if Location="brand" then                         u=split(id,"_")(0)                          else                                u=split(id,"_")(1)                        end if                    else                        u=id                    end if                    u = iif(ifnum(u),u,0)                 case "arr"                    u= trim(request.queryString)                    if instr(u,"|/") > 0 then                        u=split(u,"|/")(0)&"|/"                    else                        u=""                    end if                case else                                       u =replacestr(para,fileExt,"")                                      if (regTest(u,""&t&"=")) then                        u=split(u,""&t&"=")(1)                        u=cleft(cleft(u,"_"),"-")                    end if              end select        else            u=h & d & p & su & para        end if        getURL = iif(isnul(u),0,u)    end function
阅读全文
0 0
原创粉丝点击