Good morning classmates, I have problems when uploading files, I'm doing tests in local, the data is sent to the bbdd, I generate the destination path, but at the time of executing the function move_uploaded_file does not upload them, and does not throw any error.
The error tells me that the destination route is not a directory, since I gave permission to the parent directory.
$ruta_archivo = rutaBase.'documentos/otros';
$ruta_final = $ruta_archivo."/".$nombre_archivo;
if( is_dir($ruta_final) ){
if( is_writable($ruta_final) ){
if( move_uploaded_file($direccion_temporal, $ruta_final) ){
$respuesta['status'] = '1';
$respuesta['ruta'] = $ruta_final;
$respuesta['tmp'] = $direccion_temporal;
}else{
$respuesta['status'] = '0';
$respuesta['ruta'] = $ruta_final;
$respuesta['tmp'] = $direccion_temporal;
}
}else{
$respuesta['estado'] = 'la ruta no tiene permisos de escritura';
$respuesta['status'] = '0';
}
}else{
$respuesta['estado'] = 'la ruta no es directorio';
$respuesta['status'] = '0';
$respuesta['ruta'] = $ruta_final;
}