• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
try help me with this error

i have try 2 follow login form tutorial..but i've got this error

Fatal error: Class 'Base_Model' not found in C:\wamp\www\try\system\application\models\Users_model.php on line 3

and this is the code i'm using in model

this is user_model file

<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Users_model extends Base_Model
function Users_model()

this is base_model file

class Base_model extends Model //required by all models
var $table, $resultset, $select;

function Base_model($table = NULL)
$this->table = $table;
$this->resultset = array();
$this->select = '*';

log_message('debug', "Base_model initialised as {$this->table}");

can i get some idea y i got this bug..really appreciate...thanks..

[eluser]louis w[/eluser]
Is Base_model in another file? If so, you need to include it before you declare your Users_model class in Users_model.php

I am just guessing at your file structure, but this might work.

base_model & users_model in the same model folder. i've try but still got error

[eluser]louis w[/eluser]
Is the require statement before you declare the class? Did I have the file name right?

You are extending Base_Model, but the defined class name is Base_model

[eluser]louis w[/eluser]
[quote author="welzie" date="1207951982"]You are extending Base_Model, but the defined class name is Base_model[/quote]

Good catch.

Are there any PHP editors which will bring an error like that to the users attention?

I use PDT and it doesn't do that or I don't know how to make it do that.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.