Home >PHP Framework >YII >Yii implementation does not call the layout layout file

Yii implementation does not call the layout layout file

王林
王林Original
2020-02-17 14:40:552055browse

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; //重写这个属性就可以了
//其他方法
}

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!

Statement:
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