【问题标题】:Tinymec4 file manager error : There is an error! The root folder not existTinymec4 文件管理器错误:有错误!根文件夹不存在
【发布时间】:2014-04-04 10:13:59
【问题描述】:

我正在使用文件管理器插件 (tinymce) 上传图片。但是我可以将图像上传到特定文件夹,但在图像列表中它给了我错误:有一个错误!根文件夹不存在。 我保存文件管理器插件的路径是 -

\web\bundles\stfalcontinymce\vendor\tinymce\plugins\filemanager  

我的上传文件夹的路径是 -

 web\tinymceuploads

所以我在文件管理器的 config.php 中传递参数就像 -

 $base_url="http://localhost/example/web/app_dev.php/web"; //url base of site if you want only relative url leave empty
    $upload_dir = '/tinymceuploads/'; // path from base_url to upload base dir
    $current_path = '/../../../tinymceuploads/'; // relative path from filemanager folder to upload files folder

但在单击上传按钮后的图像列表中,我收到错误消息: 有错误!根文件夹不存在。请尽快帮助我。它几乎吃了我的头。 谢谢

【问题讨论】:

    标签: php symfony tinymce-4 file-manager


    【解决方案1】:

    1.假设您的tinymce文件夹位于http://localhost/projectname/tinymce/

    2.在tinymce下创建文件夹images eg:tinymce/images

    3.转到文件夹位置tinymce/plugins/filemanager/config.php

    4.走到15到20附近的那条线——会是这个样子

    base_url="http://localhost/projectname/";

    $upload_dir = 'tinymce/images/';

    $current_path = '../../images/';

    5.添加这一行

    $root='/tinymce/';$root='../tinymce/';

    保存并运行项目。

    希望它有效....

    【讨论】:

      【解决方案2】:

      假设您的目录如下所示:

      base_url="http://localhost/projectname/"; // 基本目录

      |

      |________ 工作目录 // 你现在正在这个目录中工作

      |

      |________ tinymce 目录

      错误的配置:

      base_url="http://localhost/projectname/";
      
      $upload_dir = 'http://localhost/projectname/tinymce/images/';
      
      $root='http://localhost/projectname/tinymce';
      

      正确配置:

      base_url="http://localhost/projectname/";
      
      $upload_dir = '../tinymce/images/'; // from working folder to tinymce/images
      
      $current_path = '../../images/';  // tinymce/plugins/filemanager to  path tinymce/images
      
      $root='../tinymce/';
      

      你的上传和根目录的区别是/images单独

      它对我有用..

      【讨论】:

        【解决方案3】:

        请像这样调整你的编码 php

        $root = rtrim($_SERVER['DOCUMENT_ROOT'],'/'); // don't touch this configuration
        
        //**********************
        //Path configuration
        //**********************
        // In this configuration the folder tree is
        // root
        //   |- tinymce
        //   |    |- source <- upload folder
        //   |    |- js
        //   |    |   |- tinymce
        //   |    |   |    |- plugins
        //   |    |   |    |-   |- filemanager
        //   |    |   |    |-   |-      |- thumbs <- folder of thumbs [must have the write permission]
        
        $base_url="http://localhost"; //url base of site if you want only relative url leave empty
        $upload_dir = '/sik/assets/tinymce/source/'; // path from base_url to upload base dir
        $current_path = '../../../../source'; // relative path from filemanager folder to upload files folder
        
        $MaxSizeUpload=100; //Mb
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2012-12-13
          • 2022-07-05
          • 2018-02-07
          • 2020-09-24
          • 2015-05-10
          • 2011-06-02
          • 2018-12-13
          • 1970-01-01
          相关资源
          最近更新 更多