• 企业400电话
  • 网络优化推广
  • AI电话机器人
  • 呼叫中心
  • 全 部 栏 目

    网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    如何判断URL格式是否符合规范?
    POST TIME:2021-10-18 08:03
    %
     function checkisUrl(tmpString)

          dim c,i
          checkisUrl = true
          tmpString=Lcase(trim(tmpString))
          if left(tmpString,7)>"http://" then tmpString="http://"tmpString
          for i = 8 to Len(checkisUrl)
                c = Lcase(Mid(tmpString, i, 1))
                if InStr("abcdefghijklmnopqrstuvwxyz_-./\", c) = 0 and not IsNumeric(c) then
                      checkisUrl = false
                      exit function
                end if
          next
          if Left(tmpString, 1) = "." or Right(tmpString, 1) = "." then
                checkisUrl = false
                exit function
          end if
          if InStr(tmpString, ".") = 0 then
                checkisUrl = false
                response.Write "f3"
                exit function
          end if
          if InStr(checkisUrl, "..") > 0 then
                checkisUrl = false
          end if

    end function
    %>
    %

    if checkisUrl(request("u"))=true then
          %>
    恭喜,你的URL通过!
    %
    else
          %>
    对不起,你的URL不合乎规范,请重新检查!
    %end if%>

    [1]

    上一篇:如何检测用户第一次访问我的网站并显示友好信息?
    下一篇:如何取得服务器上的用户组列表?
  • 相关文章
  • 

    关于我们 | 付款方式 | 荣誉资质 | 业务提交 | 代理合作


    © 2016-2020 巨人网络通讯

    时间:9:00-21:00 (节假日不休)

    地址:江苏信息产业基地11号楼四层

    《增值电信业务经营许可证》 苏B2-20120278

    X

    截屏,微信识别二维码

    微信号:veteran88

    (点击微信号复制,添加好友)

     打开微信