解决办法:
1. 关闭 IIS Admin Service 服务 (运行iisreset.exe /stop)
2. 打开 Windows\system32\inesrv\metabase.xml
3. 修改 SPMaxRequestEntityAllowed 的值为自己需要的, 默认帆轮模为 204800
4. 启动 IIS Admin Service (运行iisreset.exe /start)
注意备份metabase.xml 文件
<html><title>example</title><body>
<!--#include FILE="upload_5xsoft.inc"-->
<%
set upload=new upload_5xsoft
set file=upload.file("file1"旁则凳)
response.write upload.form("submit")&"<br>"
if file.fileSize>0 then
file.saveAs Server.mappath("temp.jpg")
response.write "<br>上传文件:"&file.FileName&" =>temp.jpg OK!"
response.write "<br>文件大小:"盯隐&file.FileSize
end if
set file=nothing
set upload=nothing
%></body>
</html>
2.列表出有文件表单(多文件上传)
<html><title>example</title>
<body>
<!--#include FILE="upload_5xsoft.inc"-->
<%
set upload=new upload_5xsoft
''列出所运旅有form数据
for each formName in upload.objForm
response.write formName&"="&upload.objForm(formName)&"<br>"
next
''列出所有文件
for each formName in upload.objFile
set file=upload.objFile(formName)
if file.FileSize>0 then
file.SaveAs Server.mappath(file.FileName)
response.write file.FilePath&file.FileName&" ("&file.FileSize&") =>"
response.write file.FileName&" 成功!<br>"
end if
set file=nothing
next
set upload=nothing
%>
具体在化境文件夹下有说明
aspjpeg对,楼上说了,用aspjpeg。Set Jpegppp = Server.CreateObject("Persits.Jpeg")
Jpegppp.Open FileName
Jpegppp.PreserveAspectRatio=true'等比缩颂谈放
Jpegppp.Interpolation=2
Jpegppp.Quality=100
Jpegppp.Width = 宽度
Jpegppp.crop 0,CInt((Jpegppp.Height-高度)/2),宽度,CInt((Jpegppp.Height-高唯樱升度)/2)+高度
jpegppp.Sharpen 1, 120
Jpegppp.Save server.MapPath(strDir&""&file_numa&"2"指老&file_numab&fileEXT)
Jpegppp.close
set Jpegppp=nothing
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)