php - 如何配置文件管理器插件?

标签 php jquery tinymce rich-text-editor file-manager

我正在使用tinyMce作为文本区域,并且我正在使用File Manager Plugin但我对配置文件没有运气。

这是部分原创内容

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

我得到的是这个

$base_url="http://localhost/atravesfree";
$upload_dir = '/atravesfree/public/source/';
$current_path = '';

这就是结果,我在文件夹中有一张图像,但没有显示。我知道我需要设置“current_path”,但我不知道到底该怎么做。

File Manager Result

我正在使用一个名为“Freekore”的框架,文件夹的顺序如下

This is the location of the filemanager folder
-root [localhost/atravesfree - G:/wamp/www/atravesfree]
    |-public
        |-_HTML
            |-themes
                |-mytheme
                    |-js
                        |-plugins
                            |-filemanager

This is the location where I have, and where I want, the uploaded files
-root [localhost/atravesfree - G:/wamp/www/atravesfree]
    |-public
        |-source

感谢您的帮助。


解决此问题后,我收到此错误“路径不可写”,原因是“thumbs”文件夹没有写入权限。

最佳答案

试试这个

$dir='http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']);
$dir=str_replace('filemanager', '', $dir);
$base_url="http://www.site.com";
$upload_dir = $dir.'source/';
$current_path = '../source/';
$thumbs_base_path = '../thumbs/';

显然替换目录和您的站点。拇指是可选的。

关于php - 如何配置文件管理器插件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20648672/

相关文章:

php - 正则表达式:匹配除包含 ".js"和 ".css"的任何 URL

php - 从 Laravel 5 中的动态表单将多行保存到数据库

javascript - 无法使用jquery的remove()删除元素

javascript - jquery.pngFix.js 使页面卡住

css - 如何在不使用源按钮的情况下将类添加到 Umbraco 7 的 TinyMCE 中的表中?

php - GWT TinyMCE拼写检查

php - 在数据库中插入数据后隐藏div

javascript - 如果元素不存在,如何像 jQuery() 一样静默地使 querySelector() 失败

css - tinymce格式化

php - 只有当所有其他表数据都正确时才选择一个数据