Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Newbie question

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
eniac
Smarty Rookie


Joined: 14 Jun 2003
Posts: 7

PostPosted: Sat Jun 14, 2003 9:45 pm    Post subject: Newbie question Reply with quote

This is my index.php file
Code:


<?php
   define("SMARTY_DIR","../smarty/");
   require(SMARTY_DIR."Smarty.class.php");
   include("include/smarty_setup.php");
   
   $Smarty = &new smarty_setup;
   $smarty->assign('test','trallala eindelijk het werkt');
   $smarty->display("index.tpl");
?


This is my smarty_setup file:
Code:

<?php
   class Smarty_setup extends Smarty
   {
      var $tpl_dir  = "/www/www.kemu.be/public_html/mysql/templates";
      var $com_dir  = "/www/www.kemu.be/public_html/mysql/templates_c";
      var $cache_dir  = "/www/www.kemu.be/public_html/mysql/cache";
      var $conf_dir  = "/www/www.kemu.be/public_html/mysql/configs";

      function Smarty_setup()
      {
         $this->template_dir = $this->tpl_dir;
         $this->compile_dir = $this->com_dir;
         $this->cache_dir = $this->cache_dir;
         $this->config_dir = $this->conf_dir;
      }
   }
?>


Now I don't get why I get this error
Fatal error: Call to a member function on a non-object in /home/webusers/kemu/www/www.kemu.be/public_html/mysql/index.php on line 7

Since Smart_setup extends Smarty
Any idea's ?
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Sat Jun 14, 2003 9:56 pm    Post subject: Reply with quote

$Smarty != $smarty (variable-names are case-sensitive) Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
eniac
Smarty Rookie


Joined: 14 Jun 2003
Posts: 7

PostPosted: Sat Jun 14, 2003 10:24 pm    Post subject: Reply with quote

ok that fixed a lot now I got this probleme.
Warning: Smarty error: unable to read template resource: "index.tpl" in /home/webusers/kemu/www/www.kemu.be/public_html/smarty/Smarty.class.php on line 999

I'm sure I've set my template_dir correct.
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Sun Jun 15, 2003 6:59 am    Post subject: Reply with quote

"/home/webusers/kemu/www/www.kemu.be/public_html/" != "/www/www.kemu.be/public_html/" . maybe somewhere you intermix the chroot-dir you see via ftp with the actual directory the webserver accesses.

btw: you don't call the constructer of the parent-class in your child-class.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP