newasp中下载类(4)


        sContentPath = RelativePath2RootPath(sUploadDir)
        nFileNum = 0
        For i = 1 To n
            SaveFileType = Mid(a_RemoteUrl(i), InStrRev(a_RemoteUrl(i), ".") + 1)
            SaveFileName = GetRndFileName(SaveFileType)
            strFilePath = sUploadDir & SaveFileName
            If SaveRemoteFile(strFilePath, a_RemoteUrl(i)) = True Then
                nFileNum = nFileNum + 1
                If nFileNum > 0 Then
                    sOriginalFileName = sOriginalFileName & "|"
                    sSaveFileName = sSaveFileName & "|"
                    sPathFileName = sPathFileName & "|"
                End If
                sOriginalFileName = sOriginalFileName & Mid(a_RemoteUrl(i), InStrRev(a_RemoteUrl(i), "/") + 1)
                sSaveFileName = sSaveFileName & SaveFileName
                sPathFileName = sPathFileName & sContentPath & SaveFileName
                s_Content = Replace(s_Content, a_RemoteUrl(i), sContentPath & SaveFileName, 1, -1, 1)
            End If
        Next

        ChangeRemote = s_Content
    End Function

    Public Function RelativePath2RootPath(url)
'这个主要是实现../转换为实际路径
        Dim sTempUrl

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/3700.html