CodeIgniter From Scratch: Day 1
videos

CodeIgniter From Scratch: Day 1

This entry is part 1 of 17 in the CodeIgniter From Scratch Session
Next »

After numerous requests, today we are launching a new screencast series on Nettuts+ that will focus exclusively on the CodeIgniter PHP framework. Over the course of about 10 videos, I’ll teach you exactly how to use this framework. Ultimately, we’ll work our way up to building a custom CMS. Without further ado, here’s day one!

Day 1


Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://twitter.com/maxberndt Mexx

    great tutorial Jeff! I always learn coding with your screencasts!

  • Tim

    Great tutorial Jeff! Also pretty awesome I can get them all off of iTunes (I didn’t know that before) Thanks.

  • paul

    thanks alot.

  • http://brockangelo.com Brock

    Really amazing job – looking forward to the next session.

  • ricochet

    Thanks Jeffery, I just finished ‘PHP Solutions – David Powers’ on your recommendation…a much easier read than Welling/Thomson. I have also been researching the frameworks… & CI looks like a good place to start!

  • pablarribas

    All those complaining about the one who posted first: ENVIOUS!

    LOL

  • amnesia7

    Great screencast.

    I’m hoping as part of the series you’ll mention ways that the CMS can be written securely using the CI framework.

    It would also be good to see uni-form used for the admin area as well although not a big deal if not.

    • Michael

      Totally agree.

      Sure Jeff will cover basic security.

      I’m not sure how much in-depth he’ll go into ‘brute force protection’, ‘sql injections’ or ‘session hijacking’. Hopefully a little.

  • http://www.erepublik.co.uk Nelsaidi

    Awesome awesome awesome, Love you!

  • Michael

    Speechless.

    Every tut so far from Jeff has been insanely good.

    Just perfect timing with #CI.

    Easily the best video tuts I’ve come across. Seems a friendly guy, thorough, interested, great detail. Perfect

    Keep these coming sir!

    Many thanks

  • Free-Burma

    I really want to learn CI. Thanks alot.

  • aryan

    WAITING FOR THE NEXT.

  • http://ronny-andre.no Ronny

    Thanks! I’ve been looking for a tutorial like this! I want all of the videos now!!

  • http://www.warry.fr Warry

    Hi !

    I’m currently learning Ci & Kohana, and this tut’ will be very helpfull ! Many thanks ! It’s very hard to find this kind of complete project tutorials !

    I hope that the publications will coincide with my training !

  • http://www.directo.it Mirko

    Very good start, waitind for next lesson!

  • http://elyezer.com Elyézer Mendes Rezende

    I’m following you in twitter, and saw your preference for codeigniter.

    I have a question: why have you choosen this framework instead others?

    Is there any technical concept?

  • pachito86

    Really clear!! Keep going!

  • Chris

    Jeffrey,

    I have been wanting to learn a PHP framework. I kinda already have a pretty good idea about the basics of programming and php in general and I can look up the gaps in things but I wanted to dive into learning a frame work so I could build dynamic sites and learn more about MVC and why this has become the best way to program at this time.

  • Chris

    ^ Now that’s just really bad grammar but I am so excited. I love it when I learn something and I understand exactly what its doing.

  • V

    Hey Jeff,

    nice tutorial… but what’s that dark theme you were using in textmate? would really like to use it too…

    Thanks

  • Turki

    When does Day2 release ?

    • Turki

      please answer me :-)

  • Gav

    Can’t wait to see the others in the series! :-)

    Touch wood the next full release of CodeIgniter will drop PHP4 support :-)

  • jako

    Hi there!,
    I have been trying to see the video but always starts and then stops and keep loading over and over again,
    Any clue?
    Thanks

  • Free-Burma

    Dear all,
    Where can I watch PHP 5 iwth OOP Video Tutorials ?

    many thanks in advance,

    koko

  • Aqib Mushtaq

    great video, can’t wait for the next one!

  • Ricardo “mAiN_iNfEcTiOn” Machado

    Hi m8s… I totally agree with you… Those “Great Tut” comments are just… desperate(?) and even more, they come from “attention-seekers” :)

    Anyway… I’ve been using Code Igniter for a while and their user guide is just awesome. Their framework (from expression-engine :D ) is very complete. (Can and is always extended a little more with the community).

    I only have one question to make… Why not Kohana (kohanaphp.com) ? It’s full OOP and based on Code Igniter… And it seems to be mantained by it’s own community i guess… Give it a shot

  • jako

    Hi there,
    Im not able to reproduce the video (is loading over and over again). May I download it?, I have a Plus account but I cant get the download link

    Thanks

  • Kenshin

    Very nice tutorial!!!

    I am really interested into Day2… :)

  • Henry Barroso

    Why blogs ?
    It’s so boring that this new frameworks always use the same example of blogs.

    It’s seem a good tutorial, but, why not create something different.

    • Adrian Sinclair

      ya, i’ve never seen a tutorial on how to make a forum

  • http://www.compucraft.net Kris Allen U.

    Nice! can’t wait for the next ones.

  • Chris Brown

    Please, sir, can we have another. I’m chomping at the bit!

  • Jimmi

    Hey, nice series. Now i can finally learn it :P

    Btw, day 2 is out on Itunes.

  • jeanv

    hi, thanks a lot ! What about the DB ? is the .sql file included in the source ?

  • http://www.daveredfern.com Dave Redfern

    Hello, is the next codigniter screencast being made available to the world or premium members only? when is the next coming out either way?

    thanks
    dave.

    • Carl

      The day 2 tutorial is available on iTunes. Just click iTunes store and search for nettuts.

  • Ben R.

    Thanks for the tutorial.

    I’ve been using codeigniter for a little while now, but I’m not always sure that I do things correctly, so I’m really looking forward to watching the whole series.

    I was just wondering, in this series will you be making a function for every page on the site, or will you cover how to do things a little more dynamically(having one function for each type of page and then feeding data into them to output different pages?)

  • http://www.philsbury.co.uk Phil

    From a quick scan of the comments, I don’t think anyone’s mentioned that when loading a model you don’t need to assign it to a variable, it will automatically be available through it’s class name, eg.
    $this->load->model(‘my_model’);
    echo $this->my_model->method();

    you can give the model loaded a different variable using:
    $this->load->model(‘my_model’, ‘my_name’);

    With the second param being your new object name

    if that’s been mentioned, sorry for repeating

    jeff, loveyour tuts, you do them in a way anyone can understand :)

  • http://nathanledet.com Nathan Ledet

    What the dealio????

    The second screencast is on iTunes – but not here… meh… It was out on Tuesday, like Jeff said – he was aiming for Tuesdays, but it hasn’t appeared here.

    oh wells

  • Roj

    Awesome tutorial. Thank you!

  • Aqib Mushtaq

    What? iTunes, what about people like me who are running linux? Got to pull out the windows pc now.

    As long as I can watch it, its all good :)

  • SNaRe

    I already downloaded Day 2 from itunes . I advise you too

  • http://openskymedia.com Jason

    If you’re running a fresh install of WAMP and CI like myself and are already running into problems such as deprecation errors and then a URI issue here’s some help: In index.php in your CI folder replace line 12 “error_reporting(E_ALL);” (without quotes) with this:
    “error_reporting(E_ALL & ~E_DEPRECATED);” (without quotes)

    then, you’ll probably get an error about a bad URI. Here’s the solution for that as well. In URI.php which is located in \system\libraries replaced line 189 “if ( ! preg_match(“|^[".preg_quote($this->config->item('permitted_uri_chars'))."]+$|i”, $str))” (without quotes) to read like this: “if ( ! preg_match(“|^[".str_replace('\\-', '-', preg_quote($this->config->item('permitted_uri_chars')))."]+$|i”, $str))” again without the quotes. This should help you save a couple of hours of frustration.

    • http://bwebi.com barat

      IMO You shouldn’t change anything in framework “core” if You realy don’t have to :)
      For error reporting it’s better to change it in php.ini in Your WAMP :)
      And I think, that the sollution for this URI problem can be solved in some kind of “easy” way like changing something in CI config or htaccess or again something in WAMP config files … but i’m not sure about that, because I’m using Kohana – ask in CI forums if they have had problems with WAMP’n'URI

      • http://openskymedia.com Jason

        the other option is to downgrade from php5 to php4.x

        I haven’t seen any other option other then my first suggestion.

    • FunkyMonkey

      *argh* … I tried your fix, but unfortuntely it dosn’t work for me *sigh*

  • http://pauldewouters.com paul

    cool ! I just downloaded CodeIgniter yesterday, what a coincidence.
    hope it can help me build my ecommerce project

  • Rainman

    Hi All,

    Why I can not see the screencast? I tried firefox, chrome and IE, all failed.
    Did anyone experience that?

  • Gonzalo

    It’s working fine on my end. It takes a while to buffer but that’s probably my crappy connection.

  • http://www.urbanvideos.tv alan

    I watched it for 13 min. it’s that zoom thing that’s drive me crazy!
    I hope you will be more organized on next one :)

  • http://www.urbanvideos.tv alan

    Forget to Thank You for screencast!
    Sorry,there is no edit on comments.

  • mark

    Excellent Tutorial, there really needs to be more real-world examples on using code igniter, as its such a usefull framework.

    Thanks and keep them coming :-)

  • Darren

    Very nice walk-through but I hit a snag part way through and would like to know what I might have done wrong. After you started having us edit the files in the config folder every time I try to open the site I get a database error.
    “Unable to connect to your database server using the provided settings”

    Not too sure what I might have done wrong. I’m using WAMP and a pretty recent release of PHP.

    • Darren

      Never mind I figured out the issue. Aside from a few typos I thought I had setup a root password for myphpadmin when I had not.

  • http://www.interface.net.pk Sadia

    I’m new to frame works. Some things confuse me:-

    what is the advantage of using frame work?
    which frame work is better and why?
    frame work has different coding logic than original php language? should we quit learning php?
    isn’t it additional headache to learn framework?

    • http://www.antonagestam.se/ Anton Agestam

      Frameworks does not have another logic than PHP since their built on PHP. I think what you mean is that they often use object oriented programing (OOP). I think it’s essential to code PHP the procedural way before you go on to OOP since it requires a deeper understanding of logic structure.

      For you it might be overkill to use a framework, but for larger projects where more people are involved or where you think you will edit things like the design and the mark-up frequently it might be a good alternative!

  • evan

    Thanks a bunch, I loved the tutorial.

    My only criticism is I think you should take your time to explain just a little more in depth. But none the less, I love the screen cast, keep it up. :)

  • codedude

    I’m having problems. Whenever I put the codeigniter in the www folder in wamp (running windows vista…) its gives me two errors. Here they are.

    A PHP Error was encountered

    Severity: 8192

    Message: Function set_magic_quotes_runtime() is deprecated

    Filename: codeigniter/CodeIgniter.php

    Line Number: 60

    A PHP Error was encountered

    Severity: 8192

    Message: Assigning the return value of new by reference is deprecated

    Filename: libraries/Loader.php

    Line Number: 255

    I’ve done everything exactly like you said in the screencast. Any thoughts?

    • http://www.antonagestam.se/ Anton Agestam

      Kind of sounds like you’ve got an odd version of PHP installed?

    • FunkyMonkey

      I get the exact same errors… WAMP
      Apache Version : 2.2.11
      PHP Version : 5.3.0
      MySQL Version : 5.1.36

      Getting a bit frustrated here! :)