PHP
·
发表于 5年以前
·
阅读量:8254
<?php
$shell = "ls -la";
exec($shell, $result, $status);
$shell = "<font color='red'>$shell</font>";
echo "<pre>";
if( $status ){
echo "shell命令{$shell}执行失败";
} else {
echo "shell命令{$shell}成功执行, 结果如下<hr>";
print_r( $result );
}
echo "</pre>";
?>