[thelist] Improving my PHP: autoread config files?

Sarah Adams sarahwbs at gmail.com
Tue Jun 30 08:14:17 CDT 2009

> 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.

Sounds like you're looking for something like CF's Application.cfm, i.e.
it automatically gets included on each request for a php file.

I'd love to know of something like this myself :)

sarah adams
web developer & programmer

More information about the thelist mailing list