WHAT A LAMP Rotating Header Image

Directory operation in PHP

Create Directory

(“testdir”);

Directory

(“testdir”);

Open a Directory for Reading

$dh = (“testdir”);

Reading the contents of Directory

$dirname=”.”;

$dh = ($dirname) or die (“Couldn’t open dir”);

while(!(($file = ($dh)) === false)){

if (is_dir(“$dirname/$file”)){

echo “(D)”;

}

echo $file.”<br/>”;

}

($dh);

Related posts

0 Comments on “Directory operation in PHP”

Leave a Comment