I have a project made with the framework Codeigniter which when uploading it to the server and trying to download an Excel file with the help of the PHPExcel library I'm getting the following error:
require_once (application / third_party / PHPExcel / PHPExcel.php): failed to open stream: No such file or directory
In local it works to me in the following way, in the folder libraries :
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
require_once APPPATH."/third_party/PHPExcel/PHPExcel.php";
require_once APPPATH."/third_party/PHPExcel/PHPExcel/IOFactory.php";
class Excel extends PHPExcel {
public function __construct() {
parent::__construct();
}
}
Try now in the following ways:
Manera 1:
require_once "../third_party/PHPExcel/PHPExcel.php";
require_once "../third_party/PHPExcel/PHPExcel/IOFactory.php";
Manera 2:
require_once BASEPATH."third_party/PHPExcel/PHPExcel.php";
require_once BASEPATH."third_party/PHPExcel/PHPExcel/IOFactory.php";
But nevertheless I still mark error, like I already gave permissions 777 to all the folders thinking that it is error per permissions, but it marks me the same error.
The structure of my folders is as follows:
I would appreciate any comments to solve my problem.