Skip to content

Instantly share code, notes, and snippets.

View maximeplante's full-sized avatar

Maxime Plante maximeplante

  • Canada
View GitHub Profile
@zaynali53
zaynali53 / RecursiveDirectoryRemover.php
Last active August 1, 2016 06:08
Recursively deletes files within folders
<?php
function removeFiles($path)
{
if (is_dir($path)) {
$files = glob($path . '*', GLOB_MARK);
foreach ($files as $file) {
removeFiles($file);
}
rmdir($path);