Forum Moderators: coopster
I have a settings script that contains this:
define("MAIN_SITE_ROOT", "http://www.xyz123.com/");
which I primarily use to include (or require) certain files, images, etc. on our site by using <?php echo(MAIN_SITE_ROOT)?>
For example:
<?php echo(MAIN_SITE_ROOT)?>images_submenu/lost_pass_over.jpg
The problem now is that the server does not support include and require statements that use absolute URLs instead of absolute or relative paths on the server.
The problem is I want to fully qualify the path, so that all my links, images, etc. can be changed by just changing the MAIN_SITE_ROOT declaration in the settings.php file.
How can I do this or is there any work around?
Thanks a lot for the help... again. :-)
Just do something like this
include($_SERVER['DOCUMENT_ROOT'] . '/path/to/include/file.inc.php');
You may be limited to includes that are within web root.
Tom