Browse Source

上报错误ip

zhaoyang 1 year ago
parent
commit
39a18b55fb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Libs/Helpers.php

+ 1 - 1
app/Libs/Helpers.php

@@ -458,7 +458,7 @@ function dingTalkAlertException(\Throwable $exception)
     }
     }
 
 
     if(!$ip){
     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 = [
     $result = [