How to check if a directory if exists or not?
I've tried to use try catch Exception, but there's no effect at all.if($induk[$i] != 'root'){
try{
mkdir("../../stok/".$induk[$i], 777);
mkdir("../../thumbs/".$induk[$i], 777);
}
catch(Exception $e){
//nothing to do
}
mkdir("../../stok/".$induk[$i]."/".$kategori[$i], 777);
mkdir("../../thumbs/".$induk[$i]."/".$kategori[$i], 777);
}
else{
mkdir("../../stok/".$kategori[$i], 777);
mkdir("../../thumbs/".$kategori[$i], 777);
}
Hope that somebody can help me.
Thanks



Reply With Quote

Bookmarks