note 109583 rejected from ref.filesystem by aharvey
| From: | aharvey@php.net | Date: | Tue, 31 Jul 2012 01:33:04 +0000 |
| Subject: | note 109583 rejected from ref.filesystem by aharvey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189520@lists.php.net to get a copy of this message | ||
Note Submitter: Charles B
----
Can anyone tell me why i'm getting these double slashes on windows:
File Location (where directory.php is located):
C:\xampp\htdocs\hfmw\chapter7\tartans
PHP code:
define('TARTAN_DOC_ROOT', '/' . ltrim(substr(dirname(__FILE__),
strlen($_SERVER['DOCUMENT_ROOT'])), '/'));
define('PUBLIC_TARTAN_DIR', rtrim(TARTAN_DOC_ROOT, '/') .
'/tartans/');
directory.php:
echo PUBLIC_TARTAN_DIR . '<br />';
Results:
/\hfmw\chapter7/tartans/