ReSaveRemoteFile函数之asp实现查找文件保存替换的代(4)
FileTemp=Dir & MakeRandom(5) & TempUrlArray(Ubound(TempUrlArray))'生成随机文件名
If CheckFile(FileTemp)=False then
Exit Do
end if
loop
'-------------------------------------------------------------------
Response.Write(FileTemp)
If SaveRemoteFile(FileTemp,strTempUrl)=True then
Response.Write("保存成功")&"<Br>"
s_Content = Replace(s_Content,sContentUrl(i),FileTemp, 1, -1, 1)'替换地址
Else
Response.Write("保存失败")&"<Br>"
End if
Else
s_Content = Replace(s_Content,sContentUrl(i),strTempUrl, 1, -1, 1)'替换地址
End If
Next
Set re = Nothing
PictureExist = True
ReSaveRemoteFile = s_Content
Exit Function
End Function
内容版权声明:除非注明,否则皆为本站原创文章。