I have three folders living in /htdocs/ A(main site), B(admin), & C(shopping cart). Inside each folder are files that have at line 1, <?php include('es_starter.php') ?>. es_starter.php is in folder /htdocs/includes/, this file is manditory for the site to run. Since there are many starter.php files inside /includes/ i have added a site abbreviation to each (example.. *es_starter.php*). Each sites starter.php file is pathed by way of an updated *include_path* in php.ini.
*A* is the main folded used on all sites. Inside of *A* is index.php. It has links to /B/index.php and /C/index.php. My question is how to get /B/index.php to properly call its site name abbreviated version of starter.php.
I can not hard code in the site abbreviation because all files in /B/ and /C/ are supposed to be universal used by all domains. I have thought that i could set a $_COOKIE on /A/index.php
Expand|Select|Wrap|Line Numbers
- setcookie("site", "es", time()+60*60*24*1000, "/");
- include($_COOKIE[site]."_starter.php");