响应文件管理员在tinymce,目录设置 [英] Responsive filemanager in tinymce, directory settings

查看:597
本文介绍了响应文件管理员在tinymce,目录设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用该文件管理器进行文件上传。
文件管理器

I'm using this file manager for file upload in tinymce. File Manager

该目录有一些问题。我正在使用tinymce 4。

Having some problem with the directory. I'm using tinymce 4.

我的文件管理器文件夹位于 localhost / BAD / 目录中,
我有一个文件命名为about.php,位于 localhost / BAD / admin / 目录中。现在我可以上传图片并从该about.php文件中查看。我的tinymce设置是

My filemanager folder is in "localhost/BAD/" directory, I have a file named about.php which is in "localhost/BAD/admin/" directory. Now I can upload image and see from that about.php file. My settings of tinymce is

**external_filemanager_path:"/BAD/filemanager/",
filemanager_title:"Filemanager" ,
external_plugins: { "filemanager" : "filemanager/plugin.min.js"}**

我的cofig.php文件设置是

And my cofig.php file settings are

$base_url="http://localhost"; 
$upload_dir = '/BAD/source/'; 
$current_path = '../source/'; 
$thumbs_base_path = '../thumbs/';

上传图像并选择后,它将图像源框中的路径显示为。 ./source/eng.jpg 并将其保存到数据库中。

After uploading image and selecting,it shows a path in the image source box as "../source/eng.jpg" and saved that into database.

但是,我想从localhost / BAD /目录NOTlocalhost / BAD / admin /。它开始在'localhost'找到源文件,不在' localhost / BAD '

But I want to access this image from "localhost/BAD/" directory NOT "localhost/BAD/admin/". It starts to find the source file on 'localhost', Not in 'localhost/BAD'

我尝试了一些更改,但不工作。如何将源链接保存为source / eng.jpg而不是../source/eng.jpg,或者是否有任何方法从一个目录保存图像,并从上一级目录访问?

I tried some changes but not working. How can I save the source link as "source/eng.jpg" instead of "../source/eng.jpg" or is there any way to save the image from one directory and access it from previous level directory?

推荐答案

解决方案:

在tinymce init中:

In tinymce init:

relative_urls:false,
external_filemanager_path:"/BAD/filemanager/",
filemanager_title:"Filemanager" ,
external_plugins: { "filemanager" : "/BAD/filemanager/plugin.min.js"}

config.php

and in config.php

$base_url="http://localhost"; 
$upload_dir = '/BAD/source/'; 
$current_path = '../source/'; 
$thumbs_base_path = '../thumbs/';

这篇关于响应文件管理员在tinymce,目录设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆