Home > PHP Framework > YII > body text

Yii implementation does not call the layout layout file

王林
Release: 2020-02-17 14:40:55
Original
2035 people have browsed it

Yii implementation does not call the layout layout file

yii implementation does not call the layout file, just turn off the layout mode.

Method:

Relevant tutorial recommendations: yii framework

You can set the layout attribute in the Controller to false, as follows:

Example:

SiteController extends Controller{
 public $layout=false; //重写这个属性就可以了
//其他方法
}
Copy after login

If you want to learn more programming-related content, you can follow the Programming Tutorial column on the php Chinese website!

The above is the detailed content of Yii implementation does not call the layout layout file. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
yii
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template