Yii2./yii command:no such file or directory

Source: Internet
Author: User

git clone down the YII2 background project due to the need to execute the./yii migrate command. After execution, prompt

No such file or directory

I copied it from the same code as YII2 Basic's./yii file, and after running the same error, my current solution is:

Copy the code from the./yii file into a file named yii.php

<?PHP/** * yii Console bootstrap file. * * @link http://www.yiiframework.com/* @copyright Copyright (c) yii software LL C * @license http://www.yiiframework.com/license/*/defined(' Yii_debug ') orDefine(' Yii_debug ',true);require(__dir__. '/vendor/autoload.php ');require(__dir__. '/vendor/yiisoft/yii2/yii.php ');$config=require(__dir__. '/config/console.php ');$application=NewYii\console\application ($config);$exitCode=$application-run ();Exit($exitCode);
View Code

Then execute PHP yii.php, after trying, although some trouble, but achieved and./yii the same effect, attach a running effect, such as:

Yii2./yii command:no such file or directory

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.