Deleting a Directory by Using rmdir() : Directory Create Delete « File Directory « PHP






Deleting a Directory by Using rmdir()

 <?php
  if (file_exists("./dummydir")) {
    if(is_dir("./dummydir")) {
       $result = rmdir("./dummydir");
       echo "Result = " . $result;
    }
  }
 ?>

           
       








Related examples in the same category

1.Creating and Destroying a Directory Handle
2.Delete an empty directory called dir1