Jump to content

is_dir fails to see folder is folder not file !


mojito

Recommended Posts

inside admin directory is a folder called "hh" and a file callled admin.php both are being seen by the script below but "hh" is not being recognised as a folder with is_dir comming out as false ???

 

$dir="./admin/";
openFolder();
function openFolder () {
clearstatcache() ;
global $dir;
if (is_dir($dir)) {
//open catalog
$open = opendir($dir);
//check every file
while (false !== ($file = readdir($open))) {
	var_dump (is_dir($file));
	echo $file;
	}
}
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.