PageRenderTime 51ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/exec.php

https://github.com/waterscent/TryPhp
PHP | 18 lines | 13 code | 5 blank | 0 comment | 2 complexity | 5b2b97a97c0e8c07e0a687503402f253 MD5 | raw file
  1. <?php
  2. $cmd = "ls";
  3. exec(escapeshellcmd($cmd), $output, $status);
  4. if ($stauts) {
  5. echo "ls failed";
  6. } else {
  7. echo "<pre>";
  8. foreach($output as $line) {
  9. echo $line."<br />";
  10. }
  11. echo "</pre>";
  12. }
  13. ?>