Introduction to CodeIgniter

1,099 views

Published on

Introduction to CodeIgniter
PHP Framework

Published in: Technology, Lifestyle
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,099
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
46
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Introduction to CodeIgniter

  1. 1. PHP Framework
  2. 2.  Crossable Platform  Free  Fast  Flexible
  3. 3.  Zend Framework  CodeIgniter  Symfony  CakePHP  Yii  Laravel
  4. 4.  Features  Maturity  Communities  Sponsor  Trends
  5. 5.  Features  Maturity  Communities  Sponsor  Trends
  6. 6.  Small footprint & Light weight.  Clear, thorough documentation.  Nearly zero configuration.  Use MVC Framework
  7. 7.  Wiki  https://github.com/EllisLab/CodeIgniter/wiki  Forums  http://ellislab.com/forums  Thailand  http://codeigniter.in.th/
  8. 8. Model ViewController
  9. 9.  http://www.my_server.com/index.php/my_controller/my_frogs Where you’ve installed CI Your main controller file: System/application/controllers/my_controller.php The name of a method in your controller
  10. 10.  Model (models/frogs.php)  function count_frogs() { ▪ $this->db->where(“type”, ”frog”); ▪ $this->db->from(“animals”); ▪ $query = $this->db->get(); ▪ return $query->num_rows();  }
  11. 11.  Controller (controllers/my_controller.php)  function total_frogs () { ▪ $this->load->model(“frogs”); ▪ $number_of_frogs = $this->frogs->count_frogs(); ▪ $data*‘froggies’+ = $number_of_frogs; ▪ $this->load->view(“frog_view”, $data);  }
  12. 12.  View (views/frog_count.php)  <html> ▪ <body> ▪ <h1> You’ve <?=$froggies;?> items in list</h1> ▪ </body>  </html>
  13. 13.  http://www.php.net  http://en.wikipedia.org/wiki/PHP  http://www.phpframeworks.com  http://ellislab.com/codeigniter  http://codeigniter.in.th

×