Delete a folder using php

Published


You can delete a folder using this php script
Change the DIRECTORY to the directory you want to delete.

<?php
$dir='/DIRECTORY/';
rmdir( $dir );
?>

Code Explained


<?php
$dir='/DIRECTORY/'; //Storing the directory path to variable $dir.
rmdir( $dir ); //Removing Directory
?>


Function Used 

rmdir() 

rmdir() used to remove the directory



Comments

Post a Comment