Re: Running several instances of smarty.

[email protected] (Pedro) Fri, 02 Jun 2006 08:54:40 +0100
Newsgroups php.smarty.general
Message-ID <[email protected]>
Tony K. wrote:
> I would like to run several subdomains using smarty.  Each subdomain
> would be a separate instance of smarty.  Can I use the same folders
> (i.e. template, template_c, cache, configs) for more than one instance
> of Smarty?
> 
> /domain/template
> /domain/template_c
> /domain/cache
> /domain/configs
> /domain/subdomains/subdomain1
> /domain/subdomains/subdomain2
> ...

Am doing exactly as your suggesting....
I have one file "common_config.php" that contains the smarty init code
and the following 2 lines
$smarty->compile_id = $_SERVER['SERVER_NAME'];
$smarty->compile_dir = '/www/shared_smarty_compile_dir';

have fun
Pete