Re: [PHPLIB] How to make different virtualhost has own inc file and database. From: Philip Strnad (pdstrnad <email protected>)
Date: 11/25/99

I don't understand the question completely, but I think this is a step
in the right direction:

A common way to setup virtual hosts that have their own include files is
like this:

        /web/domain.com/home - html or php files
        /web/domain.com/include - .inc files
        /web/domain.com/phplib - PHPLIB files

        /web/domain2.com/home/ - html
        /web/domain2.com/include - .inc files
        /web/domain2.com/phplib - PHPLIB files

        etc.

In httpd.conf you can do the following within a VirtualHost block:

        php3_include_path /web/domain.com/include:/web/domain.com/phplib

If you can't edit httpd.conf, then you can put the above directive into
an .htacces file like this (I have never tried this):

        php3_include_path = /web/domain.com/include:/web/domain.com/phplib

(Not sure if you need quotes around the part after the equals sign. I
think AllowOverride has to be set to "All".)

Once you have set up your virtual hosts you can have a local.inc file
for each site and specify a different database for each one in your
database sub class (which goes in local.inc).

-Philip

--
http://www.audiosurge.com/  Capturing The Energy of Music
http://www.buymp3.com/      The New Way To Buy Music

Eric Wang wrote: > > How to make different virtualhost has own inc file and database? > the > the parameter "include_path = " can add all inc files there, but how can > tell different web virtual host use different inc file and different > database? > > - > PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>. > To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in > the body, not the subject, of your message.

-- - PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>. To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in the body, not the subject, of your message.