Yii2控制台命令不工作linux(基本应用程序)

I was trying to add Chiliec/yii2-vote widget to my project. However when I tried to run the migration nothing happens so I tried other commands and they also do nothing Commands in console literally do nothing

Any help/suggestions would be appreciated.

[kyle@kyle-pc blog]$ ./yii help
./yii: line 3: ?php: No such file or directory
./yii: line 4: /bin: Is a directory
./yii: line 5: assets: command not found
./yii: line 6: assets: command not found
./yii: line 7: assets: command not found
./yii: line 8: syntax error near unexpected token `('
./yii: line 8: ` * @copyright Copyright (c) 2008 Yii Software LLC'

I think that's something wrong with your php cli config because even the yii help doesn't have any output.

If you run this command, does return something?

php -r "echo 'Hello, world.';"

You can try enabling the error messages in your CLI config.ini you can try other tips from here