On Tue, Mar 06, 2001 at 12:28:33PM -0600, Boget, Chris wrote:
> > >Is it possible to use the auto prepend/append directives to
> > >prepend/append particular files only to files with a particular
> > >extension?
> > I don't believe you can do this directly with PHP but you
> > probably can with
> > Apache:
> > <Files *.html>
> > php_value prepend_file "foo.php"
> > </Files>
>
> Where do you put this?
> We've tried everywhere, but's not picking up. Are you doing this?
> And it's working?
I just did a simple test using a .htaccess file. foo.php echos "foo"; bar.php
echos "bar".
Without anything in .htaccess, loading foo.php returns "foo" and bar.php
returns "bar".
With php_value auto_prepend_file "bar.php", foo.php returns "barfoo" and
bar.php returns "barbar".
With this:
<Files *.php>
php_value auto_prepend_file "bar.php"
</Files>
foo.php returns "barfoo" and bar.php returns "barbar".
With this:
<Files f*.php>
php_value auto_prepend_file "bar.php"
</Files>
foo.php returns "barfoo" and bar.php returns "bar".
Switching from the .htaccess file to my Apache config file, this produces the same
effect as that last <Files...> directive:
<Location /prep/f*.php>
php_value auto_prepend_file "bar.php"
</Location>
foo.php returns "barfoo", bar.php returns "bar".
Doing the same thing with a <Directory> did not work.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]