The function of this script is to distinguish wether the returned array is a file or directory, if it is a file, it generates a link to download the file, otherwise if it's a
dir, it creates a link to list the files/dirs in that directory, works on windows and *nix platforms.
Some simple functions to handle data for those wanting to write php console scripts with readline, with an example for adding colour to your scripts too.