Post by Gilmore » Sat Dec 04, 2010 1:47 pm

I am baffled as to how to add a php include to the footer. Is this possible?

I tried to add this in the footer ina <div> tag

Code: Select all

<?php
include_once('abc/filename.php');
list($something, $something2) = thisfile();
?>
<p>There are currently <?=$something?>. The site is <?=$something2?></p>
Am I missing something other than my mind? :laugh:

Thanks!

Gilmore
Last edited by i2Paq on Mon Dec 06, 2010 7:40 pm, edited 1 time in total.
Reason: Title adjusted

User avatar
Active Member

Posts

Joined
Thu Aug 12, 2010 7:33 am

Post by JAY6390 » Mon Dec 06, 2010 7:23 am

Does your php allow for short tags other than that it looks fine

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Gilmore » Mon Dec 06, 2010 1:43 pm

Thx Jay! Well as it is, it breaks the page every time. Just doesn't seem to like the include part I think.

User avatar
Active Member

Posts

Joined
Thu Aug 12, 2010 7:33 am

Post by JAY6390 » Mon Dec 06, 2010 7:48 pm

Remember that the include path actually starts in the same folder as your index.php, NOT the tpl file - Putting full paths for the file will ensure that this isn't the case too

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom
Who is online

Users browsing this forum: Bing [Bot] and 61 guests