Absolute beginner question - CI installation and reference |
[eluser]Unknown[/eluser]
Hi, I'm just learning CI and I'm trying to figure out why I can't get something very basic to work. - I uploaded my unzipped CI folder structure to my web server. - I get the welcome screen so I know it is working to some extent - I want to create a new controller and access it via the URL http://mysite.com/index.php/newcontroller/ - My 'newcontroller' controller looks like this: Code: <?php I upload this, but when I try and access http://mysite.com/index.php/newcontroller/ I get a 404 page not found error. I'm sure this is a simple thing, but I'm hoping someone can just give me some direction. Thanks.
[eluser]natefons[/eluser]
make sure the php file is called "newcontroller" and not any deviation of "NewController, newController" etc etc.
[eluser]InsiteFX[/eluser]
Also make sure you set the default controller in application/config/routes.php InsiteFX
[eluser]cahva[/eluser]
Also the constructor should start also with uppercase: Code: function Newcontroller() If you're on PHP5 server(and you should be), you might aswell use PHP5 style construcror: Code: function __construct() |
Welcome Guest, Not a member yet? Register Sign In |