oh wait! hold on..
what's this? Paths for include() does not need to be EXACT??!?!!
here's my directory structure...
www/home.php (my webpage)
www/scripts/feedbacks.php (prints random feedbacks)
www/scripts/lib/sanitize.php (my routines to make html compatible text)
Story:
My home.php includes in itself feedbacks.php in the body where i want to display the feedbacks retrieved from database.
contents:
include("scripts/feedbacks.php");
my feedbacks.php NEEDS sanitize.php for it's internal string routines, hence it has this:
include("scripts/lib/sanitize.php");
my problem is, if i include the feedbacks file on pages that are NOT in www/ i was worried that it will MESS UP my paths in feedbacks.php
so if parent page that includes feedbacks.php in itself is in:
www/subpages/mypage.php
it will call the feedbacks.php via
include("../scripts/feedbacks.php");
dilema is, I THOUGH i needed to edit feedbacks.php, particularly in the include path of sanitize.php such as
include("../scripts/lib/sanitize.php");
but then i found out that i dont need to.. it seems that include function can RELATIVE to the issuing script... hence i need not edit feedbacks.php no matter where i call it in my directory tree.. hmm.. i didnt know this was so..