响应式文件管理器上传公共

时间:2018-01-31 08:59:10

标签: php responsive-filemanager

我正在尝试在安全的环境中实现响应式文件管理器,用户必须登录才能访问文件库。 为确保用户在登录会话处于活动状态时只能访问上传的文件,我已将文件管理员上传文件夹放在public_html上方。

$config = array(
/*
|-------------------------------------------------------------------
| DON'T TOUCH (base url (only domain) of site).
|-------------------------------------------------------------------
| without final / (DON'T TOUCH)
*/
'base_url' => ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && ! in_array(strtolower($_SERVER['HTTPS']), array( 'off', 'no' ))) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'],

/*
|-------------------------------------------------------------------
| path from base_url to base of upload folder
|-------------------------------------------------------------------
| with start and final /
*/
'upload_dir' => '/../Uploads/content/',

/*
|--------------------------------------------------------------------
| relative path from filemanager folder to upload folder
|--------------------------------------------------------------------
| with final /
*/
'current_path' => '../../../../Uploads/content/',

/*
|--------------------------------------------------------------------
| relative path from filemanager folder to thumbs folder
|--------------------------------------------------------------------
|
| with final /
| DO NOT put inside upload folder
*/
'thumbs_base_path' => '../../../../Uploads/thumbs/',

在使用上述配置时,我不断收到以下错误:

  

有错误!那里的上传文件夹没有。检查config.php文件。

申请表的结构如下:

-Uplevel from public

- httpdocs(public_html)

--- myapplication

---- admin

-----利布斯

------- Filemanager目录

请注意,上层包含一个“上传”目录,即上传文件夹。

甚至可以将上传文件夹放在public_html上面吗? 我尝试了不同的路径,也将服务器路径设置为base_path,但仍然没有结果。

如果你能帮我解决这个问题会很棒。

由于

1 个答案:

答案 0 :(得分:1)

Filemanager directory转到Uplevel是5级。

'upload_dir' => '../../../../../Uploads/content/',
'current_path' => '../../../../../Uploads/content/',
'thumbs_base_path' => '../../../../../Uploads/thumbs/',

确保contentthumbs文件夹在Uploads中创建并具有写入权限。

现在,当您将路径转储到图片时,Uploads文件夹不在public_html之外,而在myapplication之内..那么路径应为

'upload_dir' => '../../../Uploads/content/',
'current_path' => '../../../Uploads/content/',
'thumbs_base_path' => '../../../Uploads/thumbs/',