Why can't my template file load?

comes back with can't load template file.

Page 1 of 1

6 Replies - 1426 Views - Last Post: 30 March 2009 - 01:29 PM Rate Topic: -----

#1 EvolutionMedia   User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 125
  • Joined: 11-August 08

Why can't my template file load?

Posted 30 March 2009 - 08:11 AM

Hey guys,

I know my template file exists. I tried to download it and it still works.

I have a script called register.php that requires connect.inc.php and errorhandle.inc.php

the errorhandle.inc.php has the template.class.php in the same directory.

Here's the source code for errorhandler.inc.php

nclude ("template.class.php");



function DoError($Title,$ErrorHeader,$Description,$Reason) {
$template = new Template("messagehandle.tpl");
$template->set("Title",$Title);
$template->set("Header",$ErrorHeader);
$template->set("Message",$Description);
$template->set("Reason",$Reason);

echo $template->output();
}
function ErrorMessage($t,$h,$des,$Res) {
$fail_template = new Template("messagehandle.tpl");
$fail_template->set("Title",$t);
$fail_template->set("Header",$h);
$fail_template->set("Message",$des);
$fail_template->set("Reason",$Res);

echo $fail_template->output();

exit;

}

function SuccessMessage($Title,$Head,$Message) {

$Reason = '';
$succ_template = new Template("messagehandle.tpl");
$succ_template->set("Title",$Title);
$succ_template->set("Header",$Head);
$succ_template->set("Message",$Message);
$succ_template->set("Reason",$Reason);

echo $succ_template->output();

exit;
}



It use to work but I don't know why it doesn't anymore. When I updated the new register script I made sure it was working and it did. Since then I haven't touched anything. I went into the register script to edit where it says I accept.

http://www.nxt-ware.net and click on register here.

you can see the main one but when you register it will give you a can't open template file.

So can anyone help thanks!

Is This A Good Question/Topic? 0
  • +

Replies To: Why can't my template file load?

#2 nick1200   User is offline

  • Php Coder
  • member icon

Reputation: -19
  • View blog
  • Posts: 922
  • Joined: 21-March 09

Re: Why can't my template file load?

Posted 30 March 2009 - 08:32 AM

well 1 its include ("template.class.php");


not nclude ("template.class.php");
:P
Was This Post Helpful? 0
  • +
  • -

#3 EvolutionMedia   User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 125
  • Joined: 11-August 08

Re: Why can't my template file load?

Posted 30 March 2009 - 08:34 AM

Nah, it's not it. Someone i must've copy wrong section. However, i did a test template and it works. So, right now I'm checking to see if it's the register.php problem or what.
Was This Post Helpful? 0
  • +
  • -

#4 nick1200   User is offline

  • Php Coder
  • member icon

Reputation: -19
  • View blog
  • Posts: 922
  • Joined: 21-March 09

Re: Why can't my template file load?

Posted 30 March 2009 - 08:37 AM

nice register page u seem to know what your doing :P

have you got the template any were else maybe your hosting dont like it lol
im most probley wrong lol but you never know :^:
Was This Post Helpful? 0
  • +
  • -

#5 EvolutionMedia   User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 125
  • Joined: 11-August 08

Re: Why can't my template file load?

Posted 30 March 2009 - 08:42 AM

LOL! Thanks - the test template script works. http://www.nxt-ware....mplate_test.php and it works and that's the template file it's support to use. I was also thinking it maybe because the errorhandler.inc.php is inside a include directory and inside the script it has template file pointing to /include directory. It was working before or maybe i've been dreaming it up. not sure. but anytime i relax from the site i make sure it's working and no errors pop up. The users that may register may be like, "what int he hell?"
Was This Post Helpful? 0
  • +
  • -

#6 EvolutionMedia   User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 125
  • Joined: 11-August 08

Re: Why can't my template file load?

Posted 30 March 2009 - 09:12 AM

now i finally got it. I had to get it in the same directory.
Was This Post Helpful? 0
  • +
  • -

#7 Valek   User is offline

  • The Real Skynet
  • member icon

Reputation: 544
  • View blog
  • Posts: 1,713
  • Joined: 08-November 08

Re: Why can't my template file load?

Posted 30 March 2009 - 01:29 PM

You could've also used an ini_set() line inside connect.inc.php if you wanted, that would set the include directory as a specific directory. Then it would look there first. And if you included pathing information from that directory, it would apply that to the include directory you set with ini_set().

Might be worth a try if you don't want to move files around all the time.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1