php - Both move_uploaded_file and copy functions won't move my files to new destination , any idea why? -


i'm trying move pictures new folder called new_images, move_uploaded_file isn't working. tried copy($entry, $dir2); isn't working either. it's on live site. suggestions?

$dir = $_server['document_root'].'/images/classifieds/'.$row['user_id'].'/ads/'.$row['listbingo_ad_id'].'';  if ($handle = opendir($dir)) {     //echo "directory handle: $handle\n";     //echo "entries:\n";      /* correct way loop on directory. */     while (false !== ($entry = readdir($handle))) {          if($entry !="." && $entry !=".."){             $dir2 = $_server['document_root'].'/images/new_images/'.$entry;             move_uploaded_file($entry, $dir2);            echo "insert tbl_classified_image (clsd_id,mem_id,cls_img_file,img_status) values(".$row['listbingo_ad_id'].",6,'".$entry."','y');\n";          }     }  } 


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -