CodeIgniter For Project : Lesson 104 - Controller & View

50 %
50 %
Information about CodeIgniter For Project : Lesson 104 - Controller & View

Published on January 22, 2016

Author: AzerdarTKusumoto

Source: slideshare.net

1. CodeIgniter For ProjectLesson 104 : Controller & View Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

2. Controller Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com “The Controller serves as an intermediary between the Model, the View, and any other resources needed to process the HTTP request and generate a web page”

3. Caution : Security! To Create files associated with CodeIgniter must add code to check BASEPATH. Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

4. Controller • Controller file store in /application/controllers • Controller Name matched Filename. • First character in Controller Name is upper case only. • You CodeIgniter Controller must always extends CI_Controller class. • You CodeIgniter Controller must always override method index() and __construct Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

5. Controller Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

6. Controller Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

7. Controller Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

8. Controller Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

9. Controller Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

10. Controller Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

11. Controller Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

12. Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com View “The View is the information that is being presented to a user. A View will normally be a web page, but in CodeIgniter, a view can also be a page fragment like a header or footer. It can also be an RSS page, or any other type of page”

13. Caution : Security! To Create files associated with CodeIgniter must add code to check BASEPATH. Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

14. • View file store in /application/views • View file none character case rule. • View file can store in sub-folder /application/view/ template1 etc. • View content store in filetype .php file. View Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

15. View Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

16. You can use this code in Controller section to use view file Map Controller to use View Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

17. Example : Map TestController in index function to use textview.php view file. Map Controller to use View Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

18. You can send variable or data from Controller to View Map Controller to use View Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

19. Example : Map TestController in index function to use textview.php view file 
 and send 2 variable name “fname” and “lname” from controller to view. Map Controller to use View Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

20. Forward to Workshop 003 Weerayut Hongsa : Network Engineer / Software Developer Major Kantana Broadcasting Co., Ltd https://kusumotolab.com

Add a comment

Related pages

CodeIgniter Web Framework

CodeIgniter Rocks. CodeIgniter is a ... View the Forums. ... and is now a project of the British Columbia Institute of Technology ...
Read more

CodeIgniter / EllisLab

CodeIgniter flew in the face of ponderously large and thoroughly undocumented frameworks, ... (JavaScript must be enabled to view this email address)
Read more

Welcome to CodeIgniter : CodeIgniter User Guide

Welcome to CodeIgniter. ... Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch, ...
Read more

GitHub - chriskacerguis/codeigniter-restserver: A fully ...

... one config file and one controller. codeigniter ... Working with RESTful Services in CodeIgniter; Contributions. This project was originally ...
Read more

CodeIgniter - Wikipedia, the free encyclopedia

While controller classes are a necessary part of development under CodeIgniter, models and views are optional. [2] ... Project Zero; Quercus; Zend Engine;
Read more

A Simple Codeigniter Template Library | Codeigniter Simplicity

Codeigniter Simplicity is a Codeigniter Template ... ├──views ... that the project has inside. There is a Controller with name ...
Read more

PHP IDE for PHP Frameworks - NuSphere

PHP frameworks support in NuSphere PhpED brings the advantage of Model View Controller paradigm ... PHP IDE for PHP Frameworks: ... We cover Project ...
Read more

CodeIgniter 3 Authentication - Community Auth

... it’s pretty easy to modify the controllers, models, and views to work with ... View the Community Auth For CodeIgniter 3 ... Community Auth is ...
Read more

CodeIgniter Forums

Project announcements & questions. ... Loading View with Posting... by RobertSF: ... Third party addins for use with CodeIgniter. Share what you have done :)
Read more