Skip to main content

CodeIgniter

Overview

CodeIgniter is a lightweight PHP MVC framework focused on a small footprint, clear documentation, and straightforward deployment on shared hosting. It suits small-to-medium apps where a slimmer stack is preferable to a heavier framework.

Key concepts

  • MVC — Controllers orchestrate; models wrap data; views render HTML.
  • URI routing — Map paths to controller methods.
  • Active Record (CI3) / Query Builder (CI4) — Database abstraction.
  • Helpers & libraries — URL, form, session, email, etc.
  • CI4 modernization — PHP 8+, namespaces, PSR-4 autoloading.

Request flow

Sample: CI4 route + controller (sketch)

// app/Config/Routes.php
$routes->get('api/health', 'Health::index');

// app/Controllers/Health.php
namespace App\Controllers;

use CodeIgniter\RESTful\ResourceController;

class Health extends ResourceController
{
public function index()
{
return $this->respond(['ok' => true]);
}
}

References