123456789101112131415161718192021 |
- <?php
- class SystemLog {
- private static $logPath = __DIR__.'/lib/';
- private $logFile;
- public static function GET_LOG_PATH($file,$system_uname,$param){
- try{
- $file_path = self::$logPath.$file['system']."/".$file['controller'].".php";
- if(!file_exists($file_path)){
- throw new Exception("文件不存在");
- }
- $data = include(self::$logPath.$file['system'].'/'.$file['controller'].'.php');
- return sprintf($data[$file['action']]['msg'],$system_uname,$param[$data[$file['action']]['resplace'][0]??0]??'');
- }catch (Exception $e){
- return "文件不存在";
- }
- }
- }
|