简体   繁体   English

./yiic migration命令在yii框架中不起作用?

[英]./yiic migrate command is not working yii framework?

I am trying to run the command ./yiic migrate in /protected folder of but it is not showing any response. 我正在尝试在/protected文件夹中运行./yiic命令,但未显示任何响应。

I have checked all the configuration file including /config/main.php and other files. 我已经检查了所有配置文件,包括/config/main.php和其他文件。 They are correctly configured. 它们已正确配置。

Could any body help me to figure it out why it is happening. 任何人都可以帮助我弄清楚为什么会这样。

You can also use the yiic.php to execute commands, following is how you can use it: 您也可以使用yiic.php执行命令,以下是使用方法:

path/to/php protected/yiic.php migrate

If you use xampp then your php path will /xampp/php/php, so you can use: 如果您使用xampp,那么您的php路径将为/ xampp / php / php,因此您可以使用:

../../php/php protected/yiic.php migrate

It's was most helpfull for me: 对我来说最有帮助:

1.Open your root project directory 1.打开您的根项目目录

2.There should be present framework and {projectName} directories 2.应该有当前的框架和{projectName}目录

3.Use next command: 3,使用下一条命令:

php path/to/project/protected/yiic.php migrate

If you install yii successfully 如果您成功安装yii

For linux use: 对于Linux使用:

php yii migrate

For windows use: 对于Windows使用:

yii migrate

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM