You can use rmdir() function to do this task, before using this function you should remember that you can only delete empty folders
<?php
$path = 'path to directory'
//First Check if deleting a directory
if(is_dir($path))
{
//remove directory
if(rmdir($path))
{
echo 'Deleted';
}
else
{
echo 'error';
}
}
else
{
echo 'Not a directory';
}
?>
Get Free Sinhala IT Learning Videos Kuppiya.com
No comments:
Post a Comment