php move tmp file code example
Example 1: php move file
//Use the rename() function.
rename('first_location/image1.jpg', 'new_location/image1.jpg');
Example 2: move uploaded file in php
move_uploaded_file(file_path, moved_path)
//Use the rename() function.
rename('first_location/image1.jpg', 'new_location/image1.jpg');
move_uploaded_file(file_path, moved_path)