Welcome Guest, Not a member yet? Register   Sign In
Controller Naming Convention issue

(06-02-2016, 06:51 AM)nkhan Wrote: I have complete a project In CI 3.0.6 , which is works fine in localhost. but when i uploaded it in subdoamin i am getting 

The demo.xyz.com page isn’t working

demo.xyz.com is currently unable to handle this request.


PHP Code:
('BASEPATH') OR exit('No direct script access allowed');

Frontend extends Frontend_Controller {
   public function __construct ()


PHP Code:
class Banner_M extends MY_Model
$_table_name 'banners';
$_order_by 'id desc';
    public function 
get_new ()
$banner = new stdClass();
$banner->title '';
$banner->slug '';
$banner->target_url '';
$banner->banner_img '';

As i am debugging i got a point that is  the banner model ($this->load->model('Banner_m')) loaded in Frontend Controller.


I'd say you need index method or any other method to route request.
Next, your constructor method is not closed by curly bracket.
Third, `Banner_m !== Banner_M`. 
Advice would be to use ucfirst name for files/classes i.e. `Banner_m`.

Messages In This Thread
Controller Naming Convention issue - by nkhan - 06-02-2016, 06:51 AM
RE: Controller Naming Convention issue - by Tpojka - 07-11-2016, 08:22 AM

Theme © iAndrew 2016 - Forum software by © MyBB