直接保存URL图像或网页到服务器本地的类(6)
if SavePath="" then SavePath="./"
DiskPath=server.mappath(SavePath&SaveName)
XuPath=replace(replace(DiskPath,server.mappath("/"),""),"\","/")
NewUrl="http://"&Request.ServerVariables("SERVER_NAME")&XuPath
getimagesize=ret
End Function
Public function SaveImg(FullPath)
SaveImg=false
if SaveMode="1" then
if trim(fullpath)="" or _
width=0 or _
height=0 or _
imgSize=0 or _
imgType=".unknow" then exit function end if
end if
ADOS.Position=0
if SaveMode="2" then
ADOS.Type=2
ADOS.Charset ="gb2312"
ADOS.SaveToFile FullPath,2
textStr=ADOS.readtext()
else
ADOS.SaveToFile FullPath,2
end if
SaveImg=true
End function
Private Function Bin2Str(Bin)
Dim I,Str,clow
For I=1 to LenB(Bin)
clow=MidB(Bin,I,1)
if ASCB(clow)<128 then
Str = Str & Chr(ASCB(clow))
内容版权声明:除非注明,否则皆为本站原创文章。