PHPOffice / PHPExcel

ARCHIVED
Other
11.46k stars 4.19k forks source link

Fatal error: Call to undefined method PHPExcel_Reader_Excel2007::securityScan() #1318

Open D09r opened 7 years ago

D09r commented 7 years ago

I'm using PHPExcel library, while uploading a xlsx file getting the below error.

Fatal error: Call to undefined method PHPExcel_Reader_Excel2007::securityScan() in /Applications/XAMPP/xamppfiles/htdocs/qms/Classes/PHPExcel/Reader/Excel2007.php on line 80

if (!empty($_FILES['file']['name'])) { $pathinfo = pathinfo($_FILES['file']['name']); if (($pathinfo['extension'] == 'xlsx' || $pathinfo['extension'] == 'xls') && $_FILES['file']['size'] > 0 ) { $inputFileName = $_FILES['file']['tmp_name']; $objPHPExcel = PHPExcel_IOFactory::load($inputFileName); } else { echo "Invalid file!"; exit(); } } else { echo "Invalid file!"; exit(); }