linux下的Codeigniter-PHPExcel
我有个问题。我使用Codeigniter框架。我集成了PHPExcel库。它在windows/linux和PHP5.X下运行良好。但现在我在linux(Ubuntu)和PHP7.0下尝试了它。它不起作用。为什么?我启用了php_-zip、php_-gd和php_-xml模块,但它也不起作用?有什么想法吗 我的代码很简单linux下的Codeigniter-PHPExcel,linux,ubuntu,phpexcel,php-7,Linux,Ubuntu,Phpexcel,Php 7,我有个问题。我使用Codeigniter框架。我集成了PHPExcel库。它在windows/linux和PHP5.X下运行良好。但现在我在linux(Ubuntu)和PHP7.0下尝试了它。它不起作用。为什么?我启用了php_-zip、php_-gd和php_-xml模块,但它也不起作用?有什么想法吗 我的代码很简单 $this->load->library("excel"); $this->excel->load("/mba/input.xls"); echo"tes
$this->load->library("excel");
$this->excel->load("/mba/input.xls");
echo"test";
$this->excel->setActiveSheetIndex(0);
$this->excel->getActiveSheet()->SetCellValue('B2', "whatever");
$this->excel->save("/path/to/output.xls");
我看不到测试标签,所以我认为问题出在“加载”部分。
路径正确,error.log中没有任何内容。当我检查PHPExcel类时,我找到了load函数。我发现,问题是它想加载MY_Excel类,但它不是PHPExcel类的一部分。有什么想法吗
谢谢//控制器
require_once APPPATH . '/third_party/Phpexcel/Bootstrap.php';
// Create new Spreadsheet object
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
//Change to excel2007 excel5
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, '**Excel5**');
$writer->save('php://output');
//控制器
require_once APPPATH . '/third_party/Phpexcel/Bootstrap.php';
// Create new Spreadsheet object
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
//Change to excel2007 excel5
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, '**Excel5**');
$writer->save('php://output');