Page 1 of 1

Multiple Websites on one PHP/MySQL Server

Posted: Wed May 29, 2002 3:51 pm
by terrym
Hi. I have just started with PHP and MySQL and I have a couple (probably) simple questions.
1. In PHP, it there an equivalent of GLOBAL.ASA?
2. I need to create a number of websites, each with their own Data folder, but with a single "external" folder for all the scripts. For example, Website A would use specific data from /websiteA/Data and the run a script in this "external" folder. Is there an easy, logical way to accomplish this?
The question is not about setting up the various websites, but about getting to an include() file that is "outside" the actual websites. eg:
/includefiles

/website A
/websiteAdata

/websiteB
/websiteBdata

and so on. I hope this is clear enough?
Regards
Terry

Posted: Wed May 29, 2002 5:30 pm
by fatal
Re: #2,

If I understand you correctly you can accomplish this by having each website having a vhost. Like hosting three different domains one one server.

Posted: Wed May 29, 2002 6:09 pm
by jason
#1. In PHP, no. There is not really a Global.ASA perse. However, in PHP in the php.ini, you can configure PHP to automatically include any file on the server. This would mean every time a PHP script was started, it would first include this file.