I\'m using the following PHP code to list all files and folders under the current directory:
Using glob and sort it should work.