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