2015
01-27
01-27
Yii2.0教程入门篇 —— 测试实例
本章节讨论如何在应用中创建“Hello”页面创建Action在controllers/SiteController.php中:<?phpnamespaceapp\controllers;useyii\web\Controller;classSiteControllerextendsController{//...existingcode...publicfunctionactionSay($message='Hello'){return$this->render('say',['message'=>$message]);}}创建视图在views/site/say.php中:<?phpuseyii\helpers\Html;?><?ph...
继续阅读 >