I'm trying to custom upload image in Opencart,
Here is my code:->
$base_url = $this->config->get('config_url');
$upload_path = $base_url."image/customer/";
//echo $upload_path . $image1;die;
if (!empty($_FILES['image']['name'])) {
$image1 = $_FILES['image']['name'];
$file_tmp = $_FILES['image']['tmp_name'];
$img_res= move_uploaded_file($file_tmp, $upload_path . $image1);
}
I'm getting this error message:->
Warning:
move_uploaded_file(http://localhost/wm/image/customer/download (1).jpg): failed to open stream: HTTP wrapper does not support writeable connections in C:\xampp\htdocs\wm\catalog\controller\feed\user_api.php on line 220 Warning: move_uploaded_file(): Unable to move 'C:\xampp\tmp\phpC5CC.tmp' to 'http://localhost/wm/image/customer/download (1).jpg' in C:\xampp\htdocs\wm\catalog\controller\feed\user_api.php on line 220