It basically just has libraries built in to the system, which makes it easier for you to code. It's easy to configure, set up, and usually has a very well written documentation for each function.
CodeIgniter uses an MVC system which is Model View Controller.
An example would be:
View: (messages_view.php)
Code:
<html>
<body>
<h1><?php echo $messageCount; ?> Unread Messages</h1>
</body>
</html> Controller: (messages.php)
Code:
function total_messages() {
$this->load->model("messages");
$number_of_messages = $this->messages->count_messages();
$data['messageCount'] = $number_of_messages;
$this->load->view("messages_view", $data);
} Model: (messages.php)
Code:
function count_messages() {
$this->db->where("read", "0");
$this->db->from("messages");
$query = $this->db->get();
return $query->num_rows();
} So it makes it really easy and organized. All of the template files go in the Views folder. The controller interacts with the Model, calling functions and telling which views to display. The Model has all the PHP functions.
Bookmarks