rabin 3 tháng trước cách đây
mục cha
commit
f8bea57d5d
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      src/Dever/Helper/Cmd.php

+ 3 - 2
src/Dever/Helper/Cmd.php

@@ -43,6 +43,7 @@ class Cmd
         if ($daemon) {
             $shell .= ' 1>/dev/null 2>&1 &';
         }
+        //$shell = escapeshellcmd($shell);
         exec($shell, $output, $state);
         return array($state == 0, $output);
     }
@@ -60,7 +61,7 @@ class Cmd
         if ($count) {
             $shell .= ' | wc -l';
         }
-        $result = self::run($shell, false);
-        return $result;
+        $result = exec($shell, $output, $state);
+        return $count ? $output[0] : $output;
     }
 }