1. 安装 通过 composer 安装: composer require lulubin/hello-yii2 2. 使用 <?php use lulubin\hello\Hello; echo Hello::sayHello();