So i have a site that i put all files that are being included in an 'includes' folder. i hate having a messy root folder, this is why i do this. here's my problem. index.php includes a sidebar. this sidebar needs to include some referrer script called log.php sidebar.php is in the includes folder. if i add it like this <?php include('./referrers/log.php'); ?> it works on index.php but it wont work on any pages where sidebar.php is being called but the parent file isnt on the root directory. public_html --index.php <-- works --includes ----sidebar.php --referrers ----log.php --mail ----error.php <-- does not work ('../referrers/log.php') does work in the error.php in the mail folder but not in index.php a solution would be to get rid of the includes folder and have header.php, footer.php and sidebar.php in the root folder, but id rather not if there's a simple solution to this. am i making any sense?