function dorestore_action() { $dir=ROOT.'/data/'.front::get('db_dir'); if(is_dir($dir)) { $db_files=front::scan($dir); foreach($db_files as $db_file) { if(!preg_match('/^\./',$db_file)) tdatabase::getInstance()->restoreTables($dir.'/'.$db_file); } front::flash('数据库还原成功!'); } front::redirect(url::create('database/restore')); }