December 2013
Intermediate to advanced
306 pages
6h 26m
English
Although you're probably going to be writing and reading data in a database you will certainly come in contact with the requirement to write something to the disk, and read from files stored on it. CodeIgniter can support several methods for interacting with files.
There are no configuration options to change here, but ensure that you load the file helper in your controller constructor (and also the url helper):
function __construct() {
parent::__construct();
$this->load->helper('url');
$this->load->helper('file');
} We're going to read files from the disk and display details about them to a view. Firstly, we're going to create two files:
/path/to/codeigniter/application/controllers/file.php ...Read now
Unlock full access