note 13513 added to function.copy.php
| From: | php at christianlederer dot com | Date: | Tue, 19 Jun 2001 21:06:51 +0000 |
| Subject: | note 13513 added to function.copy.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-14466@lists.php.net to get a copy of this message | ||
copy($src, $dest); will overwrite an existing $dest file without reporting.
To get around this, use
if (!file_exists($dest)){
copy($src, $dest);
} else {
# put your error stuff here
}
-
Christian Lederer
http://www.php.net/manual/en/function.copy.php