Copy images from one folder to another
<p>My Web application stored in directory of XAMPP/htdocs/projectname/. And I have images(source) &amp; img(destination) folders in above directory.I am writing following line of code to get the copy images from one folder to another. But I get the following Warnnigs: <strong>(Warning: copy(Resource id #3/image1.jpg): failed to open stream: No such file or directory in C:\xampp\htdocs)</strong>  and images are not copied into destination.</p>

<pre><code>&lt;?php
        $src = opendir('../images/');
    $dest = opendir('../img/');
    while($readFile = readdir($src)){
            if($readFile != '.' &amp;&amp; $readFile != '..'){
                 if(!file_exists($readFile)){
                if(copy($src.$readFile, $dest.$readFile)){
                echo "Copy file";
            }else{
                    echo "Canot Copy file";
                }
                   }
            }
        }
?&gt;
</code></pre>
