Heres a text example of how my server is setup right now in terms of folders and php files.
*note, following is not my code, I just used the code quotes to keep the formating.
ROOT--------> index.php [Folder: System] ------> [Folder: Engine]----------------------->engine.php [Folder: Modules]------>[Folder: Menu]---->menu.php
So the Url's for the files are:
Short urls examples
Full urls examples
[a href=\"http://www.websiteURL.com/index.php\" target=\"_blank\"]http://www.websiteURL.com/index.php[/a]
[a href=\"http://www.websiteURL.com/System/Engine/engine.php\" target=\"_blank\"]http://www.websiteURL.com/System/Engine/engine.php[/a]
[a href=\"http://www.websiteURL.com/System/Modules/Menu/menu.php\" target=\"_blank\"]http://www.websiteURL.com/System/Modules/Menu/menu.php[/a]
In my engine.php. I have the following example of code.
<? $MenuURL = '/System/Modules/Menu/Menu.php'; //Menu Module URL ?>
In my Index.php. I have the following example of code in the header
<? include ('/System/Engine/Engine.php');?>
and then i have this code where i want my menu to appear
<?php include ($MenuURL);?>
This setup works fine. The engine is loaded into the index and then menu.php loads the variable url and the menu shows up. The problem with this however is if i wanted to put the menu in another page I wouldnt be able to because the url in the engine is based from the root of the of the server. Is there a way to make the include() command to be rerouted back to the root of the server and then locate the file from there?
I tried using this:
<?php include ($_SERVER['DOCUMENT_ROOT'].($MenuURL));?>
And it worked on my apache test server but the urls in the source code started from the c:\ all the way to my apache www directory and then adds on the url from the engine to the end of it completing the Url. When I tested this on an online server. It didnt work. What is wrong with the code? Is this even possble to do and if not what do you think is the best way I should go about this in order to get my files working together like so:
[img src=\"http://revonet.org/stuff/leonix/engine.gif\" border=\"0\" alt=\"IPB Image\" /]
Please help, and Thanks.