I’m confused about all the file system functions in php (glob, scandir, opendir…) I simply want a list of folders and files – like in a file explorer something like this: Any help? Answer One approach :
Tag: filesystems
glob() can’t find file names with multibyte characters on Windows?
I’m writing a file manager and need to scan directories and deal with renaming files that may have multibyte characters. I’m working on it locally on Windows/Apache PHP 5.3.8, with the following file names in a directory: filename.jpg имяфайла.jpg file件name.jpg פילענאַמע.jpg 文件名.jpg Testing on a live UNIX server woked fine. Testing locally on Windows using glob(‘./path/*’) returns only the first
PHP directory separators, forcing forward slash; non-intrusive
Whenever I work with PHP (often) I typically work on a Windows box, however I (try to) develop platform agnostic applications; one major point of issue being the use of directory separators. As many …
How do I find the MIME type of a file with PHP?
I have an index.php file which has to process many different file types. How do I guess the filetype based on the REQUEST_URI? If I request http://site/image.jpg, and all requests redirect through index.php, which looks like this How would I make that work correctly? Should I test based on the extension of the file requested, or is there a way