Welcome Guest, Not a member yet? Register   Sign In
can get view to work.
#1

[eluser]fefe[/eluser]
Hello!

Couple of days ago I found searching on the web for an mvc framwork, codeigniter. it seems like it would be for me the perfect tool to learn about php. So I started to an admin panel to the project site and i followed the following instructions http://philsturgeon.co.uk/blog/2009/07/C...odeIgniter. I have been choosing the second approach. I made the folder structures and I made a controller /admin/login. My problem is that the view is not getting called and I'm getting 404 error.

so to test I made the following controller

Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Login extends CI_Controller {



public function index()
{

  $this->load->view('admin/login');
}




}


#2

[eluser]InsiteFX[/eluser]
Did you change your application/config/routes.php file to make your Login controller the default?
#3

[eluser]fefe[/eluser]
I found the problem. It was because I didn't include in my url index.php. so actually I had to point to the view like http://localhost/myproj/index.php/login. Now how can I get right of index.php? I supuose that I have to edit my .htaccess, but I dont't know exactly how.
#4

[eluser]CroNiX[/eluser]
Did you look in the user guide?
#5

[eluser]fefe[/eluser]
sorry I found a post lenght by this. It seems so that the user guides htaccess won't work in some cases.
#6

[eluser]InsiteFX[/eluser]
.htaccess file depend on what server you are running on some work some have to be modified!




Theme © iAndrew 2016 - Forum software by © MyBB