2
I’m creating a project to import files, only I need the file name to use "LOAD LOCAL DATA INFILE", before I searched for a way to read the temporary file automatically, until I saw this form of copy.
I am wanting 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 mistake to me: copy() expects parameter 1 to be a valid path, array given in
Just follow my code:
$arquivo = $_FILES['arquivo'];
$destino = 'tmp/tmp.txt';
$arquivo_tmp = $_FILES['arquivo']['tmp_name'];
copy($arquivo, $destino);
give a
var_dump
in$arquivo
and$destino
, it seems to me that one of these two is not with the expected value.– Pedro Augusto