string escapeshellcmd ( string command ) escapes special characters in shell commands : escapeshellcmd « Utility Function « PHP






string escapeshellcmd ( string command ) escapes special characters in shell commands

 
$_GET["search"] = escapeshellcmd($_GET["search"]);
    passthru("grep {$_GET["search"] /var/www/meetinglogs/*");
  
  








Related examples in the same category

1.Escaping shell metacharacters
2.Escaping User Input with the escapeshellcmd() Function
3.Executing df and displaying the results