saveupload.asp

来自「不错的asp论坛,大家可以看看啊和呵呵.」· ASP 代码 · 共 37 行

ASP
37
字号
<!--#include file="upload_5xsoft.inc" -->
<!--#include file="../inc/config.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="inc/error.asp"-->
<!--#include file="inc/FORMAT.asp"-->
<body bgcolor="<%=bgcolor%>" leftmargin="0" topmargin="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">
<script language="Javascript">
function pic(smileface)
{
	window.opener.document.form2.pic.value=smileface;
}
</script>
      <%
set upload=new upload_5xSoft
set file=upload.file("file1")
formPath="upload/"
if file.filesize>100 then
fileExt=lcase(right(file.filename,3))
if fileExt="asp" then
Response.Write"文件类型非法"
end if
end if
randomize
ranNum=int(90000*rnd)+10000
filename=formPath&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum&"."&fileExt
if file.FileSize>0 then 
file.SaveAs Server.mappath(FileName)
end if
response.write "图片上传成功,[<a href='upload.asp'>返回继续上传</a>]<br>图片是:<a href=Javascript:pic('admin/"&filename&"');>缩略图</a>"
%>
    </td>
  </tr>
</table>
</body>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?