1、使用shell_exec执行命令,先去把php禁用函数解除禁用shell_exec函数,就可以使用了,这个执行会等待结果
$output = shell_exec('
cd /home/api.gdzawy.com
php think House
');
// $output = shell_exec('./script.sh');
return $output;
理论不等待执行结果,直接通过,使用&代表命令后台运行
1、使用shell_exec执行命令,先去把php禁用函数解除禁用shell_exec函数,就可以使用了,这个执行会等待结果
$output = shell_exec('
cd /home/api.gdzawy.com
php think House &
');
// $output = shell_exec('./script.sh');
return $output;
php使用命令shell_exec
于 2023-10-06 17:16:46 首次发布