I am working on some code that reads an Excel
spreadsheet and imports the data into a mysql database. When I run my
script I get the following error message
Fatal error: Uncaught exception 'Exception' with message 'Could
not open BulkUpload_Resource_Template 0.2.xls for reading! File does not
exist.' in
C:\xampp\htdocs\trunk_release_cycle04\application\Classes\PHPExcel\Reader\Excel5.php:519
Stack
trace:
#0
C:\xampp\htdocs\trunk_release_cycle04\application\Classes\PHPExcel\IOFactory.php(268):
PHPExcel_Reader_Excel5->canRead('BulkUpload_Reso...')
#1
C:\xampp\htdocs\trunk_release_cycle04\application\Classes\PHPExcel\IOFactory.php(191):
PHPExcel_IOFactory::createReaderForFile('BulkUpload_Reso...')
#2
C:\xampp\htdocs\trunk_release_cycle04\application\importstatus.php(19):
PHPExcel_IOFactory::load('BulkUpload_Reso...')
#3 {main}
thrown in C:\xampp\htdocs\trunk_release_cycle04\application\Classes\PHPExcel\Reader\Excel5.php on line 519
Solution:
If you written the code like below while processing the file
$filename=$_FILES["fileToUpload"]["name"];
Just replace as
$filename=$_FILES["fileToUpload"]["tmp_name"];
Solution:
If you written the code like below while processing the file
$filename=$_FILES["fileToUpload"]["name"];
Just replace as
$filename=$_FILES["fileToUpload"]["tmp_name"];
0 comments:
Post a Comment