zoukankan      html  css  js  c++  java
  • UEditor1.4.3上传图片提示上传失败

    通过UEditor1.4.3上传图片附件时,提示上传错误。发现JS报错如下图:

    UEditor的asp目录下controller.asp?action=uploadimage文件报500错误。

    打开页面,具体错误内容为:

    ADODB.Stream 错误 '800a0bb9'

    参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。

    /ueditor/asp/MultiformProcessor.class.asp,行 73

    解决办法:

    打开文件ueditoraspUploader.Class.asp,找到大概203行处。

    改前:

    Private Function CheckOrCreatePath( ByVal path )
            Set fs = Server.CreateObject("Scripting.FileSystemObject")
            Dim parts
            parts = Split( path, "" )
            path = ""
            For Each part in parts
                path = path + part + ""
                If fs.FolderExists( path ) = False Then
                    fs.CreateFolder( path )
                End If
            Next
        End Function

    改后:

    Private Function CheckOrCreatePath( ByVal path )
        Set fs = Server.CreateObject("Scripting.FileSystemObject")
        Dim parts
            Dim root : root = Server.mappath("/") & ""
        'parts = Split( path, "" )
            parts = Split( Replace(path, root, ""), "" )
        'path = ""
            path = root
        For Each part in parts
          path = path + part + ""
          If fs.FolderExists( path ) = False Then
            fs.CreateFolder( path )
          End If
        Next
      End Function

    其它解决方法:

    文件夹asp中有个文件uploader.class.asp,其中有个检查或创建路径的子程序Private Function CheckOrCreatePath( ByVal path ),在这段程序中有两句 parts = Split( path, "" )和path = path + part + "",你把这两句中的反斜杠都改成“/”,也就是这两句最后应当分别是parts = Split( path, "/" )和path = path + part + "/",这样就可以了。

    UEditor其它相关问题:

    http://www.cnblogs.com/cdxkyz/p/4007782.html

  • 相关阅读:
    Git failed with a fatal error. Authentication failed
    HttpClient 获取json,即使返回状态不成功也返回json
    win10恢复Windows Media Player
    .NET Core部署到linux(CentOS)最全解决方案
    EasyNetQ 相关问题和解决方法
    RabbitMQ And EasyNetQ
    打爆你的 CPU
    通过代码实现 OutOfMemory
    如何写一段死锁代码
    docker 容器(container)使用ssh服务登录一段时间无操作后自动断开问题解决
  • 原文地址:https://www.cnblogs.com/w-zoe/p/6382311.html
Copyright © 2011-2022 走看看