Re: [SMARTY] smarty directory

From: Date: Tue, 18 Jun 2002 05:46:27 +0000
Subject: Re: [SMARTY] smarty directory
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4915@lists.php.net to get a copy of this message
If I'm not wrong, SMARTY_DIR needs a "/" at the end of string. So define('SMARTY_DIR', 'c:/smarty'); wouldn't be correct, and should be define('SMARTY_DIR', 'c:/smarty/'); Greetings. Ben Godfrey wrote: > > 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'); > > } > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Oscar Fernandez Sierra | Mundinteractivos - El Mundo | Area de Internet | Pradillo, 42 | oscar@el-mundo.net | 28002 - Madrid (SPAIN, EU) | http://www.elmundo.es/ | Tel: (+34) 915864800 (Ext: 4616) |

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