Problem with move_uploaded_file () [closed]

-1

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 .

    
asked by JetLagFox 18.06.2017 в 22:25
source

1 answer

2

You have tried adding the path local , since you can not open a file through HTTP .

Example:

$ruta_imagen = '/imagenes/articulos/' . $thumb_db;
    
answered by 18.06.2017 / 23:01
source