Mega Code Archive

 
Categories / Php / Functions
 

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

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