How to run the command php yii requirements.php?

Why do not you run the command php yii requirements.php. Error:
Error: Unknown command "requirements.php".
Created the file test.php c content:
<?php
echo "Hello";</code-->
<br / > From the console works, there are also all console commands using php yii. The problem is php yii requirements.php. Nobody faced?
July 2nd 19 at 18:13
1 answer
July 2nd 19 at 18:15
It doesn't work like. requirements.php is a file, not a command.
Make a console controller, it action and there is already code
namespace app\commands;

use yii\console\Controller;

class HelloController extends Controller
{
public function actionMyaction()
{
 echo 'hello';
}
}

run this:
php yii hello/myaction
Details: www.yiiframework.com/doc-2.0/guide-tutorial-consol...
File requirements.php made to check server settings for compliance and is working without yii, especially without the console, by the way, the console can be quite other conditions, absent drivers, etc.
Yes, tupanul something. Working just using php. Thank you. - Ferne.DuBuq commented on July 2nd 19 at 18:18

Find more questions by tags Yii