Re: [SMARTY] DIRECTORY_SEPARATOR not defined
| From: | Monte Ohrt | Date: | Mon, 03 Jun 2002 17:01:19 +0000 |
| Subject: | Re: [SMARTY] DIRECTORY_SEPARATOR not defined | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4548@lists.php.net to get a copy of this message | ||
Robert Amos wrote:
DIRECTORY_SEPERATOR was first defined in php 4.0.6. It was for that and a few other options that further the development of Smarty that it's recommended to be run on 4.0.6 or later. -bok On 27/5/02 12:24 AM, Werner Schweizer banged a keyboard and produced the following weird but readable email:That may not be the directory separator for your architecture, which is why DIRECTORY_SEPARATOR is defined by PHP. If you really want to run Smarty in pre 4.0.6 versions of PHP, then do this definition in your application and hope everything else is compatible :-) MonteSmarty 2.1.1 uses a new definition define('DIR_SEP', DIRECTORY_SEPARATOR); but DIRECTORY_SEPARATOR is not defined anywhere. Running this version on a site where PHP 4.0.4pl1 is installed, this leads to errors. On my machine with PHP 4.1.2 it runs. So I guess, DIRECTORY_SEPARATOR is a newly defined constant in PHP. I succest, to define it in smarty if it is not already defined. if(!defined('DIRECTORY_SEPARATOR')) { define('DIRECTORY_SEPARATOR', '/'); }