PHP Execution System Command, PHP Execute system command
The examples in this article describe how to execute system commands in PHP. Share to everyone for your reference. The specific analysis is as follows:
Execute system commands in PHP, such as LS
<?php//Exec.php$cmd = "dir"; windows//$cmd = "ls"; Linux, Unix & Macexec (Escapeshellcmd ($cmd), $output, $status), if ($status) echo "Exec command failed"; Else{echo "
"; foreach ($output as $line) echo" $linen ";}? >
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/970975.html www.bkjia.com true http://www.bkjia.com/PHPjc/970975.html techarticle PHP executes the system command method, PHP executes the system command This article describes the method of executing system commands in PHP. Share to everyone for your reference. The specific analysis is as follows: in PHP ...