国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 編程設計 > 正文

如何判斷URL格式是否符合規范?

2020-06-19 13:41:31
字體:
來源:轉載
供稿:網友
<%
 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]

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 九寨沟县| 鸡泽县| 巴马| 临武县| 邵阳市| 闸北区| 绍兴县| 晋城| 孙吴县| 普兰店市| 桂林市| 毕节市| 邯郸市| 调兵山市| 文化| 玛纳斯县| 军事| 唐河县| 分宜县| 开原市| 中宁县| 浦城县| 固原市| 泰顺县| 海南省| 芦山县| 马公市| 芦溪县| 南召县| 雷州市| 钟山县| 咸宁市| 紫金县| 凭祥市| 宁化县| 阿拉善右旗| 霍山县| 澄迈县| 沅陵县| 澄迈县| 邹城市|