I'm trying to take data from a form by post with slim, but the documentation does not show how to use the $_FILES[]
, I can take the name of the file but does not move to the folder.
$app->post('/publicar', function () use ($app, $db){
$img = $_FILES['img']['name'];
$ruta = $_FILES['img']['tmp_name'];
$destino = "images/".$img;
move_uploaded_file($ruta, $destino);
});