![]() ![]() A simple method for recursively deleting a directory and all its content in PHP:-function removeDirectory. Blog Talks Code About Recursively Remove a Directory in PHP. In case we fail we return false, We use the false to stop the recursive call. A simple method for recursively deleting a directory and all its content in PHP. We also need a to define the final statement in our case the lowest possible solution is deleting a single file: While(false != ($entry = readdir($handle))) So here is my recursive directory delete function: Well today I needed to delete folders but I needed something robust that handled errors better than what I was able to find. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |