如何在 git bash 中使用 yii2 子命令?
How to use yii2 sub-commands with git bash?
我尝试使用 yii2 迁移创建新的 table:
php yii migrate/create create_new_table
当我使用 cmd 时一切正常,但是当我尝试用 git 做同样的事情时 bash:
Error: Unknown command "migrate\create".
P.S。 "php yii migrate" 工作正常。
只需插入您的 php.exe 完整路径,例如:
C:\xampp\php\php.exe yii migrate/create create_new_table
如果您不想写总是完整的 php 路径,请在 windows 环境中设置 php.exe 路径:
refer link
refer link
我尝试使用 yii2 迁移创建新的 table:
php yii migrate/create create_new_table
当我使用 cmd 时一切正常,但是当我尝试用 git 做同样的事情时 bash:
Error: Unknown command "migrate\create".
P.S。 "php yii migrate" 工作正常。
只需插入您的 php.exe 完整路径,例如:
C:\xampp\php\php.exe yii migrate/create create_new_table
如果您不想写总是完整的 php 路径,请在 windows 环境中设置 php.exe 路径:
refer link
refer link