【问题标题】:Installing Phinx on Wamp Server在 Wamp 服务器上安装 Phinx
【发布时间】:2015-12-21 17:15:43
【问题描述】:

我想使用 wamp 服务器在我的项目中使用“Phinx”。我可以使用 cmd 进行安装:

按照以下说明操作: http://docs.phinx.org/en/latest/install.html

composer require robmorgan/phinx 

但是当我运行命令时:

php vendor/bin/phinx init

输出是:

然后在我的本地目录中没有安装 phinx.yml 文件

这是第一次在安装包时遇到问题。有什么解决方案/建议吗?

【问题讨论】:

    标签: php windows cmd wamp phinx


    【解决方案1】:

    我通过使用命令解决了这个问题:

    vendor/bin/phinx init
    

    不是:

    php vendor/bin/phinx init
    

    也有同样的问题
    php vendor/bin/phinx create MyFirstMigration 
    

    你需要使用那个命令

    【讨论】:

    • 如何运行 vendor/bin/phinx init。它给我一个错误“'供应商'不被识别为内部或外部命令、可运行程序或批处理文件。”
    • 所以我的问题是因为 Windows 需要像 vendor\bin\phinx init 这样的 Windows 分隔符也没有 php。
    【解决方案2】:

    我遇到了同样的问题。解决者:

      vendor/bin/phinx init 
    

    注意:如果没有前面的 php,还请注意,对于 windows,您需要使用不同的语法:

      vendor\bin\phinx init
    

    【讨论】:

      猜你喜欢
      • 2016-12-09
      • 2014-08-02
      • 1970-01-01
      • 1970-01-01
      • 2013-07-04
      • 1970-01-01
      • 2012-11-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多