Composer.phar不想由PHP脚本的shell_exec运行。为什么? [英] Composer.phar don't want to run by shell_exec from PHP script. Why?

查看:104
本文介绍了Composer.phar不想由PHP脚本的shell_exec运行。为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用所有可能的参数(例如-d和完整路径等)执行它。没有错误。当运行另一个命令时,一切正常,从CMD运行作曲器时,一切也正常。已经尝试过exec,system,shell_exec等。

Trying to execute it with all possible params, such as -d and full path etc.. No errors. When running another commands, all is ok, when running composer from CMD, all is ok too. Have tried exec, system, shell_exec etc.. What it could be?


echo system('php composer.phar install');

echo system('php composer.phar install');


推荐答案

也尝试输出错误流:

system('php composer.phar install 2>&1');

它可能会给您更多有关出问题的提示。

It might give you more of a hint as to what is going wrong.

这篇关于Composer.phar不想由PHP脚本的shell_exec运行。为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆