"; for ($i=0; $i', '', $selbit); } } $outpute = str_replace("\n", "
", exec($cmnd)); if ($cmnd == 'cal') { $outp = str_replace("\n", "
", shell_exec($cmnd)); $outsa = explode('_', $outp); $output = $outp; if (sizeof($outsa) == 3) { $output = $outsa[0] . '' . $outsa[1] . '' . $outsa[2]; } else { $outputee = str_replace("\n", "
", exec('date')); $outqa = explode(' ', $outputee); for ($i=0; $i' . substr($outqa[$i], 0, 1) . '' . trim(substr(($outqa[$i] . ' '), 1)) . ' ' . $outra[1]; } else if (strlen($outqa[$i]) <= 2 && strpos($output, ' ' . $outqa[$i] . '') !== false) { $outra = explode(' ' . $outqa[$i] . '', $output); $output = $outra[0] . ' ' . substr($outqa[$i], 0, 1) . '' . trim(substr(($outqa[$i] . ' '), 1)) . ' ' . $outra[1]; } } } } else { $output = str_replace("\n", "
", shell_exec($cmnd)); } // Display the list of all file // and directory, if chosen echo "s_e.php - PHP Supervise shell_exec vs exec
" . $selbit . "   RJM Programming - March, 2022
Thanks to https://www.geeksforgeeks.org/php-shell_exec-vs-exec-function/
$" . "output = shell_exec('" . $cmnd . "');$" . "output = exec('" . $cmnd . "');
$output
$outpute
"; ?>