Please Help - Error on pages within folders

I'd like for visitors to see a random photo from my album when they visit each page. In order to do this, I've incorporated the following code on my homepage, which works great. But when I try to incorporate this onto a page within a separate folder, it creates and error that I cannot seem to fix. I've tried everything (using /, ../, direct link, etc.), but cannot seem to get it working...

Should I be using a different code at the top of my pages?

Any suggestions would be greatly appreciated!

Thanks!

<?php
define('ZENFOLDER', 'zp-core');
define('WEBPATH', 'zenphoto');
require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php");
?>

Comments

  • What is the error? Generally speaking, the code you use needs to setup paths for zenphoto so that it can find its components. You probably need to change the 'require_once' line to use a fully qualified server path.
Sign In or Register to comment.