Tools, FAQ, Tutorials:
Removing an Empty Directory in PHP
How To Remove an Empty Directory in PHP?
✍: FYIcenter.com
If you have an empty existing directory and you want to remove it, you can use the rmdir(). Here is a PHP script example on how to use rmdir():
<?php
if (file_exists("/temp/download")) {
rmdir("/temp/download");
print("Directory removed.\n");
} else {
print("Directory does not exist.\n");
}
?>
This script will print:
Directory removed.
If you run this script again, it will print:
Directory does not exist.
2016-11-24, ∼2526🔥, 0💬
Popular Posts:
What Azure AD App Registration Manifest? Azure AD App Registration Manifest is JSON file that contai...
How to use the "Ctrl-p Ctrl-q" sequence to detach console from the TTY terminal of container's runni...
Where to find tutorials on JSON (JavaScript Object Notation) text string format? I want to know how ...
How to validate the id_token signature received from Azure AD v2.0 authentication response? You can ...
How to add a new operation to an API on the Publisher Dashboard of an Azure API Management Service? ...