Include in page hack & later includes

Hi everyone,

I hope someone out there can help me! I'm having a problem with the zenphoto as a ‘plug-in’ hack. I've got the code set up and working like so:

`

<?php<br />
define('ZENFOLDER', 'zp-core');

define('WEBPATH', '../gallery');

require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php");

zp_load_album('billgates2005');

printRandomImages(4, null, 'album');

?>

`

The page is here:

http://communications.uwaterloo.ca/events/billgates/

there should be a footer underneath the included zen photos but I can't get it to show up. It's just a standard php include. If you look at the source you can see the footer comment where the include should appear.

I've tried all sorts of possible configurations but haven't been able to get this to work. Any help???

Comments

  • When I look at the html source I do not see the comment. Can you show us the php you used? Is it a zenphoto function you are using for the footer?
  • It's just a standard php include:

    `

    <?php include("../../inc/UWfooter.html");?>

    `

    When the page loads it seems to get stuck at that. I've tried moving the first three lines of the zenhoto hack up to the top of the document and it seems to cut off any includes after that.

    I have to post this page for tomorrow so I've created a backup of the problem in action here:

    http://communications.uwaterloo.ca/events/billgates/zenphoto-problem.php
  • Try using require instead of include. Then at least you will get an error if something is wrong with your file name. The only presumption is that the file is not being found.
  • require doesn't give me anything.

    I can even copy and paste the include for the header that works at the top of the page and it won't work after the zenphoto stuff. Really weird.

    Thanks for helping!
  • Maybe something in zenphoto changed the current directory. Try putting the absolute path to the header in the require.
Sign In or Register to comment.