Urgent help! Codeigniter cannot call PHPExcel. I am a beginner in Codeigniter. I used the file upload class to upload csv or excel files. at the same time, I used PHPExcel to read the content and load it into the database. My program is as follows: controllers/products. php file: & nbsp urgent help! Codeigniter cannot call PHPExcel
I am a beginner in Codeigniter. I used my file Upload class to upload csv or excel files. at the same time, I used PHPExcel to read the content and load it into the database. My program is as follows:
Controllers/products. php file:
Foreach ($ phpexcel_csv_arr_table as $ row_csv_value ){
$ Final [] = array_combine ($ keys, $ value );
Foreach ($ final as $ csv_pr ){
If ($ this-> products_model-> getProductByCode ($ csv_pr ['code']) {
$ This-> session-> set_flashdata ('message', $ this-> lang-> line ("check_product_code "). "(". $ csv_pr ['code']. "). ". $ this-> lang-> line ("code_already_exist "));
Redirect ("module = products & view = upload_csv", 'refresh ');
}
}
}
Under libraries/, there are Excel_Read_Operat.php files and Excel folders. the folders are PHPExcel. php and PHPExcel. The Excel_Read_Operat.php class is as follows:
If (! Defined ('basepath') exit ('no direct script access allowed ');
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.