1

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

sheldonzy
  • 5,505
  • 9
  • 48
  • 86
Harish
  • 11
  • 2
  • Possible duplicate of [Getting error with move\_uploaded\_file HTTP wrapper does not support writeable connections](https://stackoverflow.com/questions/20165461/getting-error-with-move-uploaded-file-http-wrapper-does-not-support-writeable-co) – DigitCart Nov 27 '17 at 04:44

0 Answers0