Issue
Well I have a strange problem in my Codeigniter page. I have a controller class books.php
> <?php
> //echo 'Hello';
> class Books extends CI_Controller{
> function __construct() {
> parent::__construct();
> }
>
>
> function main()
> {
> $this->load->view('main_view');
> }
>
> function input()
> {
> $this->load->view('input_view');
> } } ?>
Now if I point my browser to http://localhost/CodeIgniter/index.php/books
it shows 404 Page not found.
Now If I add a echo 'Hello';
just above the class declaration, it shows hello and at the top of the page and after that line the same 404 error.Is this due to permission roblem. books.php
have 777
permission.
Solution
> <?php
> //echo 'Hello';
> class Books extends CI_Controller{
> function __construct() {
> parent::__construct();
> }
>
>
> function index()
> {
> $this->load->view('main_view');
> }
>
> function input()
> {
> $this->load->view('input_view');
> } } ?>
Answered By - danish hashmi
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.