Ben mevcut dizin veya bir dosyayı yüklemeden önce var olup olmadığını kontrol etmek istiyorum.
Dizin return false yoksa.
Is_dir işi mi?
Örneğin, "etc / data / images /" sen-ebil kullanma bir dizin olup olmadığını kontrol etmek istedim:
$dir = "etc/data/images/"; //First specify the directory you want to check existence of.
if(is_dir($dir)){ //The 'is_dir' function does the checking.
echo "Yes, $dir is a directory.";
}else{//If 'is_dir' returns false, the following will be ran:
echo 'No that is not a directory...';
}