rabin 2 달 전
부모
커밋
f8bea57d5d
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/Dever/Helper/Cmd.php

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

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