How to copy files from one folder to another folder in php and delete them in source folder ?
I have two folder $incoming_file_path = /home/xmlcontainer and $processing_file_path = home/process_file. I am looping through all files in $incoming_file_path = home/xmlcontainer and than copying it into $processing_file_path = home/process_file.
After executing below code I am not able to copy the content of files but just the name of the files also am not able to delete files which I have copies to destination folder from source folder using unlink, I am surely using unlink in wrong way and would certainly appreciate any guidance on it.
Code
foreach( glob($incoming_file_path.'/*')as $key => $value ) {
copy($incoming_file_path.$value,$processing_file_path.$value);
unlink($incoming_file_path.$value);
}