[pmwiki-users] Mirroring

sti at pooq.com sti at pooq.com
Sun Sep 23 13:52:51 CDT 2007


Anno wrote:
> Jan Erik Moström wrote:
>> I would like to use a program to mirror a pmwiki setup between 
>> two machines, this is easily accomplished except that I would 
>> like to have different config file on the different machines. 
>> However, most of the config file is the same so there are only a 
>> few lines that differs.
>>
>> Is there some way to have a machine/host dependent part of the 
>> config file? Something like this
>>
>>          +-----------------------+
>>          |    Common             |
>>          +-----------------------+
>>          |    Machine 1          |
>>          +-----------------------+
>>          |    Machine 2          |
>>          +-----------------------+
>>          |    Common             |
>>          +-----------------------+
>>
>>
>>                          jem
> 
> You could have the machine specific parts each in a separate file on 
> every machine, and include it in the config.php file.
> http://at2.php.net/include_once
> 

You can also test the server environment variables to pull out the domain name
of the current site, and use it in an if statement, or to construct the name
of the file to load.

Come to think of it, that's a really good idea. I'll have to do the same for
the site that I'm going to mirror...




More information about the pmwiki-users mailing list