template

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
red fox
Forum Newbie
Posts: 3
Joined: Sun Mar 19, 2006 7:44 am

template

Post by red fox »

hi
my problem is this code

Code: Select all

function Page($template = 'std.tpl') {
if (file_exists($template))
$this->page = join('', file($template));
else
die("Template file $template not found.");
}
give me this message i know it from std.tpl but i donot anything about it
Template file /template/footer.php not found.
how i finish it urgent?
:?:
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Post by matthijs »

the script cannot find the template file.

Were is this script located and were is footer.php located relative to this script?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I would guess that your reference to the file being in /template would be the fall down point. / is a reference to the root of the file system, not the root of your website. You may look at $_SERVER['DOCUMENT_ROOT']
Post Reply