syida
syida

Reputation: 17

Need help with Code Igniter [did not found page created]

so I hope someone would help me.

My first page is leave_app.php. In this page I put a link to apply leave, using the normal code: <a href="add.php">New Leave Application</a>

However the link didn't display as I had wished for.

"The requested URL /ci/add.php was not found on this server." and the link in the browser leads to this "http://localhost/ci/add.php".

I don't know why the server didn't find the page. I already made add.php page, also add at the leave_app controller the function add().

In the config.php file I put $config['index_page'] = '';

I have asked around but no one can help. I have already surfed around, but still don't know how to solve.

Upvotes: 0

Views: 256

Answers (1)

Gary Green
Gary Green

Reputation: 22395

The beauty of Codeigniter is to rewrite urls in a clean manner, so all things go through index.php and the corresponding controller is loaded

Try accessing it like so:

/ci/index.php/add

Make sure your controller is in application\controllers\add.php and named Class Add

Upvotes: 1

Related Questions