Web site baker image upload problem
<p>Recently I am developing website baker's module. There is one option to upload image. I am using php image upload code but give the following error and image didn't upload.</p>

<pre><code>Warning: move_uploaded_file(http://localhost/wb/media/gallery/mypic.jpg) [function.move-uploaded-file]: failed to open stream: HTTP wrapper does not support writeable connections in C:\wamp\www\wb\modules\hotelmod\save_picture.php on line 84

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\wamp\tmp\phpBBBD.tmp' to 'http://localhost/wb/media/gallery/mypic.jpg' in C:\wamp\www\wb\modules\hotelmod\save_picture.php on line 84
</code></pre>

<p>here's the code that i use:</p>

<pre><code>if (($_FILES["image"]["type"] == "image/jpeg" || $_FILES["image"]["type"] == "image/pjpeg" || $_FILES["image"]["type"] == "image/gif" || $_FILES["image"]["type"] == "image/x-png") &amp;&amp; ($_FILES["image"]["size"] &lt; 4000000))
    {

        // if uploaded image was JPG/JPEG
        if($_FILES["image"]["type"] == "image/jpeg" || $_FILES["image"]["type"] == "image/pjpeg"){  
            $image_source = imagecreatefromjpeg($_FILES["image"]["tmp_name"]);
        }       
        // if uploaded image was GIF
        if($_FILES["image"]["type"] == "image/gif"){    
            $image_source = imagecreatefromgif($_FILES["image"]["tmp_name"]);
        }   
        // BMP doesn't seem to be supported so remove it form above image type test (reject bmps)   
        // if uploaded image was BMP
        if($_FILES["image"]["type"] == "image/bmp"){    
            $image_source = imagecreatefromwbmp($_FILES["image"]["tmp_name"]);
        }           
        // if uploaded image was PNG
        if($_FILES["image"]["type"] == "image/x-png"){
            $image_source = imagecreatefrompng($_FILES["image"]["tmp_name"]);
        }


        $remote_file =  WB_URL.'/modules/hotelmod/images/'.$_FILES["image"]["name"];
        move_uploaded_file($_FILES['image']['tmp_name'], $remote_file);
}
</code></pre>

<p>How can I resolve this? Thanks in advance. </p>
