note 70639 added to function.rename
| From: | (rootatthedarktrumpet.com) | Date: | Sun, 22 Oct 2006 19:20:21 +0000 |
| Subject: | note 70639 added to function.rename | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-118983@lists.php.net to get a copy of this message | ||
As of PHP 5.1.4 compiled on a mac, using rename with spaces one should just use the space. Take
for example:
rename("/tmp/somefile.tar", "/mnt/laptop storage/somefile.tar");
If you use the backslash, like if you were cd-ing to the directory, rename will fail. Example:
rename("/tmp/somefile.tar", "/mnt/laptop\ storage/somefile.tar");
While not really a bug, it did confuse me for a little bit while working on a backup script.
----
Server IP: 216.194.113.175
Probable Submitter: 12.226.28.174
----
Manual Page -- http://www.php.net/manual/en/function.rename.php
Edit -- https://master.php.net/note/edit/70639
Del: integrated -- https://master.php.net/note/delete/70639/integrated
Del: useless -- https://master.php.net/note/delete/70639/useless
Del: bad code -- https://master.php.net/note/delete/70639/bad+code
Del: spam -- https://master.php.net/note/delete/70639/spam
Del: non-english -- https://master.php.net/note/delete/70639/non-english
Del: in docs -- https://master.php.net/note/delete/70639/in+docs
Del: other reasons-- https://master.php.net/note/delete/70639
Reject -- https://master.php.net/note/reject/70639
Search -- https://master.php.net/manage/user-notes.php