Re: [SMARTY] smarty directory

From: Date: Tue, 18 Jun 2002 00:57:13 +0000
Subject: Re: [SMARTY] smarty directory
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4911@lists.php.net to get a copy of this message
Dirname gets the dir part of a file: dirname("c:\folder\folder\file.html") == "c:\folder\folder" And __FILE__ is the file currently being processed by PHP. So in this case dirname(__FILE__) is the folder you put Smarty.class.php in. Additionally the use of if (!defined('SMARTY_DIR')) { in Smarty.class.php means that you don't have to edit that file. Just stick define('SMARTY_DIR', 'c:/smarty'); in your PHP file that includes Smarty, just before the include/require statement. HTH, Ben On Tuesday, June 18, 2002, at 01:29 , Blue Presley wrote:
I'm trying to set the smarty directory, but don't really want to break anything. these are lines 46 - 48 of smarty.class.php. if (!defined('SMARTY_DIR')) {
    define('SMARTY_DIR', dirname(__FILE__) . '/');
} I'm not familiar with the "dirname(__FILE__)" construction. is it safe to change it so that it looks like this: if (!defined('SMARTY_DIR')) {
    define('SMARTY_DIR', c:/smarty');
}


« previous php.smarty.general (#4911) next »