After uploading the file, and sending form information to PHP page, I get the file with $_FILES['MyFile']
. After receiving the file, I move it to another folder on my system:
if (move_uploaded_file($_FILES['MyFile']['tmp_name'], $uploaddir.basename($_FILES['MyFile']['name'])){ ...
My problem is. After moving this file to a new directory, I can not read it in the new directory. For example I'll leave a part of the code here:
$fil = $_FILES['file-intimacao'];
$uploaddir = 'files/';
$files = '';
if(move_uploaded_file($fil['tmp_name'], $uploaddir.basename($fil['name']))){
$files = $uploaddir.$fil['name']; // novo diretório do arquivo
$teste = file_exists ( $files ); //$teste me retorna falso, não me deixando utilizar o arquivo.
}