List files script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tr1x
Forum Newbie
Posts: 1
Joined: Sun Jun 15, 2008 8:32 pm

List files script

Post by tr1x »

I've looked for hours but I can't find the script that I need, and I'm not good enough at PHP to write it myself, so I was wondering if someone could share some code with me.

All I need is a script that will list all the files in a directory, and display the filesize next to the filename. Also.. since I have over 1,000 files in the directory, is it possible to make it display like 100 per page or something?

Any help is greatly appreciated.
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Re: List files script

Post by Ollie Saunders »

Your post goes against the spirit in which this board was founded.

I can direct you to glob() and filemtime() but it is unlikely anyone will write this for you unless you are willing to pay for it. Google will be a more powerful tool for finding something that has already been written.

Also this isn't very difficult to do if you familiarize yourself with the basics of PHP I think you should give it a go as long as you have some time.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Re: List files script

Post by Ambush Commander »

This is a very simple script, very good for a beginner. You should try coding it!
Post Reply