找到command.asp

查找

sFileName = oUploader.File( "NewFile" ).Name

看清楚了,这个就是文件名啦,我们来把它改掉,当然得有个生成文件名的函数才行,改成下面这样

 

sFileName = GetNewID() &"."& split(oUploader.File( "NewFile" ).Name,".")(1)

把下面这个函数放到最后面

 

'autorename 
Function GetNewID()
dim ranNum
dim dtNow
randomize
Dim nn:nn=Now()
GetNewID=Year(nn)&Month(nn)&Day(nn)&Hour(nn)&Minute(nn)&Second(nn)&Int(8999*Rnd +1000)
End Function