2017-06-17 7 views
1

私は問題があります。私はCodeigniterフレームワークを使用します。私はPHPExcelライブラリを統合しました。それはWindows/LinuxとPHP 5.Xの下でうまくいきました。しかし、今はlinux(Ubuntu)とPHP 7.0で試してみました。それは動作しません。どうして?私はphp_zip、php_gd、およびphp_xmlモジュールを有効にしましたが、どちらも動作しません。何か案は?Codeigniter linuxのPHPExcel

私はテストラベルを見ることができない

$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"); 

私のコードIDとてもシンプルなので、私はこの問題は、「負荷」の部分で周りのだと思います。 パスは正しくあり、error.logには何もありません。 PHPExcelクラスをチェックしたところ、ロード関数が見つかりました。問題は、MY_Excelクラスをロードしたいということですが、PHPExcelクラスの一部ではありません。何か案は?

おかげ

答えて

0

//コントローラ

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');