包括(MultiModelForm.php):无法打开流:没有这样的文件或目录
include(MultiModelForm.php): failed to open stream: No such file or directory
<?php
if(!isset($data)) {$data=array(); };
$this->widget('ext.multimodelform.MultiModelForm',array(
'id' => 'id_ssc_affliations', //the unique widget id
'formConfig' => $myFormConfig, //the form configuration array
'model' => $model, //instance of the form model
'tableView'=>true,
'data'=>$data,
'bootstrapLayout'=>true,
'addItemAsButton'=>true,
'jsAfterNewId'=>MultiModelForm::afterNewIdDateTimePicker($myFormConfig['elements']),
//if submitted not empty from the controller,
//the form will be rendered with validation errors
//'validatedItems' => $validatedMembers,
//array of member instances loaded from db
//'data' => $member->findAll('groupid=:groupId', array(':groupId'=>$model->id)),
));
?>
我遇到了这个错误,请帮助我
错误500
包括(MultiModelForm.php):无法打开流:没有这样的文件或目录
添加
Yii::import('ext.multimodelform.MultiModelForm');
在此文件的顶部。
我假设 $this->widget()
也隐式导入了 MultiModelForm
class。
问题是您将 MultiModelForm::afterNewIdDateTimePicker($myFormConfig['elements'])
作为参数传递给它。所以你的应用在调用widget()
函数之前应该提前知道classMultiModelForm
。在顶部添加明确的 import
应该可以解决这个问题。
<?php
if(!isset($data)) {$data=array(); };
$this->widget('ext.multimodelform.MultiModelForm',array(
'id' => 'id_ssc_affliations', //the unique widget id
'formConfig' => $myFormConfig, //the form configuration array
'model' => $model, //instance of the form model
'tableView'=>true,
'data'=>$data,
'bootstrapLayout'=>true,
'addItemAsButton'=>true,
'jsAfterNewId'=>MultiModelForm::afterNewIdDateTimePicker($myFormConfig['elements']),
//if submitted not empty from the controller,
//the form will be rendered with validation errors
//'validatedItems' => $validatedMembers,
//array of member instances loaded from db
//'data' => $member->findAll('groupid=:groupId', array(':groupId'=>$model->id)),
));
?>
我遇到了这个错误,请帮助我
错误500 包括(MultiModelForm.php):无法打开流:没有这样的文件或目录
添加
Yii::import('ext.multimodelform.MultiModelForm');
在此文件的顶部。
我假设 $this->widget()
也隐式导入了 MultiModelForm
class。
问题是您将 MultiModelForm::afterNewIdDateTimePicker($myFormConfig['elements'])
作为参数传递给它。所以你的应用在调用widget()
函数之前应该提前知道classMultiModelForm
。在顶部添加明确的 import
应该可以解决这个问题。