Following is my piece of code which moves file to particular directory.
foreach($files as $dir_file)    //Getting Path of XML file
        {
            echo "\nDir Files: ".$dir_file."\n";
            if($dir_file != "." && $dir_file != "..")
            {
                if(strpos($dir_file,'.xml'))     
                {
                    echo "\nXML file found\n";
                    $xmlPath=$path."/".$dir_file;
                    // return ReadXML($xmlPath);
                }
                if(strpos($dir_file,'.JPG'))
                {
                    echo "\n FOund \n";
                    $ret=move_uploaded_file($dir_file, 'upload/'.$dir_file));
                     echo "\n retunr values: ".$ret;
                }  
            }
I have checked all permission and it is 777. but move upload file function is not moving my file to particular directory. it is also not returning anything. What i am doing wrong?
 
     
     
    