move file from one directory to another php code example
Example: PHP Move File from One Folder to Another
<?php /* Store the path of source file */$filePath = 'images/test.jpeg'; /* Store the path of destination file */$destinationFilePath = 'copyImages/test.jpeg'; /* Move File from images to copyImages folder */if( !rename($filePath, $destinationFilePath) ) { echo "File can't be moved!"; } else { echo "File has been moved!"; } ?>