> Which built-in PHP functions would I use to move a file from one
> into another? I'm thinking that this requires more than one function
> achieve what I want.
> What approaches should I take? Do I need to copy the file into a
> directory first and then move it to the destination directory? Or Is
> possible for me to move the file directly from one directory into
> The functions I read about so far are copy() and move_uploaded_file(),
> the move_uploaded_file() function seems to work only when the file is
> uploaded from an HTML form, or am I wrong?
> Just looking for some direction.
Use copy() to copy the file and then unlink() to delete the old one if
the copy is successful.
Or you can use exec() to make a system call to do it.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php