/vendor/yiisoft/yii2/web/View.php
原来:
/**
* Marks the beginning of an HTML body section.
*/
public function beginBody()
{
echo self::PH_BODY_BEGIN;
$this->trigger(self::EVENT_BEGIN_BODY);
}
/**
* Marks the ending of an HTML body section.
*/
public function endBody()
{
//$this->trigger(self::EVENT_END_BODY);
echo self::PH_BODY_END;
foreach (array_keys($this->assetBundles) as $bundle) {
$this->registerAssetFiles($bundle);
}
}
改为:
public function beginBody()
{
echo self::PH_BODY_BEGIN;
echo self::PH_BODY_END;
$this->trigger(self::EVENT_BEGIN_BODY);
}
/**
* Marks the ending of an HTML body section.
*/
public function endBody()
{
$this->trigger(self::EVENT_END_BODY);
foreach (array_keys($this->assetBundles) as $bundle) {
$this->registerAssetFiles($bundle);
}
}