$file = $_FILES['file']; $target = '/path/to/target/directory/' . $file['name']; $t3lib_div::upload_copy_move($file['tmp_name'], $target);
$source = '/path/to/source/directory/file.txt'; $target = '/path/to/target/directory/file.txt'; $t3lib_div::upload_copy_move($source, $target);This code will move the file from the source directory to the target directory. Package library: t3lib_div is a part of the TYPO3 CMS.