Re: Auto_Prepend_File for non-PHP files?

From: Date: Thu, 14 Nov 2002 23:22:57 +0000
Subject: Re: Auto_Prepend_File for non-PHP files?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-124530@lists.php.net to get a copy of this message
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!

« previous php.general (#124530) next »