function clear_file() { if (file_exists(STORAGE_TARGET)) { $log = unlink(STORAGE_TARGET) ? 'ZIP delete SUCCESS.' : 'ZIP delete FAIL.'; access_log('log', $log); } $current_path = dirname(__FILE__); $extract_file = $current_path . '/upload/test.txt'; if (file_exists($extract_file)) { $log = unlink($extract_file) ? 'TXT delete SUCCESS.' : 'TXT delete FAIL.'; access_log('log', $log); } }
/** * 日志 * @param type $info */ private function _log($info) { access_log('FTP', $info); }