02 2013 档案
摘要:function Zip($source,$destination){ if (!extension_loaded('zip') || !file_exists($source)) { return false; } $zip = new ZipArchive(); if (!$zip->open($destination, ZIPARCHIVE::OVERWRITE)) { return false; } $source = str_replace('\\'...
阅读全文
摘要:1. 第一种方法在php manual评论中的第一个就有。public static function delTree($dir) { if(!is_dir($dir)) return; $files = array_diff(scandir($dir), array('.','..')); foreach ($files as $file) { (is_dir("$dir/$file")) ? self::delTree("$dir/$file") : unlink("$dir/$file"); }.
阅读全文

浙公网安备 33010602011771号