umeditor1.4.3 Asp 版本 图片上传错误
发布网友
发布时间:2022-12-26 01:46
我来回答
共1个回答
热心网友
时间:2023-10-14 08:43
我也是和你一样的问题,最后发现里面的一个fso函数有问题,不能执行相关判断,然后一样报错,解决方案:把ueditor/asp/uploader.class.asp里面的CheckOrCreatePath函数注释掉,然后加入
Public Function CreateDir(ByVal crDirname)
Dim M_fso
CreateDir=False
Set M_fso = CreateObject("Scripting.FileSystemObject")
If (M_fso.FolderExists(crDirname)) Then
CreateDir=False
Else
M_fso.CreateFolder(crDirname)
CreateDir=True
End If
Set M_fso = Nothing
End Function
Function CheckOrCreatePath(byval LocalPath) '建立目录的程序,如果有多级目录,则一级一级的创建
on error resume next
LocalPath = replace(LocalPath,"\","/")
set FileObject = server.createobject("Scripting.FileSystemObject")
patharr = split(LocalPath,"/")
path_level = ubound(patharr)
for i = 0 to path_level
if i=0 then pathtmp=patharr(0) & "/" else pathtmp = pathtmp & patharr(i) & "/"
cpath = left(pathtmp,len(pathtmp)-1)
if not FileObject.FolderExists(cpath) then FileObject.CreateFolder cpath
next
set FileObject = nothing
if err.number<>0 then
CreateDIR = false
err.Clear
else
CreateDIR = true
end if
End Function
然后刷新重试。