foreach ($this->crumb as $key => $crumb)
{
   if($_GET['app']=='explore' )
          $title = $crumb['name'] . ' - ' . $title;
       echo "this is explore";
       else
              echo "is other";
          $title = $crumb['name']. ' - ' . get_setting('brand_name');
die();
}
 
访问网址空白
 
修改后代码 if判断缺少括号{}:
 
foreach ($this->crumb as $key => $crumb)
{
          if($_GET['app']=='explore' ){
              $title = $crumb['name'] . ' - ' . $title;
              echo "this is explore";
          }
          else{
              echo "is other";
              $title = $crumb['name']. ' - ' . get_setting('brand_name');
          }
}
 
这样显示正常,当访问explore时输出 this is explore
 
你们是否这样。