我正在将此配置用于我的 Elfinder 与 CKEditor 一起使用。
$opts = array(
// 'debug' => true,
'roots' => array(
array(
'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED)
'path' => '../../uploads/', // path to files (REQUIRED)
'URL' => dirname($_SERVER['PHP_SELF']) . '/../../uploads/', // URL to files (REQUIRED)
'accessControl' => 'access' , // disable and hide dot starting files (OPTIONAL)
'uploadAllow' => array('image/jpg', 'image/png'),
'alias' => 'Home',
'mimeDetect' => 'internal',
'imgLib' => 'gd',
),
),
);
但是,我可以上传所有文件,甚至是 PHP 文件!我只想上传图片。我无法限制上传。我哪里错了?