我使用Elfinder客户端服务器API 2.0,我有一些阿拉伯语文件夹,当我使用命令:
connector.php?cmd=open&target=l1_Mg
我按哈希值调用目标目录,因此列出了除阿拉伯语文件以外的所有文件。
我还试图改变类elfinder中的json_encode,如下所示:
JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES
但结果还是一样的
请帮忙好吗?
应该正确设置configs encoding
和locale
,以便elFinder连接到非UTF-8字符编码的文件系统
需要elFinder 2.1.x.
$opts = array(
'roots' => array(
array(
'driver' => 'LocalFileSystem',
'path' => '/path/to/files/',
'URL' => 'http://localhost/to/files/',
'encoding' => 'YOUR ENCOFDING',
'locale' => 'YOUR LOCALE'
),
)
);
$opts = array(
// 'debug' => true,
'roots' => array(
array(
'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED)
'path' => '../files/', // path to files (REQUIRED)
'URL' => dirname($_SERVER['PHP_SELF']) . '/../files/', // URL to files (REQUIRED)
'uploadDeny' => array('all'), // All Mimetypes not allowed to upload
'uploadAllow' => array('image', 'text/plain'),// Mimetype `image` and `text/plain` allowed to upload
'uploadOrder' => array('deny', 'allow'), // allowed Mimetype `image` and `text/plain` only
'accessControl' => 'access' ,
'locale' => 'Arabic_Saudi Arabia.1256'
)
)
);
// run elFinder
$connector = new elFinderConnector(new elFinder($opts));
$connector->run();