ElfinderClient Server API阿拉伯语langage

时间:2016-08-25 11:58:37

标签: javascript php jquery api elfinder

使用Elfinder客户端服务器API 2.0,我在阿拉伯语中有一些文件夹,当我使用命令时:

    connector.php?cmd=open&target=l1_Mg

我通过哈希调用目标中的目录,因此所有文件都列在阿拉伯语言中。

此外,我尝试更改类elfinder中的json_encode,如下所示:

    JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES

但结果仍然相同

请帮忙吗?

2 个答案:

答案 0 :(得分:0)

应该正确设置配置encodinglocale,以便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'
        ),
    )
);

答案 1 :(得分:0)

$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();