CodeIgniter 404 Page Not Found, but why?

前端 未结 11 2378
Happy的楠姐
Happy的楠姐 2020-12-11 14:48

I am using CodeIgniter for two applications (a public and an admin app). The important elements of the document structure are:

/admin
/admin/.htaccess
/admin         


        
11条回答
  •  旧巷少年郎
    2020-12-11 15:17

    You could try one of two things or a combination of both.

    1. Be sure that your controller's name starts with a capital letter. eg "Mycontroller.php"
    2. If you have not made any changes to your route, for some strange reason, you might have to include capital letters in your url. e.g if your controller is 'Mycontroller.php' with a function named 'testfunc' inside it, then your url will look like this: "http://www.yourdomain/index.php/Mycontroller/testfunc". Note the capital letter. (I'm assuming you haven't added the htaccess file to remove the 'index.php' part. If you have, just remove it from the url.)

    I hope this helps someone

提交回复
热议问题