I allow uploads on my page, everything seems to work (error code is 0) but cant find the uploaded file.
Heres the handler
foreach($images['name'] AS $key => $image_name) {
if(empty($image_name)) { continue; }
$ext = strtolower(pathinfo($image_name, PATHINFO_EXTENSION));
if( (in_array($ext, ['jpg', 'jpeg', 'gif', 'png', 'bmp']) && ($images["size"][$key] < 512000)) ){
$source = $images['tmp_name'][$key];
$target = $path_to_image_directory . $image_name;
$image_type = $images['type'][$key];
$image_size = $images['size'][$key];
move_uploaded_file($source, $target);
$message .= '<tr><td>Name</td><td>'.$image_name.'</td><td rowspan="3"><img style="height:100px" src="'.$target.'"></td></tr>';
$message .= '<tr><td>Type</td><td>'.$image_type.'</td></tr><tr><td>Size</td><td>'.$image_size.'</td></tr>';
$message .= '</table>';
}
}
and I get
Warning: move_uploaded_file(…/providers/1/yokishop-logo.jpg): failed to open stream: No such file or directory in /home/luke69/public_html/thanks_provider.php on line 263
Warning: move_uploaded_file(): Unable to move ‘/tmp/phpIDhFZD’ to ‘…/providers/1/yokishop-logo.jpg’ in /home/luke69/public_html/thanks_provider.php on line 263
Warning: move_uploaded_file(…/providers/1/mitchs-logo.jpg): failed to open stream: No such file or directory in /home/luke69/public_html/thanks_provider.php on line 263
Warning: move_uploaded_file(): Unable to move ‘/tmp/phpzuPRC6’ to ‘…/providers/1/mitchs-logo.jpg’ in /home/luke69/public_html/thanks_provider.php on line 263
so its seing my images, but I dont understand the warning