简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM