/**
* 在PHP中执行系统命令,如LS
*
* @param
* @arrange 512-笔记网: 512Pic.com
**/
<?PHP
$cmd = "dir"; // Windows
// $cmd = "ls"; // Linux,Unix & Mac
exec(escapeshellcmd($cmd),$output,$status);
if ($status) echo "Exec command Failed";
else
{
echo "<b>";
foreach($output as $line) echo "$linen";
}
?>
/*** 来自编程之家 jb51.cc(jb51.cc) ***/