PHPExcel ZipArchive not found

后端 未结 6 1320
鱼传尺愫
鱼传尺愫 2020-12-05 11:20

I\'ve just downloaded PHPExcel package and I tried to import an Excel spreadsheet, but all I get is an error ZipArchive not found. I work on Windows, but server

6条回答
  •  离开以前
    2020-12-05 12:04

    In my case I have PHP 5.4
    Upon using PHPExcel, I encountered this exception.

    FatalErrorException in Excel2007.php line 94: Class 'ZipArchive' not found
    

    Solved it by appending this line on PHPExcel/Reader/Excel2007.php

    PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP);
    

    before invoking the getZipClass method.

    $zipClass = PHPExcel_Settings::getZipClass();
    

提交回复
热议问题