ソースを参照

上报错误ip

zhaoyang 1 年間 前
コミット
95d4e6963b
1 ファイル変更1 行追加1 行削除
  1. 1 1
      app/Libs/Helpers.php

+ 1 - 1
app/Libs/Helpers.php

@@ -306,7 +306,7 @@ function dingTalkAlertException(\Throwable $exception)
     }
 
     if(!$ip){
-        $ip = trim( shell_exec("  eth0 |grep 'inet ' 2>/dev/null  |awk '{print $2}' ") );
+        $ip = trim( shell_exec("ifconfig  eth0 |grep 'inet ' 2>/dev/null  |awk '{print $2}' ") );
     }
 
     $result = [