📄 small.asp
字号:
<!--#include file="config.asp"-->
<%
dim constrfolder
constrfolder=split(request("url"),"/")
Function ReportFileStatus(filen)
Dim FSO,msg
Set FSO = CreateObject("Scripting.FileSystemObject")
if fso.folderexists(server.mappath("small") &"\"& constrfolder(ubound(constrfolder))) then
else
fso.Createfolder(server.mappath("small") &"\"& constrfolder(ubound(constrfolder)))
end if
If FSO.FileExists(server.mappath("small") &"\"& constrfolder(ubound(constrfolder)) &"\" &filen) Then
Else
Set Jpeg = Server.CreateObject("Persits.Jpeg")
Path = Server.MapPath(p2v_path(f1))
Jpeg.Open Path
Jpeg.Width = 63
Jpeg.Height =Jpeg.OriginalHeight / (Jpeg.OriginalWidth / Jpeg.Width)
Jpeg.Interpolation=0
Jpeg.Quality=100
Jpeg.Canvas.Font.Color = &HFF0000
Jpeg.Canvas.Font.size = "14"
Jpeg.Canvas.Font.Family = "宋体"
Jpeg.Canvas.Font.Bold = false
Jpeg.Canvas.Font.Quality = 100
Jpeg.Canvas.Print Jpeg.Width-64,Jpeg.Height-14, Printlog
Jpeg.Save Server.MapPath("small") & "\"& constrfolder(ubound(constrfolder)) &"\"& filen &""
jpeg.close
set jpeg=nothing
i=i+1
End If
response.write msg
End Function
function p2v_path(p_path)
'p_path为硬盘上的物理路径
dim host
host=lcase(server.MapPath("\"))
p_path=lcase(p_path)
p2v_path=replace(p_path,host,"")
end function
%>
<%
Dim fso, f, f1, fc, s,i
i=0
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(server.mappath(request("url")))
set fs=f.SubFolders
Set fc =f.Files
For Each fss in fs
dim folder_name
folder_name=fss.name
Next
For Each f1 in fc
dim filename
filename=f1.name
ReportFileStatus(filename)
Next
response.write "生成了"& i &"个缩图"
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -