note 25668 added to function.copy

From: Date: Tue, 01 Oct 2002 22:41:20 +0000
Subject: note 25668 added to function.copy
Groups: php.notes 
Request: Send a blank email to php-notes+get-37489@lists.php.net to get a copy of this message
In response to mail(at)philipp-louis.de: You may want to modify this to check for copy success before unlinking so you don't loose your file if the copy fails. function move($source, $destination) { if($result1 = copy($source, $destination)) $result2 = unlink($source); return($result1 && @$result2); } -- http://www.php.net/manual/en/function.copy.php http://master.php.net/manage/user-notes.php?action=edit+25668 http://master.php.net/manage/user-notes.php?action=delete+25668 http://master.php.net/manage/user-notes.php?action=reject+25668

« previous php.notes (#37489) next »