PHP: List Files in Directory

      No Comments on PHP: List Files in Directory

The following snippet lists all files and subdirectories in the specified directory. For the files it lists the file size as well. It uses the following functions: opendir, readdir, is_dir, filesize. All the functions are available in PHP4 and PHP5 so the code runs without any problem on PHP4+.

Leave a Reply

Your email address will not be published. Required fields are marked *