📄 fileconfig.asp
字号:
<%
Dim UploadFilePath,UploadLimitSize,NotAllowfileext,BrowerFilePath
UploadFilePath = "../UpLoadFiles"&"/"&Year(date)&Month(date)&"/"
'文件上传路径
BrowerFilePath = "/"
UploadLimitSize = 1024*500 '50M
'最大上传文件大小,单位为K
NotAllowfileext = "asp|cer|cdx|asa|htw|ida|idq|shtm|shtml|stm|printer|cgi|php|php4|cfm|aspx"
'不可以上传的文件类型
function CanUpload(Fileurl)
Fileurl = lcase("|"& Mid(Fileurl, InstrRev(Fileurl, ".") + 1)& "|")
NotAllowfileextstr = "|"&NotAllowfileext&"|"
if instr(NotAllowfileextstr,Fileurl)>0 then
CanUpload = false
else
CanUpload = true
end if
end function
Function CreateFolder(Filepath)
Dim fso, f
on error resume next
Set fso = CreateObject("Scripting.FileSystemObject")
if not fso.FolderExists(Filepath) then
Set f = fso.CreateFolder(Filepath)
set f = Nothing
end if
set fso = Nothing
End Function
dim mychar,my,mycodenum,mycode
mychar="0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"
my=split(mychar,",")
mycodenum=4
for i=1 to mycodenum
Randomize
mycode=mycode&my(Int((21*Rnd)))
next
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -