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, ∼2735🔥, 0💬
Popular Posts:
Why I am getting "LNK1104: cannot open file 'MSCOREE.lib'" error when building a C++/CLI program? Vi...
What is Azure API Management Publisher Dashboard? Azure API Management Publisher Dashboard is an Azu...
How to use "xsl-transform" Azure API Policy Statement? The "xsl-transform" Policy Statement allows y...
How to use the urllib.request.Request object to build more complex HTTP request? The urllib.request....
Where to find tutorials on Using Azure API Management Publisher Dashboard? Here is a list of tutoria...