Forum Moderators: coopster
Can anyone give me a good example for doing this? So far all I've found is:
$source_file = '/tmp/file.html';
$dest_file = '/home/mydomain/file.html';
copy($source_file, $dest_file);
thanks in advance
The copy function, like the move_uploaded_file function is for file uploading and moving a temporary file to its destination.
For moving the files, you need the rename() function:
[uk.php.net...]
$file = '/images/file.jpg';
rename($file, 'images/files/file.jpg');
This will move the file.jpg from the root images directory into the 'files' directory.
Hope that helps.
dc