yii2.0框架不加載公共頭部和尾部
// 禁止使用框架默認佈局 public $layout = false;
<?php
namespace frontend\controllers;
use Yii;
use yii\web\Controller;
/**
* Index Controller
*/
class IndexController extends Controller
{
public $defaultAction = 'index';
// 禁止使用框架默認佈局
public $layout = false;
public function actionIndex()
{
return $this->render('index');
}
}