ASP问题!上传判断!

来源:百度知道 编辑:UC知道 时间:2024/05/09 10:17:40
下边这个是无组建上传系统,如何通过ASP判断上传类型?如果不是GIF或JPG就不给上传,可以帮我看看改改吗?

上传页面
--------------------------------------------------------------

<!--#include FILE="upload.inc"-->
<html>
<head><title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style></head>
<body bgcolor="#FFFFFF">
<%
nowtime=now()
sj=cstr(year(nowtime))+"-"+right("0"+cstr(month(nowtime)),2)+"-"+right("0"+cstr(day(nowtime)),2)
dim upload,file,formName,formPath,iCount,pic
set upload=new upload_f '建立上传对象
'--------将日期转化成文件名--------
function MakedownName()
dim fname
fname = now()
fname = replace(fname,"-","")
fn

<!--#include FILE="upload.inc"-->
<html>
<head><title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style></head>
<body bgcolor="#FFFFFF">
<%
nowtime=now()
sj=cstr(year(nowtime))+"-"+right("0"+cstr(month(nowtime)),2)+"-"+right("0"+cstr(day(nowtime)),2)
dim upload,file,formName,formPath,iCount,pic
set upload=new upload_f '建立上传对象
'--------将日期转化成文件名--------
function MakedownName()
dim fname
fname = now()
fname = replace(fname,"-","")
fname = replace(fname," ","")
fname = replace(fname,":","")
fname = replace(fname,"PM",&qu