2017-07-05 14:35:05 2512次浏览 1条回答 0 悬赏 10 金钱

main.php里面是这样写的

<?php
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use frontend\assets\AppAsset;
use common\widgets\Alert;
AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8"> 
</head>
<body>
  <?php $this->beginBody() ?>
  <?=$content?>
  <?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>

然后页面正常 但尾部有一个微信截图_20170705143202.png

我是把main.php里的<?php $this->endPage() ?>给去掉就好了 或者去掉<?php $this->endBody() ?>

想问下 为啥会有这个404 应该怎么去掉?

最佳答案

  • koko 发布于 2017-07-05 14:42 举报

    查看源码,看你在底部加载了什么东东。
    这是你加载的东西报的404

    那个<?php $this->endPage() ?>只是标注底部数据加载的位置,相当于一个占位符。

    3 条回复
    回复于 2017-07-05 15:34 回复

    看源码,是出在<?php $this->endBody() ?>里面。。 看着好吃力

    回复于 2017-07-05 15:46 回复

    肯定是这里呢,是要你找出来,加载的哪个东西报404,然后才能处理,不是么。

    回复于 2017-07-05 15:48 回复

    找到了,开启伪静态以后没放.htaccess文件。。。

    没有找到数据。
您需要登录后才可以回答。登录 | 立即注册
fdzaxd
副董事长

fdzaxd

注册时间:2016-06-22
最后登录:2020-06-18
在线时长:36小时47分
  • 粉丝5
  • 金钱21065
  • 威望0
  • 积分21425

热门问题