directory-listing

how to iterate over non-English file names in PHP

I have a directory which contains several files, many of which has non-english name. I am using PHP in Windows 7. I want to list the filename and their content using PHP. Currently I am using DirectoryIterator and file_get_contents. This works for English files names but not for non-English (chinese) file names. For example, I have fi...

PHP recursive directory listing - directories ONLY

I am working on a file manager project and can't seem to get my head around doing a recursive directory listing where I only get the directories. Everything I've tried either leaves off empty sub-directories or won't work when I try to parse it into the return structure to my jQuery tree. I've tried using an array, and the recursive ...

How to know what kind of directory listing style the FTP server is using?

I have to create my own FTP client. I found there are two kinds of directory listing styles a FTP server might use, UNIX and MS-DOS. Is there a way that I can send an message to FTP server, to ask what kind of directory it is using? ...