[thelist] Improving my PHP: autoread config files?

Barney Carroll barney.carroll at gmail.com
Tue Jun 30 10:08:22 CDT 2009


Thanks Brady, this is exactly what I needed. That's saved me aeons!

Regards,
Barney Carroll

barney.carroll at gmail.com
07594 506 381


2009/6/30 Brady Mitchell <mydarb at gmail.com>

> Barney Carroll wrote:
> > Hi list,
> >
> > I'm embarking on a new PHP project and wanted to sound people out for
> > something I am certain exists but have difficulty defining or searching
> for.
> > Essentially I am looking for a method to apply PHP instructions based on
> > directory in much the same way .htaccess applies to all descendants. I
> know
> > it is possible to define core values read out by PHP globals using plain
> old
> > .htaccess, but I would like to define custom variables, prepend PHP
> includes
> > to files depending on various factors, etc — without having to make
> explicit
> > reference to this configuration file in the files I wish to be affected,
> or
> > vice-versa.
> >
> > Can anybody give me some pointers on how to go about this?
> >
>
> Take a look at:
>
> http://us.php.net/manual/en/ini.core.php#ini.auto-prepend-file
>
> " Specifies the name of a file that is automatically parsed before the
> main file. The file is included as if it was called with the require()
> function, so include_path is used.
>
> The special value none disables auto-prepending."
>
> This can be set in php.ini or .htaccess.
>
> Brady
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>



More information about the thelist mailing list