| @@ 40-49 (lines=10) @@ | ||
| 37 | */ |
|
| 38 | public function terminal($command) |
|
| 39 | { |
|
| 40 | if (function_exists('system')) { |
|
| 41 | ob_start(); |
|
| 42 | system($command, $status); |
|
| 43 | $output = ob_get_contents(); |
|
| 44 | ob_end_clean(); |
|
| 45 | ||
| 46 | return compact('output', 'status'); |
|
| 47 | } |
|
| 48 | ||
| 49 | if (function_exists('passthru')) { |
|
| 50 | ob_start(); |
|
| 51 | passthru($command, $status); |
|
| 52 | $output = ob_get_contents(); |
|
| @@ 49-57 (lines=9) @@ | ||
| 46 | return compact('output', 'status'); |
|
| 47 | } |
|
| 48 | ||
| 49 | if (function_exists('passthru')) { |
|
| 50 | ob_start(); |
|
| 51 | passthru($command, $status); |
|
| 52 | $output = ob_get_contents(); |
|
| 53 | ob_end_clean(); |
|
| 54 | ||
| 55 | return compact('output', 'status'); |
|
| 56 | } |
|
| 57 | ||
| 58 | if (function_exists('exec')) { |
|
| 59 | exec($command, $output, $status); |
|
| 60 | $output = implode(""n"", $output); |
|