note 13416 added to function.rename.php

From: Date: Fri, 15 Jun 2001 17:17:29 +0000
Subject: note 13416 added to function.rename.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-14377@lists.php.net to get a copy of this message
If you rename one directory to another where the second directory exists as an empty directory it will not complain. Not what I expected. [pearcec@abe tmp]$ mkdir test1 [pearcec@abe tmp]$ mkdir test2 [pearcec@abe tmp]$ touch test1/test [pearcec@abe tmp]$ php <?php rename("test1","test2"); ?> X-Powered-By: PHP/4.0.5 Content-type: text/html [pearcec@abe tmp]$ ls -al total 12 drwxr-xr-x 3 pearcec commnav 4096 Jun 15 13:17 . drwxr-xr-x 18 pearcec commnav 4096 Jun 15 13:15 .. drwxr-xr-x 2 pearcec commnav 4096 Jun 15 13:16 test2 [pearcec@abe tmp]$ ls -la test2/ total 8 drwxr-xr-x 2 pearcec commnav 4096 Jun 15 13:16 . drwxr-xr-x 3 pearcec commnav 4096 Jun 15 13:17 .. -rw-r--r-- 1 pearcec commnav 0 Jun 15 13:16 test [pearcec@abe tmp]$ http://php.he.net/manual/en/function.rename.php

« previous php.notes (#14377) next »