Hi there,
I have been trying to find an 'easy' way of including files in my PHP docs that are subject to mod_rewrite address changes.
At the moment our config.php file is located in public_html/lib/config.php, and what I have tried to do is include('lib/config.php')
but it errors on pages that have had their address changed by mod_rewrite.
E.g. "http://www.example.com/user-profile.php?user=123" will work using include('lib/config.php')
but
"http://www.example.com/user/123" using include('lib/config.php')
fails to find the file.
Is there any way to set a default include path for PHP files so include('lib/config.php')
works regardless of where the page is located / rewritten.
Thanks