浏览文件夹下面所有图片(6)


        arr=pp.getimagesize(f1.path)
        readX   =   arr(1)
      end   select
      Set   f1=nothing
      Set   fso1=nothing
  End   Function
  Function   readY(pic_path)
      Set   fso1   =   server.CreateObject("Scripting.FileSystemObject")
      Set   f1   =   fso1.GetFile(pic_path)
      ext=fso1.GetExtensionName("."&pic_path)
      select   case   UCase(ext)
          case   "GIF","BMP","JPG","PNG":
        arr=getImageSize(f1.path)
        readY   =   arr(2)
          case   "swf"
        arr=pp.getimagesize(f1.path)
        readY   =   arr(2)
      end   select
      Set   f1=nothing
      Set   fso1=nothing
  End   Function
End   Class
'+-----------------------------------+
'|     数据处理
'+-----------------------------------+
Dim   fileArray()
reDim   fileArray(0)
Set   fileObj =   Server.CreateObject("Scripting.FileSystemObject")
Set   folderObj =   fileObj.GetFolder(server.MapPath("."&pic_path))
i   =   0
For   Each   file   in   folderObj.Files
If   isPIC(file.Name,   cPicType)   Then
fileArray(i)   =   file.Name
i   =   i   +   1
reDim   Preserve   fileArray(i)
End   If 
Next
Set   FileObj =   Nothing
Set   FolderObj =   Nothing
picTotal   =   UBound(fileArray)
'+-----------------------------------+
'|     分页处理
'+-----------------------------------+
page   =   int(Request.QueryString("page"))

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/3505.html