2024年5月26日发(作者:)

上传的图片存到images/upfile文件夹下。

<%

if Request("menu")="up" then

On Error Resume Next

Set upl = Object("")

If -2147221005 = Err Then

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

set FileUP=new Upload_file

e(-1)

formPath="images/upfile/"

set file=("file")

filename=formPath&year(now)&month(now)&day(now)&hour(now)&minute(no

w)&second(now)&"."&t

select case LCase(t)

case "gif"

img="[img]"&cluburl&"/"&filename&"[/img]"

case "jpg"

img="[img]"&cluburl&"/"&filename&"[/img]"

case "swf"

img="[flash]"&cluburl&"/"&filename&"[/flash]"

case else

error2("Sorry ,this local server only supports GIF , JPG and SWF forma

t of filesn does not support "&t&" format of files")

end select

File h(filename)

set FileUP=nothing

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

else

filename=""&year(date)&""&month(date)&""&day(date)&""&hour(time)&""&min

ute(time)&""&second(time)&""

select case ""&tType&""

case "application/octet-stream"

error2("Unknown file format!")

case "image/gif"

第 1 页

types="gif"

case "image/pjpeg"

types="jpg"

case "application/x-shockwave-flash"

types="swf"

end select

filename="images/upfile/"&filename&"."&types&""

if types="gif" or types="jpg" then

img="[img]"&cluburl&"/"&filename&"[/img]"

elseif types="swf" then

img="[flash]"&cluburl&"/"&filename&"[/flash]"

else

error2("Sorry ,this local server only supports GIF , JPG and SWF forma

t of filesn does not support "&tType&"format of files")

end if

h(""&filename&"")

set upl=nothing

End If

"