<?php
/* @var $this yii\web\View */
$this->title = 'My TLC';
?>
<div class="site-index">
<div class="jumbotron">
$this->beginWidget ( 'zii.widgets.CPortlet', [
'title' => '<span class="icon-picture"></span>Incoming Calls',
'titleCssClass' => ''
] );
?>
<div id="members"
style="height: 30%; width: 80%; margin-top: 15px; margin-bottom: 15px;"></div>
<?php
$this->render ( 'in', [
'filtersForm' => $filtersForm,
'exportScenario' => $exportScenario,
'date' => $date,
'model' => $model,
'inDataProvider' => $inDataProvider
] );
$this->endWidget ();
?>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<?php
$this->beginWidget ( 'zii.widgets.CPortlet', [
'title' => '<span class="icon-picture"></span>Out Going Calls',
'titleCssClass' => ''
] );
?>
<div id="members"
style="height: 30%; width: 80%; margin-top: 15px; margin-bottom: 15px;"></div>
<?php
$this->render ( 'out', [
'filtersForm' => $filtersForm,
'exportScenario2' => $exportScenario2,
'date' => $date,
'model' => $model,
'outDataProvider' => $outDataProvider
] );
$this->endWidget ();
?>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<?php
$this->beginWidget ( 'zii.widgets.CPortlet', [
'title' => '<span class="icon-picture"></span>Missed Calls',
'titleCssClass' => ''
] );
?>
<div id="members"
style="height: 30%; width: 80%; margin-top: 15px; margin-bottom: 15px;"></div>
<?php
$this->render ( 'missed', [
'filtersForm' => $filtersForm,
'exportScenario3' => $exportScenario3,
'date' => $date,
'model' => $model,
'missedDataProvider' => $missedDataProvider
] );
$this->endWidget ();
?>
</div>
</div>
将数据从yii1.1迁移到yii 2.所以我决定在yii2中从头开始做所有事情。不幸的是,我一直在收到错误。有人可以帮我解决这个问题吗?
PHP注意 - yii \ base \ ErrorException 未定义的变量:filtersForm
PHP注意 - yii \ base \ ErrorException 未定义的变量:filtersForm
在第21行的/var/www/html/master/views/site/index.php中 12131415161718192021222324252627282930 &#39; titleCssClass&#39; =&GT; &#39;&#39; ]); ?&GT;
渲染(&#39; in&#39;,[ &#39; filtersForm&#39; =&GT; $ filtersForm, &#39; exportScenario&#39; =&GT; $ exportScenario, &#39;日期&#39; =&GT; $日期, &#39;模型&#39; =&GT; $模式, &#39; inDataProvider&#39; =&GT; $ inDataProvider ]); $ this-&gt; endWidget(); ?&GT;位于/var/www/html/master/vendor/yiisoft/yii2/base/View.php第250行-yii \ base \ View :: renderPhpFile()
- 位于/var/www/html/master/vendor/yiisoft/yii2/base/View.php第152行 - yii \ base \ View :: renderFile()
- 在/var/www/html/master/vendor/yiisoft/yii2/base/Controller.php第384行 - yii \ base \ View :: render()
位于第64行的/var/www/html/master/controllers/SiteController.php中的- 醇>
- yii \ base \ Controller :: render() 58596061626364656667686970
- 显示主页。 *
- @return string * / 公共功能actionIndex() { 返回$ this-&gt; render(&#39; index&#39;); }
/ ** *登录操作。 * * @return Response | string
以上是页面上显示的内容