Assign multiple default folders to look through (path)??

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
calfellows
Forum Newbie
Posts: 10
Joined: Mon Apr 07, 2008 3:10 am

Assign multiple default folders to look through (path)??

Post by calfellows »

Hello,

Is there some way to assign some folders as a default files paths for the php controller script to look through for templates and content, so that I wont have to keep entering this in all of my includes and urls? I already have my server root defined in a $variable, but I need to add some multiple choices past that.

Code: Select all

 
<?php include ($serverrootdir . ''.$defaultpaths.'' . $data); ?>         .
 
Also, is there some way to do this where my query wont display
the entire url, will hide the folders? Or is this wishful thinking?

Code: Select all

index.php?data=/folder/file.php
I'm not too bright with all of this, so please be thorough?

Thanks in Advance,
Cal
Post Reply