This article mainly introduces the method of deleting empty directories in php. It analyzes the usage skills of rmdir function with examples, which has certain reference value. , friends in need can refer to it
The example in this article describes how to delete empty directories in PHP. Share it with everyone for your reference. The specific analysis is as follows:
You can delete an empty directory through the rmdir() function in php
?
3 4
5
6
|
if (file_exists("/temp/test")) { rmdir("/temp/test");
print("Directory does not exist.n"); } ?> |
1 |
Directory removed. |
1 | Directory does not exist. |