A simple, straight-forward php directory and file listing script

Posted Sunday, June 4, 2006

Filed under: , , ,

The downloads section really lacked a nicer appearance so I just wrote an ad hoc script for it. I make the php script available in case it comes in handy for someone else.

The code is commented and the variables have pretty straight-forward names, so I won't dive into it too deep.

Just a quick overview:
First, we open the directory (or sub-directory if one has been passed as a parameter);
then list its content -less the '.' and '..' which stand for 'current' and 'parent' directory;
and if anything has been found, the folders and files are linked to.

Filesize gets wrong for big files, php manual of little help for that. Hope it's only my webhost who's meddled with ini files.

Comments disabled because of spammers.

No comments yet

Technorati Profile