|  | 
    
        
            | MakeBug Micropoor@163.com  http://hi.baidu.com/micropoor   '\admin\admin_upfile.asp <%
 '略
 dim folderList,folderNum,i,folderAttr,fileList,fileNum,j,fileAttr,folder,filedir,filename,lastLevelPath
 dim dirTemplate : dirTemplate="../Upload"
 dim path : path=getForm("path","get") : if isNul(path) then path= dirTemplate
 if left(path,9)<>"../Upload" then  alert "只允许编辑Upload目录","admin_upfile.asp" : die ""
 '略
 %>
 
 
 
 |    判断问题。 利用方法:         
    
        
            |   
             '\admin\admin_template.asp <%
 checkPower
 '略
 dim folderList,folderNum,i,folderAttr,fileList,fileNum,j,fileAttr,folder,filedir,filename,lastLevelPath
 dim dirTemplate : dirTemplate="../template"
 dim path : path=getForm("path","get") : if isNul(path) then path= dirTemplate
 if left(path,11)<>"../template" then  alert "只允许编辑template目录","admin_template.asp" : die ""
 '略
 %>
 
 
 MakeBug Micropoor@163.com    |      判断问题。 利用方法:       shell篇:     
    
        
            |   
             '/admin/upload.asp <%
 '略
 attachdir="/"+sitePath+"upload"'上传文件保存路径,结尾不要带/
 dirtype=2'1:按天存入目录 2:按月存入目录 3:按扩展名存目录  建议使用按天存
 maxattachsize=2097152'最大上传大小,默认是2M
 upext="txt,rar,zip,jpg,jpeg,gif,png,swf,wmv,avi,wma,mp3,mid"'上传扩展名
 
 '略
 if upfile.isErr=3 then
 err="上传文件扩展名必需为:"+upext
 else
 err=upfile.ErrMessage
 '略
 Dim tmpPath
 isErr_=0
 Set oFileStream = CreateObject ("ADODB.Stream")
 oFileStream.Type = 1
 oFileStream.Mode = 3
 oFileStream.CharSet = "gb2312"
 '略
 tmpPath=Split(Path,".")(0)
 FileExt=GetFileExt(Path)
 if Over then
 if isAllowExt(FileExt) then
 oFileStream.SaveToFile tmpPath & "." & FileExt,2
 if Err.number<>0 then OutErr("保存文件时出错,请检查路径,是否存在该上传目录!该文件保存路径为" & tmpPath & "." & FileExt)
 Else
 isErr_=3
 ErrMessage_="该后缀名的文件不允许上传!"
 OutErr("该后缀名的文件不允许上传")
 End if
 Else
 '略
 Public Function FileData(Item)
 isErr_=0
 if file.Exists(Item) then
 if isAllowExt(File(Item).FileExt) then
 '略
 Else
 isErr_=3
 ErrMessage_="该后缀名的文件不允许上传"
 OutErr("该后缀名的文件不允许上传")
 FileData=""
 End if
 else
 ErrMessage_="不存在该对象(如该文件没有上传,文件为空)!"
 OutErr("不存在该对象(如该文件没有上传,文件为空)")
 '略
 %>
 
 MakeBug Micropoor@163.com  
 |    判断问题: 构造文件名:one.asp;jpg 上传地址:         其他信息: 默认数据库地址:\date\#A5E371101111.mdb 
 |