Chinese Character do not showing on Listing Files

29 views
Skip to first unread message

rudyhalim...@gmail.com

unread,
Mar 11, 2015, 6:27:41 AM3/11/15
to director...@googlegroups.com
Hi All,

I successfully installed the directorylister at my server without any problem.

Now i have a file with chinese character filename, but the directorylister cannot list the chinese character filenames. It is only blank file name and only one row. Even i have 3 different files with their own chinese character filename.

Can anybody help me what i suppose to do / add to the script to enable the chinese character so it can list down the file?

Note: Only 1 row with empty file name is listed, and the link is correct and i was able to download one of the file.

Thanks in advance.

huuan...@gmail.com

unread,
Apr 16, 2015, 3:35:21 AM4/16/15
to director...@googlegroups.com, rudyhalim...@gmail.com
我也是同样的问题,楼主解决了吗?

在 2015年3月11日星期三 UTC+8下午6:27:41,rudyhalim...@gmail.com写道:

jerry...@gmail.com

unread,
Aug 30, 2018, 5:32:46 AM8/30/18
to Directory Lister Mailing List

simply edit /resources/DirectoryLister.php

search
“ $directoryArray[pathinfo($relativePath, PATHINFO_BASENAME)] = array( ”

replace with
" preg_match('/\/([^\/]*)$/', $relativePath, $matches);
$pathname = isset($matches[1]) ? $matches[1] : $relativePath;
$directoryArray[$pathname] = array( "

Chinese folder and filename will display correctly.

Thanks,

Jerry

jerry...@gmail.com

unread,
Aug 30, 2018, 5:35:22 AM8/30/18
to Directory Lister Mailing List

只需简单编辑 /resources/DirectoryLister.php

搜寻
“ $directoryArray[pathinfo($relativePath, PATHINFO_BASENAME)] = array( ”

替换为
" preg_match('/\/([^\/]*)$/', $relativePath, $matches);
$pathname = isset($matches[1]) ? $matches[1] : $relativePath;
$directoryArray[$pathname] = array( "

中文档案夹和档案名称就能正常显示了。

希望帮到您

Jerry
Reply all
Reply to author
Forward
0 new messages