当前位置: 网学 > 编程文档 > ASP > 正文

浏览文件夹下面所有图片

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 13/06/17
ystemObject")
Set f1 = fso1.GetFile(pic_path)
ext=fso1.GetExtensionName("."&pic_path)
select case UCase(ext)
case "GIF","BMP","JPG","PNG":
arr=getImageSize(f1.path)
readX = arr(1)
case "swf"
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"))
pageTotal = -(int(-(picTotal/cEachPageMax)))
If page = Empty or page < 0 Then page = 1
If page > pageTotal Then page = pageTotal
offset = cEachPageMax * page
start = offset - cEachPageMax
If start < 0 Then start = 0
If offset > picTotal Then offset = picTotal
pageStart = page - cEachPageMax
If pageStart <= 0 Then pageStart = 1
pageMiddle = page + 1
pageEnd = pageMiddle + cEachPageMax
If page <= cEachPageMax Then pageEnd = cEachPageMax * 2
If pageEnd > pageTotal Then pageEnd = pageTotal
''+-----------------------------------+
''| 输出部分
''+-----------------------------------+
%>
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> <%=cTitle%> </title>
<style type=''text/css''>
a:link, a:visited, a:active { text-decoration: none; color: #000 }
a:hover { color: orangered; text-decoration:none }
BODY { scrollbar-face-color: #DEE3E7; scrollbar-highlight-color: #FFFFFF; scrollbar-shadow-color: #DEE3E7; scrollbar-3dlight-color: #D1D7DC; scrollbar-arrow-color: #006699; scrollbar-track-color: #EFEFEF; scrollbar-darkshadow-color: #98AAB1; font: 12p
  • 上一篇资讯: asp数据库防下载处理
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号