|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Hansa Smarty n00b
Joined: 21 May 2003 Posts: 3 Location: Germany
|
Posted: Wed May 21, 2003 9:58 am Post subject: I have a problem .... |
|
|
Fatal error: Failed opening required 'backends/smarty/libs/Smarty.class.php' (include_path='.:/usr/local/lib/php') in /users/coolfreepage.com/rhodanuniverse/footer.php on line 53
(lines)
52 // Smarty Templates!
53 require_once (SMARTY_CLASS);
54 $smarty = new Smarty;
55 $smarty->template_dir = "./templates/";
56 $smarty->compile_dir = "./templates_c/";
have anybody an idea if yes please tell me |
|
Back to top |
|
Hansa Smarty n00b
Joined: 21 May 2003 Posts: 3 Location: Germany
|
Posted: Wed May 21, 2003 3:19 pm Post subject: |
|
|
|
|
Back to top |
|
toma Smarty Regular
Joined: 25 Apr 2003 Posts: 62
|
Posted: Wed May 21, 2003 3:58 pm Post subject: |
|
|
Look at the error message. Your smarty dir is definatly not in the include path. Either add it to your include path or give the full path
(include_path='.:/usr/local/lib/php') |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed May 21, 2003 5:28 pm Post subject: |
|
|
SMARTY_CLASS ? SMARTY_DIR is a better constant to set (SMARTY uses it) and then use it like:
Code: | include SMARTY_DIR . 'Smarty.class.php'; |
If you use SMARTY_CLASS, consider doing so as follows:
Code: | define('SMARTY_DIR', '/absolute path to your smarty dir/');
define('SMARTY_CLASS', SMARTY_DIR . 'Smarty.class.php'); |
2c |
|
Back to top |
|
Hansa Smarty n00b
Joined: 21 May 2003 Posts: 3 Location: Germany
|
Posted: Thu May 22, 2003 11:03 am Post subject: |
|
|
52 // Smarty Templates!
53 define('SMARTY_DIR', '/backends/smarty/');
54 define('SMARTY_CLASS','SMARTY_DIR' .'Smarty.class.php');
55 $smarty = new Smarty;
56 $smarty->template_dir = "./templates/";
57 $smarty->compile_dir = "./templates_c/";
-----------------------------------------
Fatal error: Cannot instantiate non-existent class: smarty in /users/coolfreepage.com/rhodanuniverse/footer.php on line 55
Hm I think I did it but error again anyone have a clue ?
thanks anyway |
|
Back to top |
|
AZTEK Smarty Pro
Joined: 16 Apr 2003 Posts: 235 Location: Purdue University
|
Posted: Thu May 22, 2003 11:39 am Post subject: |
|
|
Code: | require_once(SMARTY_DIR . "Smarty.class.php"); |
_________________ "Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane |
|
Back to top |
|
|
|
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
|