by Tim Hill
Suitable for any browser on any OS on any device.
A web server with PHP is required.
Cat.php lists all the objects in the directory it resides as a clickable list, together with file information. Without modification this script will adapt for any files you may add, remove or rename. If you make changes to the files in the directory, all you have to do is reload the page in the browser as the script will reread all the file information and change its display.Try cat.php
Save cat.php to any web folder and then use its URL in a browser to obtain a list of that folder’s contents from which you can select or download any file.Download cat.php
Tips: you could change the file’s name to index.php and use it as a substitute before you have written a pukka one or use it like that if the folder is simply to present a collection of zip or any other files. It’s a way to produce a file listing from any ISP’s web space who provide an error page when the index page is missing. If you examine cat.php in an editor you will see two user variables at the top and easy access to the styles used. One variable enables/disables the ‘directory index’ and/or ‘parent directory’ link(s) and the other enables a specific ‘download’ link for every file in addition to the hyperlink. This does not work on some web servers (such as WebJames) and is off by default. The file ‘download.php’ has to be present for the download links to work.