keeping multiple sites in htdocs [SOLVED]
Posted: 16. December 2010 02:59
I have setup XAMPP and it appears that everything is working, My issue may be PHP related.
I want to have a setup like:
localhost/site01/index.php
localhost/site02/index.php
localhost/site03/index.php
Each site has a include folder with all the include php files.
My problem shows up with 404 errors. index.php has several lines that read like:
<?php include($_SERVER['DOCUMENT_ROOT']."/include/footer.php") ?>
On a site hosted by a hosting company, that line of code will work from any location on the site, but does not work on XAMPP when the file is located at localhost/site01/include/footer.php and of course, I have the same problem with localhost/site02/include/footer.php.
So do I need to set_include_path for each site or change the document_root with some command, or put something in .htaccess, or is there a way to have a php.ini for each site?
I want to have a setup like:
localhost/site01/index.php
localhost/site02/index.php
localhost/site03/index.php
Each site has a include folder with all the include php files.
My problem shows up with 404 errors. index.php has several lines that read like:
<?php include($_SERVER['DOCUMENT_ROOT']."/include/footer.php") ?>
On a site hosted by a hosting company, that line of code will work from any location on the site, but does not work on XAMPP when the file is located at localhost/site01/include/footer.php and of course, I have the same problem with localhost/site02/include/footer.php.
So do I need to set_include_path for each site or change the document_root with some command, or put something in .htaccess, or is there a way to have a php.ini for each site?