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

Setting up SMARTY_DIR

 
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 -> Installation and Setup
View previous topic :: View next topic  
Author Message
angelorigo
Smarty n00b


Joined: 14 Jul 2003
Posts: 2
Location: Porto Alegre/RS/Brasil

PostPosted: Mon Jul 14, 2003 6:40 pm    Post subject: Setting up SMARTY_DIR Reply with quote

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
View user's profile Send private message Visit poster's website
messju
Administrator


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

PostPosted: Mon Jul 14, 2003 6:47 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
angelorigo
Smarty n00b


Joined: 14 Jul 2003
Posts: 2
Location: Porto Alegre/RS/Brasil

PostPosted: Mon Jul 14, 2003 7:47 pm    Post subject: Reply with quote

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
View user's profile Send private message 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 -> Installation and Setup 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