When trying to move an image to a folder, I get the following errors:
move_uploaded_file ( link ): failed to open stream: HTTP wrapper does not support writeable connections move_uploaded_file (): Unable to move
'/ Applications / XAMPP / xamppfiles / temp / phpadxr8d' to ' link '
I was working well before but as much as I look, I do not see the problem. From a <form>
I enable uploading images. I have added the form enctype="multipart/form-data"
, I have given permissions to the folder both read and write (I already had them), and I receive the data by POST:
$thumb = $_FILES['thumb']['tmp_name'];
$thumb_db = $_FILES['thumb']['name'];
$ruta_imagen = $ruta . 'imagenes/articulos/' . $thumb_db;
move_uploaded_file($thumb, $ruta_imagen);
I am using absolute directories, therefore variable $ruta
.