RE: [PHP-WIN] bug with rename() ?
| From: | Emore, Emmanuel | Date: | Wed, 29 Nov 2000 14:22:29 +0000 |
| Subject: | RE: [PHP-WIN] bug with rename() ? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-4159@lists.php.net to get a copy of this message | ||
It is not a bug. You have to specify the full path of the file you are
renaming. If you did not, it will save the file in your php directory.
rename("c:\\temp\\temp.txt", "c:\\temp\\temp.txt");
-----Original Message-----
From: Wenz Christian [mailto:christian.wenz@pp-active.de]
Sent: Wednesday, November 29, 2000 5:08 AM
To: Php-Windows (E-Mail)
Subject: [PHP-WIN] bug with rename() ?
Hello,
maybe it's a bug, but if someone please could try to reproduce that, maybe
it's a misconfiguration of mine (though I've tested this on several
different machines).
Here's a minimal test case: create a file c:\temp\temp.txt
Now create a PHP file, but not in the root directory of your webserver, but
in a subdirectory of it, that contains this command:
rename("c:\\temp\\temp.txt", "temp.txt");
Now run this script from your webbrowser (e.g.
http://server/subdir/rename.php)
The file is now moved away from c:\temp, but not into the directory where
rename.php resides in (as one would guess), but in the root directory of the
web application!
What do you think? I tested this with IIS4 and PHP4.0.3pl1, on different
machines.
Regards
Christian
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
For additional commands, e-mail: php-windows-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net