opendir('/images_host/'.$dir.' ');

prova con opendir('images_host/'.$dir);

e soprattutto dipende da $dir, perchè la funzione in se per se è giusta