Biliyorum, I know, bu soo kolay geliyor. Ama internette doğru cevabı bulmak için görünmüyor olabilir.
Ben buldum çözümün bir kullanımı oldu is_dir
.
if(is_dir($dir))
echo 'directory exists';
else
echo 'drectory not exist';
Ama bu wrong -- All this function does is to check whether the $dir
bir dizin olduğunu, bu dizin var olup olmadığını kontrol edin, ya da değildir. Diğer bir deyişle ben koyarsanız:
$rootDir = "C:\\Documents and Settings\\test\\My Documents\\Image Directory\\Me Dog\\";
o fonksiyonu web sunucuda böyle bir dizin bulabilirsiniz olsa bile, gerçek dönecektir.
Herhangi bir fikir?