Mail Index


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Including PHP headers and footers



On Mon, Aug 12, 2002 at 02:41:31PM -0400, Oscar Salcedo wrote:
> Hi,
> 
> I am new to apache::gallery, and after searching the archives, I could not
> find the answer to my question.
> I have http://site/gallery/ set up, and it works great, now I have a set of
> /includes/header.php and footer.php that are included in all pages so that
> all have the same header/footer. My question is: is there a way that my
> gallery can have those header/footer included? I tried adding <?PHP require
> ("/includes/header.php"); ?> to templates/layout.tpl, but it didn't work.

In short: it wont work.

Long answer: the reason why it wont work is that php isn't able to do
any processing on dynamically created content. It might work sometime
when mod_perl 2.0 gets going, but don't count on finding a real solution
for now. All you can hope for is a workaround;

If you are up to it you can hack the source of lib/Apache/Gallery.pm to
run the generated file through a php binary, although that would not do
well for performance..

-- 
  Thomas Eibner <http://thomas.eibner.dk/> DnsZone <http://dnszone.org/>
  mod_pointer <http://stderr.net/mod_pointer> <http://photos.eibner.dk/>
  !(C)<http://copywrong.dk/>                  <http://apachegallery.dk/>
          Putting the HEST in .COM <http://www.hestdesign.com/>