Im пытается включить PHPExcel LIB к Yii, положить PHPExcel.php
в корне расширения, рядом PHPExcel
папку и добавил, что код в config/main.php
Yii включают PHP Excel
// application components
'components'=>array(
'excel'=>array(
'class'=>'application.extensions.PHPExcel',
),
изменить /protected/extensions/PHPExcel/Autoloader.php
public static function Register() {
$functions = spl_autoload_functions();
foreach($functions as $function)
spl_autoload_unregister($function);
$functions=array_merge(array(array('PHPExcel_Autoloader', 'Load')), $functions);
foreach($functions as $function)
$x = spl_autoload_register($function);
return $x;
}// function Register()
Затем, пытаясь создать объект PHPExcel $objPHPExcel = new PHPExcel();
, но с ошибкой: include(PHPExcel.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory
в Z:\home\yii.local\www\framework\YiiBase.php(418)
Попробуйте полный путь ... – Baba