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

首頁 > 編程 > ASP > 正文

FormatRemoteUrl函數(shù)之a(chǎn)sp實(shí)現(xiàn)格式化成當(dāng)前網(wǎng)站完整的URL-將相對(duì)地址

2024-05-04 10:57:49
字體:
供稿:網(wǎng)友
'================================================
'函數(shù)名:FormatRemoteUrl
'作  用:格式化成當(dāng)前網(wǎng)站完整的URL-將相對(duì)地址轉(zhuǎn)換為絕對(duì)地址
'參  數(shù): url ----Url字符串
'參  數(shù): CurrentUrl ----當(dāng)然網(wǎng)站URL
'返回值:格式化取后的Url
'================================================
    Public Function FormatRemoteUrl(ByVal URL,ByVal CurrentUrl)
        Dim strUrl
        If Len(URL) < 2 Or Len(URL) > 255 Or Len(CurrentUrl) < 2 Then
            FormatRemoteUrl = vbNullString
            Exit Function
        End If
        CurrentUrl = Trim(Replace(Replace(Replace(Replace(Replace(CurrentUrl, "'", vbNullString), """", vbNullString), vbNewLine, vbNullString), "/", "/"), "|", vbNullString))
        URL = Trim(Replace(Replace(Replace(Replace(Replace(URL, "'", vbNullString), """", vbNullString), vbNewLine, vbNullString), "/", "/"), "|", vbNullString))    
        If InStr(9, CurrentUrl, "/") = 0 Then
            strUrl = CurrentUrl
        Else
            strUrl = Left(CurrentUrl, InStr(9, CurrentUrl, "/") - 1)
        End If

        If strUrl = vbNullString Then strUrl = CurrentUrl
        Select Case Left(LCase(URL), 6)
            Case "http:/", "https:", "ftp://", "rtsp:/", "mms://"
                FormatRemoteUrl = URL
                Exit Function
        End Select

        If Left(URL, 1) = "/" Then
            FormatRemoteUrl = strUrl & URL
            Exit Function
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 黄大仙区| 大城县| 铁岭县| 赫章县| 稷山县| 庄浪县| 古交市| 武宁县| 昌平区| 武强县| 海晏县| 南漳县| 常山县| 绥江县| 临江市| 梁平县| 苗栗市| 平湖市| 宜城市| 安福县| 濮阳县| 雷州市| 曲阜市| 延寿县| 望都县| 铅山县| 云和县| 长岭县| 邻水| 荆门市| 奇台县| 娄底市| 稷山县| 长兴县| 象州县| 灵台县| 安平县| 瓮安县| 河源市| 永新县| 灌南县|