running on localhost win7 xampp, this code comes up with error
$source = $_FILES['fupload']['tmp_name'];
$upload_dir = "invform/upload/";
if (file_exists($upload_dir) && is_writable($upload_dir)) {
move_uploaded_file( $source, $upload_dir ) or die ("Couldn't copy");
}
else {
die ('Upload directory is not writable, or does not exist.');
}
the error is Couldn't copy means that the directory is writable
$source is : D:\\xampp\\tmp\\phpFB1.tmp
what would be the problem?
The destination of move_uploaded_file should be a filename:
Check move_uploaded_file on the manual.