Function fileexits(filename) set FSO=Server.CreateObject("Scripting.FileSystemObject") If FSO.FileExists(filename) Then fileexits=true Else fileexits=false End If end Function
if fileexits(picurl) then set myImg = loadpicture(picurl) iWidth = round(myImg.width / 26.4583) iHeight = round(myImg.height / 26.4583) else picurl="images/kong.gif" end if
'图片调用
<img src="uploadfile/<%=rs("pic")%> " <%if iwidth<=113 and iheight<=113 then elseif iwidth>=iheight then response.write " width=113" else response.write " height=113" end if %> border="0">