introduction to codeigniter
DESCRIPTION
Codeigniter slideshow at Chennai GeeksTRANSCRIPT
![Page 1: Introduction to codeigniter](https://reader036.vdocuments.net/reader036/viewer/2022082700/54862e00b4af9f8c628b4a6b/html5/thumbnails/1.jpg)
INTRODUCTION TO CODEIGNITERHarishankaran
Interviewstreet.com
![Page 2: Introduction to codeigniter](https://reader036.vdocuments.net/reader036/viewer/2022082700/54862e00b4af9f8c628b4a6b/html5/thumbnails/2.jpg)
WHY CI?
Small. Fast Simple Cleaner code
![Page 3: Introduction to codeigniter](https://reader036.vdocuments.net/reader036/viewer/2022082700/54862e00b4af9f8c628b4a6b/html5/thumbnails/3.jpg)
MVC
![Page 4: Introduction to codeigniter](https://reader036.vdocuments.net/reader036/viewer/2022082700/54862e00b4af9f8c628b4a6b/html5/thumbnails/4.jpg)
URL STRUCTURE
http://example.com/controller_class/method/data
<?phpclass Search extends CI_Controller {[…]function retrieve($id) {[…]$id2 = $this->uri->segment(3);assert($id = $id2);[…]}
}
![Page 5: Introduction to codeigniter](https://reader036.vdocuments.net/reader036/viewer/2022082700/54862e00b4af9f8c628b4a6b/html5/thumbnails/5.jpg)
CI – FILE STRUCTURE
![Page 6: Introduction to codeigniter](https://reader036.vdocuments.net/reader036/viewer/2022082700/54862e00b4af9f8c628b4a6b/html5/thumbnails/6.jpg)
CI – MODELS
<?phpclass User_Model extends CI_Model {[…]function getAllActiveUsers($id) {[…]$this->db->from(‘users’);$this->db->where(‘active’, ‘true’);return $this->db->get()->result();}
} CRUD operations on database.
![Page 7: Introduction to codeigniter](https://reader036.vdocuments.net/reader036/viewer/2022082700/54862e00b4af9f8c628b4a6b/html5/thumbnails/7.jpg)
CI - VIEWS
<body><h1>Welcome to CodeIgniter!</h1><p>The page you are looking at is being generated dynamically by CodeIgniter.</p>
</body>
HTML content, output to browser.
![Page 8: Introduction to codeigniter](https://reader036.vdocuments.net/reader036/viewer/2022082700/54862e00b4af9f8c628b4a6b/html5/thumbnails/8.jpg)
CI - CONTROLLERS
class Welcome extends CI_Controller {
function index(){$this->load->view('welcome_message');}
} Business Logic, Validations
![Page 9: Introduction to codeigniter](https://reader036.vdocuments.net/reader036/viewer/2022082700/54862e00b4af9f8c628b4a6b/html5/thumbnails/9.jpg)
CI – TWITTER LIBRARY
Fetch public timeline<?php$this->load->library('twitter');$this->twitter->call('get', 'users/show', array('screen_name' => ‘interviewstreet'));
?>
Search
$this->twitter->search(array('q' => ‘helloworld'));
![Page 10: Introduction to codeigniter](https://reader036.vdocuments.net/reader036/viewer/2022082700/54862e00b4af9f8c628b4a6b/html5/thumbnails/10.jpg)
CI – ASKIMET LIBRARY
$this->load->library('akismet');$comment = array('comment_author' => ‘Harishankaran','comment_author_email' => ‘[email protected]',
'comment_content' => 'So, can you check if this comment is a spam.'
);
$status = $this->akismet->check($comment);
![Page 11: Introduction to codeigniter](https://reader036.vdocuments.net/reader036/viewer/2022082700/54862e00b4af9f8c628b4a6b/html5/thumbnails/11.jpg)
AND LOTS MORE…
Calendar Shopping cart Email Encryption File Upload Image Manipulation Pagination XML-RPC
and many many more 3rd party libraries
![Page 12: Introduction to codeigniter](https://reader036.vdocuments.net/reader036/viewer/2022082700/54862e00b4af9f8c628b4a6b/html5/thumbnails/12.jpg)
TALK IS CHEAP. SHOW ME THE
CODE