PHP 4.0 Bug #7161 Updated: __FILE__ now generates \ instead of /
| From: | andi@php.net | Date: | Wed, 01 Nov 2000 07:03:39 +0000 |
| Subject: | PHP 4.0 Bug #7161 Updated: __FILE__ now generates \ instead of / | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-36584@lists.php.net to get a copy of this message | ||
ID: 7161
Updated by: andi
Reported By: danielc@analysisandsolutions.com
Status: Closed
Bug Type: *General Issues
Assigned To:
Comments:
PHP 4 in thread safe environments such as NT (for now) makes sure that file names are created the
standard way on our platform. In the case of NT, c:\foo\bar is the standard way. Sorry but
you'll need to fix your scripts and best is if your solution works for both / and \ because
they are both valid separators under NT.
Previous Comments:
---------------------------------------------------------------------------
[2000-10-12 11:30:38] danielc@analysisandsolutions.com
PHP has changed the way it displays directory separators in a file's path when calling the
__FILE__ constant.
PHP 3.0.11: g:webroot/ideasphp/bug403-filepath.htm
PHP 4.0.3: g:webrootideasphpbug403-filepath.html
This inconsistency is causing problems my scripts which do an explode("/", __FILE__).
Guess I'll now have to swich to split("[/]", __FILE__); for now. But doing so
changes the first array element from "g:webroot" to "g:", which requires further
code rewrites.
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7161