CodeIgniter Forums
CodeIgniter_2.1.0 for a complete novice! - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: CodeIgniter_2.1.0 for a complete novice! (/showthread.php?tid=49238)



CodeIgniter_2.1.0 for a complete novice! - El Forum - 02-12-2012

[eluser]Unknown[/eluser]
hey

I have got a background in programming but I wouldn't say I'm at a professional level by any standard! I've been working with wordpress and I can modify it to meet my needs, but I still feel I dont have complete control over it.

I was introduced to CI by a friend(who is not using CI, but is looking into it) and I watched the tutorials on this website and was completely blown away with the basic capabilities, so I downloaded it and set it up on wamp. I later set it up on my server (linux).

I have a nack for getting excited about learning something new or trying out new technologies and hitting a dead-end right away with the very basics, but once i get over those hurdles I can pick up the slack.

Basically, the tutorials that are on CI.com dont match up with 2.1.0. It is something simple like the new directory layout, and the fact that the default screen is welcome.php. What ever the case may be, following the tutorials are not really possible because of this.

I dont really know where to start with using it. I tried just going along with the tuts but no joy, 403 errors. I created index.php, changed the default controller to index.php, then tried the blog post and I'm now getting a white screen(some progress?). Even hello world wont load!

Does anyone know of a tutorial for 2.1.0 that goes litterally step by step through achieving even just hello world?

I'm confident its not the server setup, it has to be a step I'm missing out on.

Any input would be greatly appreciated!

Regards

myself!


CodeIgniter_2.1.0 for a complete novice! - El Forum - 02-13-2012

[eluser]Unknown[/eluser]
Just found my problem and I have egg on my face. Never mind!!

Controller = CI_Controller these days Big Grin


CodeIgniter_2.1.0 for a complete novice! - El Forum - 02-14-2012

[eluser]marcogmonteiro[/eluser]
same thing goes for model Model = CI_Model Smile


CodeIgniter_2.1.0 for a complete novice! - El Forum - 02-14-2012

[eluser]CodeIgniteMe[/eluser]
The constructors are now in PHP5-style.

Note the double underscore(__).

Code:
public class My_Controller extends Controller{
public function My_Controller ()
{
parent::controller();
}
}
is now
Code:
public class My_Controller extends CI_Controller{
public function __construct()
{
parent::__construct();
}
}

Same with the Models.


CodeIgniter_2.1.0 for a complete novice! - El Forum - 02-14-2012

[eluser]InsiteFX[/eluser]
You do not need to include a constructor unless you are setting values!



CodeIgniter_2.1.0 for a complete novice! - El Forum - 02-15-2012

[eluser]toopay[/eluser]
[quote author="InsiteFX" date="1329282054"]You do not need to include a constructor unless you are setting values!
[/quote]...or loading some class/library which not autoloaded, you use across method(s) within your controller.