我在tinymce中使用responsivefilemanager进行文件上传。但在设置配置文件中我有问题。
安装和服务器详细信息:
base url : h**p://localhost (xammp)
folder : /user/
upload folder : /user/uploads/files/
thumbs folder : /user/uploads/files/thumbs/
Install filemanager: /user/templates/admin/js/filemanager/
现在,我设置了这样的配置文件:
$base_url =
// Get HTTP/HTTPS
((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && !in_array(strtolower($_SERVER['HTTPS']),array('off','no'))) ? 'https' : 'http').
'://'.
// Get domain portion
$_SERVER['HTTP_HOST']; // DON'T TOUCH (base url (only domain) of site (without final /)).
$upload_dir = '/user/uploads/files/'; // path from base_url to base of upload folder (with start and final /)
$current_path = '../../files/'; // relative path from filemanager folder to upload folder (with final /)
//thumbs folder can't put inside upload folder
$thumbs_base_path = '../../thumbs/';
但这不起作用,不会上传/创建文件夹......
如何修复/编辑配置文件?
答案 0 :(得分:0)
只需替换:
$current_path = '../../files/'; // relative path from filemanager folder to upload folder (with final /)
//thumbs folder can't put inside upload folder
$thumbs_base_path = '../../thumbs/';
使用:
$current_path = '../../../../uploads/files/'; // relative path from filemanager folder to upload folder (with final /)
//thumbs folder can't put inside upload folder
$thumbs_base_path = '../../../../uploads/files/thumbs/'; // relative path from filemanager folder to thumbs folder (with final /)
答案 1 :(得分:0)
这是我对Localhost / Real Host的解决方案
$ vDomsDev = array(' localhost',' localhost:80');
if(in_array($ _ SERVER [' HTTP_HOST'],$ vDomsDev)){
//////////////////////////////
// DEVELOPMENT
/////////////////////////////
$dominioSeg = $dominio = 'http://'.$_SERVER['HTTP_HOST'].'/LOCALFOLDER/';
}else{
//////////////////////////////
// Real Serv
//////////////////////////////
if($_SERVER['SERVER_NAME'] == 'www.mywebpage.com'){
$dominio = 'http://'.$_SERVER['SERVER_NAME'];
$dominioSeg = 'https://'.$_SERVER['SERVER_NAME'];
}else{
$dominioSeg = $dominio = 'http://'.$_SERVER['SERVER_NAME'];
}
}
$ config = array(
'base_url' => $dominioSeg,
'upload_dir' => '/uploads/images/',
'current_path' => '../../../uploads/images/'