Mail Index


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

RE: Including PHP headers and footers



Thanks for the quick response.
If my headers and footers were static html pages, would it work? I think
apache has directives to automatically insert header/footers to every page
under a vhost, am I correct?

Thanks,
Oscar.

-----Original Message-----
From: Thomas Eibner [mailto:thomas@xxxxxxxxxx]
Sent: Monday, August 12, 2002 2:49 PM
To: users@xxxxxxxxxxxxxxxx
Subject: 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/>