Answers for "php remove directory and subdirectories"

PHP
2

php recursively delete directory

function removeDirectory($path) {

	$files = glob($path . '/*');
	foreach ($files as $file) {
		is_dir($file) ? removeDirectory($file) : unlink($file);
	}
	rmdir($path);

	return;
}
Posted by: Guest on July-17-2020

Code answers related to "php remove directory and subdirectories"

Browse Popular Code Answers by Language