php code to list contents of the directory the php file resides in?

Mike

New member
Hi, I have my server set up to NOT list the files of a directory, so no indexing, but some times I upload things for friends and want the contents of that directory to be listed so I dont have to manually create the links for them.

I have tried several websites which listed a lot of different sets of code to apparently do this but with no luck.

I do not know php
I am hoping to place a file, something like list.php inside the folder that contains the files, and for the php to list the contents of the folder which the php file resides in.

could someone help me out with a quick bit of code that will do this simple function for me?
Thank you very much
 
Back
Top