发布时间:2015/3/22 13:35:38
查找upload.class.asp ,将最后一个CheckOrCreatePath改为以下代码
Private Function CheckOrCreatePath( ByVal path )
Set fs = Server.CreateObject("Scripting.FileSystemObject")
Dim parts
Dim root : root = Server.mappath("/") & "\"
parts = Split( Replace(path, root, ""), "\" )
path = root
For Each part in parts
path = path + part + "\"
If fs.FolderExists( path ) = False Then
fs.CreateFolder( path )
End If
Next
End Function
问:为什么修改?
答:程序默认的管理员权限运行建目录语句,但是一般的虚拟主机权限只有匿名用户权限,无法读到非用户目录,因此创建文件夹会出错