dongnanman9093 2015-11-20 18:35
浏览 29

CKFinder / CKEditor

I am using CKFinder to upload files to my site where all my users should have their own folder storing their own files in them.

My desired result is that the folder for user files uploaded will be ckfinder/userfiles/$USERNAME

I have the following information in the config.php file of CKFinder that simply is not working for me.

Help very much appreciated and needed.

$docRoot = getenv("DOCUMENT_ROOT"); 
$siteName = $_SERVER['HTTP_HOST'];
$USERNAME = $_SESSION['thisusername']; // session via main page username value
$baseUrl = 'http://' . $siteName . '/ckfinder/userfiles/';
$baseDir =  $docRoot . '/ckfinder/userfiles/';

/*=================================== Backends    =====*/
$config['backends'][] = array(
'name'         => 'default',
'adapter'      => 'local',
'baseUrl'      => "/ckfinder/userfiles/",
'root'         => $baseDir,
'chmodFiles'   => 0777,
'chmodFolders' => 0755,
'filesystemEncoding' => 'UTF-8',
);
  • 写回答

2条回答 默认 最新

  • dongque4778 2015-11-20 19:50
    关注

    you have to use the variable $USERNAMEsomewhere, else nothing will happen by itself. Most likely: 'baseUrl' => "/ckfinder/userfiles/" . $USERNAME ."/",

    评论

报告相同问题?

悬赏问题

  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码