#36844 [Opn->Bgs]: Rename file does not work in file already exists

From: Date: Fri, 24 Mar 2006 12:33:33 +0000
Subject: #36844 [Opn->Bgs]: Rename file does not work in file already exists
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-94840@lists.php.net to get a copy of this message
ID: 36844 Updated by: tony2001@php.net Reported By: astro101 at hotmail dot com -Status: Open +Status: Bogus Bug Type: Directory function related Operating System: Win XP SP2 PHP Version: 5.1.3RC1 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: ------------------------------------------------------------------------ [2006-03-24 13:32:04] astro101 at hotmail dot com Description: ------------ When trying to rename a file to a file name that already exists script fails Reproduce code: --------------- $file = fopen($filename, 'w'); fwrite($file, "Data"); fclose($file); $rv = rename($filename,$Exitingfile); Expected result: ---------------- I would expect the existing file to be overidden and now have the new data in it. Actual result: -------------- The existing file remains aswell as the new file. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36844&edit=1

« previous php.bugs (#94840) next »