|
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 |
angelorigo Smarty n00b
Joined: 14 Jul 2003 Posts: 2 Location: Porto Alegre/RS/Brasil
|
Posted: Mon Jul 14, 2003 6:40 pm Post subject: Setting up SMARTY_DIR |
|
|
Hi
i am trying to install and use smarty and setting up the SMARTY_DIR in Smarty.class.php like this:
if (!defined('SMARTY_DIR')) {
define('SMARTY_DIR', dirname(__/var/www/html/sitenovo/scripts/Smarty-2.0.5/libs__) . DIR_SEP);
It return me an error like that :
Parse error: parse error, unexpected T_VAR in /var/www/html/sitenovo/scripts/Smarty-2.5.0/libs/Smarty.class.php on line 58
Fatal error: Cannot instantiate non-existent class: smarty in /var/www/html/sitenovo/scripts/Smarty-2.5.0/demo/index.php on line 5
someone can see where i am going wrong?
thank“s best regard“s _________________ Āngelo Rigo |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Mon Jul 14, 2003 6:47 pm Post subject: |
|
|
your approach is not valid php syntax. "__FILE__" (literally) is a special constant of php that represents the name of the current file.
just don't setup SMARTY_DIR, simply do "require_once(".../Smarty.class.php");" the "..." depends on where smarty is in your direcory-structure, and on the settings of your include path. maybe so:
[php:1:6b7bea1aae]require_once('/var/www/html/sitenovo/scripts/Smarty-2.0.5/libs/Smarty.class.php');[/php:1:6b7bea1aae]
after that line class "Smarty" is defined and also the constant "SMARTY_DIR" is defined to "/var/www/html/sitenovo/scripts/Smarty-2.0.5/libs/" |
|
Back to top |
|
angelorigo Smarty n00b
Joined: 14 Jul 2003 Posts: 2 Location: Porto Alegre/RS/Brasil
|
Posted: Mon Jul 14, 2003 7:47 pm Post subject: |
|
|
messju wrote: | your approach is not valid php syntax. "__FILE__" (literally) is a special constant of php that represents the name of the current file.
just don't setup SMARTY_DIR, simply do "require_once(".../Smarty.class.php");" the "..." depends on where smarty is in your direcory-structure, and on the settings of your include path. maybe so:
[php:1:7112491262]require_once('/var/www/html/sitenovo/scripts/Smarty-2.0.5/libs/Smarty.class.php');[/php:1:7112491262]
after that line class "Smarty" is defined and also the constant "SMARTY_DIR" is defined to "/var/www/html/sitenovo/scripts/Smarty-2.0.5/libs/" |
Great it work perfectly !
thank“s messju best regards _________________ Āngelo Rigo |
|
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
|