Your SlideShare is downloading. ×
Code Igniter 2
Code Igniter 2
Code Igniter 2
Code Igniter 2
Code Igniter 2
Code Igniter 2
Code Igniter 2
Code Igniter 2
Code Igniter 2
Code Igniter 2
Code Igniter 2
Code Igniter 2
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Code Igniter 2

1,313

Published on

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

  • Be the first to like this

No Downloads
Views
Total Views
1,313
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Nitin Reddy Katkam
  • 2. IntroductionCodeIgniter: Helps builds PHP applications based on the MVC structure Contains system and application folders; application folder contains models, views, and controllers folders
  • 3. Configuration“application/config/database.php” “application/config/autoload.php”Set: $db[default][hostname] = localhost; $db[default][username] = username; $db[default][password] = password; $db[default][database] = dbname;
  • 4. Controllers“application/controllers”Controllers: The default controller is welcome (defined in routes) The default action is index() Extend CI_Controller
  • 5. Controllers (Contd)http://localhost/ci/index.php/product<?phpclass Product extends CI_Controller { public function index() { echo Product index; }}
  • 6. Controllers (Contd) Call echo() to display data Put your data into an array Call $this->load->view() to display a view Load C.I. functions:  Alternative to autoload  $this->load->helper()  $this->load->library()
  • 7. Views“application/views”Views: Data from the array sent from the controller is extracted
  • 8. URL Helper anchor(„controller/action‟, „text‟, array(„att ribute‟=>‟value‟)) redirect(„controller/action‟)
  • 9. Form Helper form_open(„controller/action‟) form_label(„text‟, „for attrib value‟) form_input(„name‟) form_password(„name‟) form_textarea(„name‟) form_submit(„name‟, „text‟) form_dropdown(„name‟, name- value_pair_array, „selected‟) form_close()
  • 10. Models“application/models”Models: Extend CI_Model Generally uses the database library extensively
  • 11. Database Library Generally called from a model class as $this->db->function_name Functions:  get(table_name, limit, offset)  insert(table_name, model)  insert_id()  where(column_name, value)  update(table_name, model)  delete(table_name)  count_all(table_name)
  • 12. For more, reach me at... WWW: nitinkatkam.com Blog: n4express.com Email: k_nitin_r [at] yahoo.co.in

×