Responsive filemanager in tinymce, directory settings

一个人想着一个人 提交于 2020-01-15 23:03:10

问题


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

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

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"}**

And my cofig.php file settings are

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

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

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'

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?


回答1:


Solution:

In tinymce init:

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

and in config.php

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


来源:https://stackoverflow.com/questions/19627785/responsive-filemanager-in-tinymce-directory-settings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!