yii 显示在给定位置找不到错误文件
yii shows error file not found at given location
我正在尝试在 yii 中使用 eexcelview 扩展导出 excel 文件
我有以下代码
public function behaviors(){
return array(
'eexcelview'=>array(
'class'=>'extensions.eexcelview.EExcelBehavior'
),
);
}
还有一个
public function actionTest()
{
// Load data
$model = Customer::model()->findAll();
// Export it
$this->toExcel($model, array(
'custid',
'custname'
),
'Test File',
array(
'creator' => 'Zen',
),
'Excel2007' // This is the default value, so you can omit it. You can export to CSV, PDF or HTML too
);
}
}
excel 扩展文档
我在 extensions/eexcelview/EExcelBehavior.php 位置
有 eecxcelview 文件夹和 EExcelBehavior 文件
但是我在执行代码时出现以下错误
别名 "extensions.eexcelview.EExcelBehavior" 无效。确保它指向一个现有的 PHP 文件并且该文件是可读的。
请帮助我,因为我是 yii 的新手,我正在使用 yii 1.0。
尝试将扩展文件夹引用为 "ext"。请尝试以下操作:
'eexcelview'=>array(
'class'=>'ext.eexcelview.EExcelBehavior'
),
我正在尝试在 yii 中使用 eexcelview 扩展导出 excel 文件 我有以下代码
public function behaviors(){
return array(
'eexcelview'=>array(
'class'=>'extensions.eexcelview.EExcelBehavior'
),
);
}
还有一个
public function actionTest()
{
// Load data
$model = Customer::model()->findAll();
// Export it
$this->toExcel($model, array(
'custid',
'custname'
),
'Test File',
array(
'creator' => 'Zen',
),
'Excel2007' // This is the default value, so you can omit it. You can export to CSV, PDF or HTML too
);
}
}
excel 扩展文档
我在 extensions/eexcelview/EExcelBehavior.php 位置
有 eecxcelview 文件夹和 EExcelBehavior 文件但是我在执行代码时出现以下错误
别名 "extensions.eexcelview.EExcelBehavior" 无效。确保它指向一个现有的 PHP 文件并且该文件是可读的。
请帮助我,因为我是 yii 的新手,我正在使用 yii 1.0。
尝试将扩展文件夹引用为 "ext"。请尝试以下操作:
'eexcelview'=>array(
'class'=>'ext.eexcelview.EExcelBehavior'
),