0

我已经为 php 集成了 ckfinder 3 并在上传图片后,在根目录中获取上传图片的目录,而不是在我的项目目录中,但我需要在我的项目目录中,比如project/upload/ckfinder/userfiles

我在ckfinder/config.phpckfinder的文件中尝试如下:

$config['backends'][] = array(
    'name'         => 'default',
    'adapter'      => 'local',
    'baseUrl'      => base_url().'upload/ckfinder/userfiles/',
    //'root'         => '', // Can be used to explicitly set the CKFinder user files directory.
    'chmodFiles'   => 0777,
    'chmodFolders' => 0755,
    'filesystemEncoding' => 'UTF-8',
);

但它不起作用
请帮助我。提前致谢

4

1 回答 1

1

baseUrl用于设置后端是可选的,并且root是必需的。

如果“项目”是index.php找到 CodeIgniter 文件的文件夹,则使用此后端

$config['backends'][] = array(
     'name'               => 'default',
     'adapter'            => 'local',
      //'baseUrl'            => '',
     'root'               => FCPATH .'upload/ckfinder/userfiles/',
     'chmodFiles'         => 0755,
     'chmodFolders'       => 0755,
     'filesystemEncoding' => 'UTF-8',
     'followSymlinks'     => true
 );
于 2018-11-25T15:44:01.387 回答