note 113649 deleted from function.rename by cmb
| From: | cmb@php.net | Date: | Sun, 22 Dec 2019 09:09:43 +0000 |
| Subject: | note 113649 deleted from function.rename by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213597@lists.php.net to get a copy of this message | ||
Note Submitter: wasserwirbel at gmail dot com
----
Interesting to note that if you are trying to rename a file within a folder adding a slash in front
of the folder (even if the folder is in the root of your server) will not work.
in other words, if you have the folder "tmp" in your server's root:
<?php
rename("/tmp/tmp_file.txt", "/tmp/my_file.txt"); // will not work
rename("tmp/tmp_file.txt", "tmp/my_file.txt"); // WILL work!
?>