Table of Contents:
- CODEIGNITER – OVERVIEW………………………………………………………………………. 1
- INSTALLING CODEIGNITER………………………………………………………………………… 3
- APPLICATION ARCHITECTURE……………………………………………………………………. 4
Directory Structure………………………………………………………………………………………. 5
- CODEIGNITER – MVC FRAMEWORK……………………………………………………………. 8
- CODEIGNITER – BASIC CONCEPTS………………………………………………………………. 9
Controllers………………………………………………………………………………………………… 9
Views…………………………………………………………………………………………………….. 11
Models…………………………………………………………………………………………………… 13
Helpers…………………………………………………………………………………………………… 15
Routing…………………………………………………………………………………………………… 16
- CODEIGNITER – CONFIGURATION……………………………………………………………. 19
Configuring Base URL………………………………………………………………………………….. 19
Database Configuration……………………………………………………………………………….. 19
Autoload Configuration……………………………………………………………………………….. 21
- WORKING WITH DATABASE…………………………………………………………………….. 23
Connecting to a Database…………………………………………………………………………….. 23
Inserting a Record……………………………………………………………………………………… 23
Updating a Record……………………………………………………………………………………… 24
Deleting a Record………………………………………………………………………………………. 25
Selecting a Record……………………………………………………………………………………… 26
Closing a Connection…………………………………………………………………………………… 26
Example………………………………………………………………………………………………….. 26
- CODEIGNITER – LIBRARIES………………………………………………………………………. 33
Library Classes………………………………………………………………………………………….. 33
Creating Libraries………………………………………………………………………………………. 34
- ERROR HANDLING………………………………………………………………………………….. 37
- FILE UPLOADING……………………………………………………………………………………. 39
- SENDING EMAIL…………………………………………………………………………………….. 43
- FORM VALIDATION………………………………………………………………………………… 49
- SESSION MANAGEMENT…………………………………………………………………………. 55
- FLASHDATA…………………………………………………………………………………………… 58
- TEMPDATA……………………………………………………………………………………………. 61
- COOKIE MANAGEMENT………………………………………………………………………….. 65
- COMMON FUNCTIONS…………………………………………………………………………… 68
- PAGE CACHING……………………………………………………………………………………… 71
- PAGE REDIRECTION……………………………………………………………………………….. 73
- APPLICATION PROFILING………………………………………………………………………… 75
- BENCHMARKING……………………………………………………………………………………. 77
- ADDING JS AND CSS……………………………………………………………………………….. 80
- INTERNATIONALIZATION………………………………………………………………………… 83
- CODEIGNITER – SECURITY……………………………………………………………………….. 88
XSS Prevention…………………………………………………………………………………………. 88
SQL Injection Prevention……………………………………………………………………………… 88
Hiding PHP Errors………………………………………………………………………………………. 89
CSRF Prevention………………………………………………………………………………………… 90
Password Handling…………………………………………………………………………………….. 90