note 8277 added to rename
| From: | rrstudio2 at icqmail dot com | Date: | Mon, 04 Sep 2000 06:28:39 +0000 |
| Subject: | note 8277 added to rename | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4102@lists.php.net to get a copy of this message | ||
Here is a tip for window's users:
I tried rename ("test.txt", "testing.tst") and it doesn't work although the
html file, php file and test.txt are all in the same directory. I also tried to type in the
location of the directory, rename ("c:\program
files\apache\htdocs\forms\test.txt","testing.txt") but that doesn't work either
(I tried forward slashes too), I think the problem there might be the two word directory name. So
what I ended up doing was creating a new directory c:\phpcode and put the test.txt file in there and
you have to use forward slashes in the code, so the working code is...
rename ("c:/phpcode/test.txt","testing.txt");
Rather picky isn't it...
http://www.php.net/manual/function.rename.php