Creating and Destroying a Directory Handle : Directory Create Delete « File Directory « PHP






Creating and Destroying a Directory Handle

<?php
  if (file_exists("./")) {
    if (is_dir ("./")) {
       $dh = opendir("./") or die (" Directory Open failed !");
       echo "Directory was opened successfully";
       closedir ($dh);
    }
  }
?>

           
       








Related examples in the same category

1.Deleting a Directory by Using rmdir()
2.Delete an empty directory called dir1