Escaping shell metacharacters
<?php system('ls -al '.escapeshellarg($directory)); system(escapeshellcmd($ls_program).' -al'); ?>
1. | Escaping User Input with the escapeshellcmd() Function | ||
2. | Executing df and displaying the results | ||
3. | string escapeshellcmd ( string command ) escapes special characters in shell commands |