note 8277 modified in rename by jmcastagnetto

From: Date: Wed, 06 Sep 2000 18:14:42 +0000
Subject: note 8277 modified in rename by jmcastagnetto
Groups: php.notes 
Request: Send a blank email to php-notes+get-4261@lists.php.net to get a copy of this message
[Editor's note: Behavior has been documented before, see message above and source code for PHP] 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

« previous php.notes (#4261) next »