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 CKFinde that simply is not working for me.
Help very much appreciated and needed.
CODE
$docRoot = getenv("DOCUMENT_ROOT"); // gets absolute document root w/o a trailing slash
$siteName = $_SERVER['HTTP_HOST'];
$USERNAME = $_SESSION['thisusername']; // session sent from main page that holds the username value
$baseUrl = ' . $siteName . '/ckfinder/userfiles/';
$baseDir = $docRoot . '/ckfinder/userfiles/';
/*=================================== Backends ========================================*/
// $config['backends'][] = array(
'name' => 'default',
'adapter' => 'local',
'baseUrl' => "/ckfinder/userfiles/",
'root' => $baseDir, // Can be used to explicitly set the CKFinder user files directory.
'chmodFiles' => 0777,
'chmodFolders' => 0755,
'filesystemEncoding' => 'UTF-8',
);
Jim Null
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 CKFinde that simply is not working for me.
Help very much appreciated and needed.
CODE
$docRoot = getenv("DOCUMENT_ROOT"); // gets absolute document root w/o a trailing slash
$siteName = $_SERVER['HTTP_HOST'];
$USERNAME = $_SESSION['thisusername']; // session sent from main page that holds the username value
$baseUrl = ' . $siteName . '/ckfinder/userfiles/';
$baseDir = $docRoot . '/ckfinder/userfiles/';
/*=================================== Backends ========================================*/
// $config['backends'][] = array(
'name' => 'default',
'adapter' => 'local',
'baseUrl' => "/ckfinder/userfiles/",
'root' => $baseDir, // Can be used to explicitly set the CKFinder user files directory.
'chmodFiles' => 0777,
'chmodFolders' => 0755,
'filesystemEncoding' => 'UTF-8',
);
Jim Null