File Organization and Aliasing
Posted 10 May 2006 - 07:48 PM
I have since learned about aliasing. So i have now seperated all my Engine into three sperate parts. (1) Site Engine. This is all site dependent files for a basic site. (2) Cart Engine. These are all files dependent on the shopping cart. (3) Manager Engine. This is the CMS for the site.
Before the seperation all files include() a *starter.php* file that initiates things like db connections, session control, and other various site dependent controls. My problem is now that i have seperated to three main Engines, only the Site Engine works. I had not forseen that the other two engines would now not have a way to connect, or know where the starter.php file is located.
My question is how can i now tell the file */path/to/ManagerEngine/index.php* that at line #1 calls <? include("starter.php"); ?>, that the file is at */path/to/site.com/starter.php*.
Ok I hope you all get what im asking. Thank you.
Posted 10 May 2006 - 07:52 PM
or [php] * 1000... PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...
Posted 16 May 2006 - 05:06 AM
1. Add a new directory, C:\apache2triad\htdocs\includes\. (You may also use an existing *include_path*)
2. Update *include_path* in php.ini file to also accept C:\apache2triad\htdocs\include\. The include_path will be looked in first when an *include()* is called from any file in localhost.
It was that simple for the first part of my Question. The second can be found in a post called "Linking Structures".
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users