Don’t bother with open/readdir and use glob
instead:
foreach(glob($log_directory.'/*.*') as $file) {
...
}
More Related Contents:
- PHP create file with specific name [closed]
- PHP list of specific files in a directory
- PHP list all files in directory [duplicate]
- Count how many files in directory PHP
- Deleting all files from a folder using PHP?
- How to delete a folder with contents using PHP [duplicate]
- Get the hierarchy of a directory with PHP
- PHP Upload fails for Video but not Image [closed]
- How to force file download with PHP
- How do I get a file name from a full path with PHP?
- How to [recursively] Zip a directory in PHP? [duplicate]
- Upload a file using PHP
- Need to write at beginning of file with PHP
- Read a plain text file with php
- PHP read sub-directories and loop through files how to?
- PHP: Check if a file is loaded directly instead of including?
- Save current page as HTML to server
- PHP: Read Specific Line From File
- Loop code for each file in a directory [duplicate]
- A recursive remove directory function for PHP?
- How can I view/open a word document in my browser using with PHP or HTML
- List and download clicked file from FTP
- Max file number can php upload at same time
- A PHP script to let users download a file from my website without revealing the actual file link in my website?
- Copy file from remote server or URL [duplicate]
- How to check if directory contents has changed with PHP?
- php script to delete files older than 24 hrs, deletes all files
- Using scandir() to find folders in a directory (PHP)
- How do I determine the extension(s) associated with a MIME type in PHP?
- How to execute and get content of a .php file in a variable?