The problem is that non-php files are not (normally) parsed through the
PHP interpreter, and therefore the clause you're specifying has no
effect.
There are two solutions (at least that come to mind now):
1) Change your Apache configuration so that all files are parsed through
PHP (inefficient and potentially dangerous)
2) You can use server-side includes (but you still have to modify your
files)
Otherwise, take a look at the Apache manual:
How can I attach a footer to my documents without using SSI?
You can make arbitrary changes to static documents by configuring an
Action which launches a CGI script. The CGI is then responsible for
setting a content-type and delivering the requested document (the
location of which is passed in the PATH_TRANSLATED environment
variable), along with whatever footer is needed.
Busy sites may not want to run a CGI script on every request, and should
consider using an Apache module to add the footer. There are several
third party modules available through the Apache Module Registry which
will add footers to documents. These include mod_trailer, PHP
(php3_auto_append_file), mod_layout, and mod_perl (Apache::Sandwich).
Marco
--
------------
php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Come visit us at http://www.phparch.com!
--- Begin Message ---
Hi,
I couldn't find this in the documentation, or in the archives of the mailing list, so
I apologize if it's been answered many times before :)
I'm trying to use auto_prepend_file to prepend a php file to every file in a folder,
not just .php files.
I have:
<Files ~ ".*">
php_value auto_prepend_file "/path/to/php_file.php"
</Files>
in my Apache httpd.conf.
What am I doing wrong?
Sara Keesler
--- End Message ---
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php