php escapeshellcmd()函数

时间:2016-03-23
php escapeshellcmd()函数用来跳过字符串中的特殊符号,防止恶意用户耍花招破解服务器系统。可以搭配exec()与system()函数使用。
<?php
$command = './configure '.$_POST['configure_options'];
$escaped_command = escapeshellcmd($command);
system($escaped_command);
?>

在线运行