Home> php教程> php手册> body text

Yii2.0 study notes: the first page Saying Hello

WBOY
Release: 2016-11-16 10:24:06
Original
1169 people have browsed it
Controller目录下创建TestController.php
Copy after login

Copy the code below, yii is the same as tp, with full namespace

render('say', ['message' => $message]); } }
Copy after login

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; ?> 
Copy after login

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.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!