Page 1 of 1

PHP Subpage Folder Call

Posted: Tue Aug 26, 2008 9:01 am
by brockf12
I am creating a website that calls subpage names from the parent folder and displays them as links. I am using a content management system, but unfortunately it is not working properly.

What is the code for calling subpages from the parent folder? Possibly also showing the parent folder name?

I installed Wamp for developing websites and the default page automatically calls my project folders, this is exactly what I need. Those images are included.

I can't find or can't understand the PHP code. So, what is it?

Image

Image

Re: PHP Subpage Folder Call

Posted: Wed Aug 27, 2008 10:19 am
by jaoudestudios
when you load http://locahost/ in your browser it uses apaches default settings to display the list of folders and files. This will not be available on a production server without modification and is NOT recommended as it is a security risk.

scandir is the php function you want to scan a directory for files and folders, this way you can control the users access and level.

Re: PHP Subpage Folder Call

Posted: Fri Aug 29, 2008 12:18 pm
by brockf12
Thanks for the reply. I just want the PHP code for my operational server.

What specific scandir code would I use then for a very simple call?

Re: PHP Subpage Folder Call

Posted: Sat Aug 30, 2008 6:06 am
by jaoudestudios
Here is the details for the php function scandir...
http://uk3.php.net/scandir