Tinymec4文件管理器错误:有一个错误!根文件夹不存在


Tinymec4 file manager error : There is an error! The root folder not exist

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

'web'bundles'stfalcontinymce'vendor'tinymce'plugins'filemanager  

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

 web'tinymceuploads

所以我在配置中传递参数.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

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

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

2.在 tinymce 下创建文件夹图像,例如:tinymce/images

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

4.转到 15 到 20 附近的行 - 它会看起来像这样

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

$upload_dir = 'tinymce/images/';

$current_path = '../../图像/';

5.添加此行

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

保存并运行项目。

希望它有效....

假设您的目录如下所示:

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

它对我有用..

请像这样调整你的编码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