From: "Edward Peloke" <[EMAIL PROTECTED]>

> This is probably an easy question

Yep.. ;)

> I have an uploaded image in a temp file that I want to rename and put in
> another folder.  I am using rename() which works fine, the problem is, I
> want to force an overwrite if the file already exists.  [snip]

You should use move_uploaded_file(), which will overwrite the destination
file if it exists. It also has the added security that rename() does not in
that it will ENSURE the file actually came from an HTTP POST operation.

http://us2.php.net/manual/en/function.move-uploaded-file.php

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to