Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php recursively delete directory

function removeDirectory($path) {

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

	return;
}
Source by andy-carter.com #
 
PREVIOUS NEXT
Tagged: #php #recursively #delete #directory
ADD COMMENT
Topic
Name
3+7 =