DIR_SEP handling
| From: | boots | Date: | Fri, 02 May 2003 23:28:31 +0000 |
| Subject: | DIR_SEP handling | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1334@lists.php.net to get a copy of this message | ||
I've asked for this before and was told no, so I'll ask in a different
way hopefully more nicely ;)
Can we (please) remove:
define('DIR_SEP', DIRECTORY_SEPARATOR);
and instead add:
function _set_dir_sep() {
define('DIR_SEP', DIRECTORY_SEPARATOR);
}
with a call to $this->_set_DIR_SEP() to start off the Smarty()
constructor? Then the default handling could be overwritten without
touching the main class.
Either that or rename it SMARTY_DIR_SEP. After all, it is a commonly
wanted name in the global namespace. Otherwise (IMHO) Smarty should use
DIRECTORY_SEPARATOR natively.
My original suggestion was simply:
if (!defined('DIR_SEP')) {
define('DIR_SEP', DIRECTORY_SEPARATOR);
}
I should note that on my w2k box with PHP 4.3, it doesn't matter HOW I
set DIR_SEP. It is happy with both "/" and "\". Go figure.
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com