I got a problem with fileuploading images.
When I try to upload I get this error:
Warning: copy(/assets/img/products/): failed to open stream: No such file or directory in /customers/d/7/4/(website name)/httpd.www/newSite/pages/admin/adminPages/products.php on line 212
This is the code it's referring to:
if(isset($_POST['submitMoreImg'])){
    $name = $_POST['imgName'];
    $prod_id = $_POST['prod_id'];
    if(!empty($_FILES['image']))
    {
        $path = "/assets/img/products/";
        $path = $path.basename( $_FILES['image']['imgName']);
        if(copy($_FILES['image']['tmp_name'], $path)) {
            echo'<script type="text/javascript">
                    alert("uploaded");
                </script>';
              uploadExtraImg($name, $prod_id);
        } 
        else{
            echo "Error: ".$sql."<br>".$connection->error;
        }
      }
}
I can't seem to find the correct folder, I tried a lot of different folder path.
 
     
    