$item) { $ctimes[$id] = $item['fstat']['ctime']; } if ($way == 'desc') { arsort($ctimes, SORT_NUMERIC); }else { asort($ctimes, SORT_NUMERIC); } $sorted = array(); foreach($ctimes as $id => $ctime) { array_push($sorted, $files[$id]); } return $sorted; } //生成GA统计代码 public static function getGACode() { $msid = !empty(FSC::$app['config']['GA_MEASUREMENT_ID']) ? FSC::$app['config']['GA_MEASUREMENT_ID'] : ''; if (empty($msid)) {return '';} $gacode = << eof; return $gacode; } }