2014-01-06 12:08
浏览 58

从wampstack运行php composer.phar

I want to run php composer.phar update from my apache2/htdocs/reuzze folder. My php file is located in wampstack/php and my folder i want to update in composer in wampstack/apache2/htdocs/reuzze.

I have tried doing this:

php ../apache2/htdocs/reuzze composer.phar update

But I get the error 'Could not open input file : ../apache2/htdocs/reuzze

Whats the rigt link?

图片转代码服务由CSDN问答提供 功能建议

我想从我的apache2 / htdocs / reuzze文件夹运行php composer.phar更新。 我的php文件位于 在wampstack / php和我的文件夹中我想在wampstack / apache2 / htdocs / reuzze中更新作曲家。


   php ../apache2/htdocs/reuzze composer.phar update 

但我收到错误'无法打开输入文件:../ apache2 / htdocs / reuzze


  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • dsfsdf5646 2014-01-07 10:51

    You just need to tell windows how to find the php.exe, so you need to add it to the PATH.

    My favoured solution is to create a little .cmd file that I can run from anywhere that temporarily adds the PHP folder to the PATH when I run it from a command window.

    So create a .cmd file lets say called addphp.cmd put it in a folder that is already on your PATH. This is the code.


    Now when you run that command file it will add the folder that contains your PHP.EXE to the path just for the life of the command windows.

    Now CD to whichever folder you want to run a PHP CLI script from eg /apache2/htdocs/reuzze. Run addphp.cmd. Then do

    php composer.phar update

    And it should find the php processor with no problem.

    解决 无用
    打赏 举报

相关推荐 更多相似问题