Multiple Websites on one PHP/MySQL Server

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
terrym
Forum Newbie
Posts: 5
Joined: Wed May 29, 2002 3:51 pm
Location: United Kingdom

Multiple Websites on one PHP/MySQL Server

Post 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
Last edited by terrym on Wed May 29, 2002 5:49 pm, edited 1 time in total.
User avatar
fatal
Forum Contributor
Posts: 118
Joined: Sat Apr 20, 2002 10:47 am
Location: East Coast

Post 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.
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post 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.
Post Reply