windows php执行终端命令


    $cmd = '"H:\phpstudy_pro\Extensions\php\php7.3.4nts\php.exe" I:\weman\webman\start.php I:\weman\webman\runtime\/windows\start_monitor.php I:\weman\webman\runtime\/windows\start_task.php I:\weman\webman\runtime\/windows\start_gatewayworker.php I:\weman\webman\runtime\/windows\start_plugin.webman.gateway-worker.gateway.php I:\weman\webman\runtime\/windows\start_plugin.webman.gateway-worker.worker.php I:\weman\webman\runtime\/windows\start_plugin.webman.gateway-worker.register.php';
    $descriptorspec = [STDIN, STDOUT, STDOUT];
    $resource = proc_open($cmd, $descriptorspec, $pipes, null, null, ['bypass_shell' => true]);
    if (!$resource) {
        exit("Can not execute $cmd\r\n");
    }
    return $resource;

 

posted @ 2023-05-05 11:05  酷酷的城池  阅读(114)  评论(0编辑  收藏  举报