如何使用php在终端中运行Fast lane?exec()或shell_exec()

如何使用php在终端中运行Fast lane?exec()或shell_exec(),php,Php,我尝试在终端中使用php运行fast lane命令,像cd、pwd、ls和chmod这样的命令在php中使用exec或shell exec函数运行得很好,但是当我尝试运行fast lane命令时,它抛出错误127,我如何使用php运行fast lane function terminal($command) { $output = []; $return_var = ''; //exec if (function_exists('exec')) {

我尝试在终端中使用php运行fast lane命令,像cd、pwd、ls和chmod这样的命令在php中使用exec或shell exec函数运行得很好,但是当我尝试运行fast lane命令时,它抛出错误127,我如何使用php运行fast lane

function terminal($command)
{
    $output = [];
    $return_var = '';
    //exec
    if (function_exists('exec')) {
         exec($command, $output, $return_var);
    } else {
        $output = 'Command execution not possible on this system';
        $return_var = 1;
    }

    return array('output' => $output, 'status' => $return_var);
}

// $path = "cd /Applications/XAMPP/xamppfiles/htdocs/mystudiomobile/cordova7/platforms/ios/fastlane";
// $path_c = "fastlane init"; path and path_c present in test.sh
$command = "/Applications/XAMPP/xamppfiles/htdocs/php1/test.sh";
$path_change = terminal("$command");

if($path_change['status'] == 0)
{
    echo json_encode($path_change['output']);
    echo $path_change['status'];
}
else
{
    echo "some problem";
    echo $path_change['status'];
}


我发现在php中,使用诸如exec之类的系统函数执行http和https协议存在局限性。它不能快速运行,最好的做法是使用访问php的bash脚本,而不是相反。我发现php中使用系统函数(如exec)执行http和https协议存在局限性。如果无法运行fast lane,最好的做法是使用访问php的bash脚本,而不是相反。

错误
127
通常意味着系统不理解该命令。这意味着它不在路径中,也不是内置命令。确保命令在路径上。你能解释一下“快车道”是什么意思吗?代码的哪些部分失败了?如果这与底层shell脚本有关,那么您尝试调试该脚本的唯一执行情况是什么?如果我从终端运行相同的.sh文件脚本,它运行得非常好,但在php EXEC函数中失败,fast lane是将构建上载到app store connect的工具,如果我可以通过任何服务器端脚本访问FastLane,我们就可以完全自动化。我们更喜欢php@NicoHaaseFastlane是一款移动应用程序构建和部署自动化工具。错误
127
通常意味着系统无法理解该命令。这意味着它不在路径中,也不是内置命令。确保命令在路径上。你能解释一下“快车道”是什么意思吗?代码的哪些部分失败了?如果这与底层shell脚本有关,那么您尝试调试该脚本的唯一执行情况是什么?如果我从终端运行相同的.sh文件脚本,它运行得非常好,但在php EXEC函数中失败,fast lane是将构建上载到app store connect的工具,如果我可以通过任何服务器端脚本访问FastLane,我们就可以完全自动化。我们更喜欢php@NicoHaaseFastlane是一款移动应用程序构建和部署自动化工具。