Directory Listing

Published November 6th, 2013
Category Blog, Labs, PHP


Directory listing using PHP. It’s basically an index file listing the directory inside a specified folder on your webserver, for example listing all image files inside a subfolder named …/img. Essentially this is a handy PHP script for bypassing restrictions implied by your webhost. I use this so I can decide if my webserver is allowed to list a selection of files in a directory or not, and not my webhost.

I crawled the web for a while looking after possible scripts and workarounds for this. After some  time I stumbled onto evoluted.net who had already magically conjured together a very smart and lightweight PHP script doing exactly what I wanted.

I’ve made minor changes to the original PHP script

  • created my own icons to go in the listed directory
  • simplified CSS styling
  • added visual legends for sorting

PHP Directory Listing Script by evoluted.net.

Download my version including the redesigned icons. (.zip file)

 

\todo

– fix double parameters in listing
– play around with folder/file permissions (for now everyone can read)
– css / possibilities for styling
– public upload; yes/no, permissions, restrictions, possibilities

labthing