I'm creating a project to import files, but I need the file name to use " LOCAL DATA INFILE" , before I was looking for a way to read the temporary file automatically, until I I saw this form of copy .
I want to copy it into the project (tmp folder) to be able to have a name and fixed location for the imported files.
You're returning this error for me: copy() expects parameter 1 to be a valid path, array given in
Here is my code:
$arquivo = $_FILES['arquivo'];
$destino = 'tmp/tmp.txt';
$arquivo_tmp = $_FILES['arquivo']['tmp_name'];
copy($arquivo, $destino);