copy - Copying files in php -
i know copy() function not allow directories listed first, there way bypass this? attempting copy file 1 directory different directory, need able state file should copied , to. here code have: if ($_files["pdffile"]["type"] == "application/pdf") { if (file_exists("../pdf_new/".$rowapp['filename'])) { copy("../pdf_new/".$rowapp['filename'], "../pdf_new/backup/".$rowapp['filename']); } move_uploaded_file($_files["pdffile"]["tmp_name"], "../pdf_new/".$rowapp['filename']); } i tried replacing "../pdf_new" variable , adding "/" between variable , .$rowapp['filename'], still did not work. thoughts?