How to use PHP & Delete/Remove Folder Learn how to use the PHP to Delete/Remove Folder on web site
ShotDev Focus:
- PHP & Delete/Remove Directory
Example
php_delete_folder.php
<html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <? $flgDelete = rmdir("shotdev"); if($flgDelete) { echo "Folder deleted."; } else { echo "Cannot delete folder."; } ?> </body> </html>
Create a php file and save to path root-path/myphp/
Run
http://localhost/myphp/php_delete_folder.php
Screenshot