内容显示页
 
类别:ASP+VBS | 浏览(139) | 2006-8-2 10:31:00 | 关闭广告

'文件是否存在的函数

Function fileexits(filename)
set FSO=Server.CreateObject("Scripting.FileSystemObject")
If FSO.FileExists(filename) Then
   fileexits=true
Else
   fileexits=false
End If
end Function

'得到文件的width 和height

        picurl="uploadfile/"&rs("pic")
        picurl=server.mappath(picurl)

        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">


引用本页地址:http://www.yongfa365.com/item/d13917bd7aac9504.html
 
 
相关链接
 
网友评论:
姓名: 记住我
网址:
邮箱:
内容:
验证码:  验证码图片看不清? 换张图试试
 
   
 
 
文章分类
 
   

power by :柳永法(yongfa365)'Blog | model by :hibaidu | css by:众网友 | 京ICP备07011491号   我要统计  

本空间赞助商:北京中科兴联信息技术有限公司

QQ:64049027    E-mail:64049027<at>qq.com