删除文件php

function deleteRuntime(){
			$path=ROOT_PATH.'runtime/log/'.date("Ym");
			if(file_exists($path)){
				    $handle = opendir($path);
					while (false !==$file = readdir($handle)){
						if ($file !='.' && $file != '..'){
							$file_fullpath = $path."/".$file;
							echo iconv('GBK', 'utf-8', $file_fullpath);
							echo "
"; if (!is_dir($file_fullpath)){ unlink($file_fullpath); }else{ rmdir($file_fullpath); } } } } }

 

你可能感兴趣的:(php)