一个采集入库生成本地文件的几个FUCTION
来源:ASP学习网 作者:Admin 时间:08-07-14 点击:
****************************************
Public Function FormatImgPath(byref ImgUrl,byref ImgFolder,byref FristName,byref noimg)
strpath=""
ImgUrl=ImgUrl
if instr(ImgUrl,"Nophoto") or lenb(GetData(ImgUrl,0))<=0 then
strpath=noimg
Response.Write "<a href="&strpath&">"&strpath&"</a>" &VBcrlf
else
if Instr(ImgUrl,".ASP") then
strpath=FristName&"_"&Mid(ImgUrl, InStrRev(ImgUrl, "=")+1)&".jpg"
else
strpath=FristName&"_"&Mid(ImgUrl, InStrRev(ImgUrl, "/")+1)
end if
strpath = ImgFolder&"/"&strpath
strpath = Replace(strpath,"//","/")
if left(strpath,1)="/" then strpath=right(strpath,len(strpath)-1)
strpath = trim(strpath)
Response.Write "<a href="&strpath&">"&strpath&"</a>" &vbcrlf
savedata ImgUrl,strpath
end if
FormatImgPath = strpath
End function