Re: templates with php
| From: | Rasmus Lerdorf | Date: | Mon, 31 Jul 2000 18:39:14 +0000 |
| Subject: | Re: templates with php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-9224@lists.php.net to get a copy of this message | ||
> > My personal approach to this is to use an auto_prepend_file directive
> > that tells PHP to automatically include a PHP script. Then in that I
> > create the various functions and my "template" files are simple PHP files
> > that simply call the functions. ie. <?title()?> <?price()?>
> > <?description()?>
>
> Doesn't the auto_prepend_file directive apply to all pages parsed by PHP
> on the server, or is it possible to set it to a different file for pages
> in different directories? i.e., is it possible for a server hosting
> mutliple websites/domains to use auto_prepend_file differently for various
> websites?
All such directives can be set on a per-file, per-directory, and a number
of other ways by putting them in the appropriate place in your
httpd.conf/.htaccess file.
-Rasmus