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

有疑问的可以加群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
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值