Controller目录下创建TestController.php
Copy the code below, yii is the same as tp, with full namespace
render('say', ['message' => $message]); } }
Create a test folder in the view folder and create say.php under the folder
Copy the following code to say.php
php use yii\helpers\Html; ?> = Html::encode($message) ?>
Visit your first page, url/basic/web/index.php?r=test%2Fsay, test is the controller and say is the method
Note, the header file comes with it, we will introduce how to modify it later.