防止命令注入

shell_exec 或是 exec 函数 可使用escapeshellarg函数来转义 Shell 参数。,转义用户的输入并将其封装成单引号。 如: $targetIp = escapeshellarg($_GET['ip']); $output = shell_exec("ping -c 5 $targetIp");shell
相关文章
相关标签/搜索