#32355 [Fbk->NoF]: Directory-access with dirname
| From: | php-bugs at lists dot php dot net | Date: | Sat, 26 Mar 2005 00:00:05 +0000 |
| Subject: | #32355 [Fbk->NoF]: Directory-access with dirname | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-75879@lists.php.net to get a copy of this message | ||
ID: 32355
Updated by: php-bugs@lists.php.net
Reported By: eisbrenner at gid-gmbh dot de
-Status: Feedback
+Status: No Feedback
Bug Type: Feature/Change Request
Operating System: Windows / All Webserver
PHP Version: 4.3.10
New Comment:
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
Previous Comments:
------------------------------------------------------------------------
[2005-03-17 19:27:49] tony2001@php.net
Why don't you just use DIRECTORY_SEPARATOR constant ?
------------------------------------------------------------------------
[2005-03-17 19:18:01] eisbrenner at gid-gmbh dot de
Description:
------------
If, the copy-function is called
with
copy (dirname(__FILE__) . '/anyname', '/path/to/new/place');
on windows-systems thtis will result in i.e.
copy (c:\temp\my_subdir/anyname ....
this is not handled correctly, so the file won't be copied.
it's not just related to 4.3.10, 4.3.x, 4.2.x, maybe elder versions.
for solutions, that should work independet to the OS installed it's
necassary to use
copy (str_replace("\\", "/", dirname(__FILE__)) . '/anyname',
'/path/to/new/place');
instead.
it would be nice not to need this.
or is there an undocumented parameter for windows to get slash instead
of the BS ?
same behaviour with move_uploaded_file, move.
include works fine without str_replace.
Reproduce code:
---------------
see description
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32355&edit=1