Welcome Guest, Not a member yet? Register   Sign In
Unable to locate the model you have specified..
#1

[eluser]awpti[/eluser]
Pertinent info:

system/application/models/Otndb.php
Code:
class Otndb extends Model {
/*
    function Otndb() {
        parent::Model();
    }

    function get_latest($limit) {
        $this->db->select('*');
        $this->db->join('otn_news_categories', 'otn_news_categories.category_id = otn_news.post_category_id');
        $this->db->join('otn_news_images', 'otn_news_images.image_id = otn_news.post_image_id');
        $this->db->join('otn_users', 'otn_users.user_id = otn_news.post_by_id');
        $this->db->orderby('otn_news.news_id', 'DESC');
        $this->db->limit($limit);
        
        $news = $this->db->get('otn_news');
        return $news->result();
    }
*/
}

system/application/controllers/Otn_front.php
Code:
<?php

/**
* @author awpti
* @copyright 2007
* @modified 11/27/2007, 2:03PM by awpti
*/

class Otn_front extends Controller {

    function Otn_front() {
        // Not necessary, but good practice anyway.
        parent::Controller();

        //Setup the view parts.
        $this->view->part('tpl_top',            'template/tpl-top.php');
        $this->view->part('tpl_menu',            'template/tpl-menu.php');
        $this->view->part('tpl_content_start',    'template/tpl-content-start.php');
        $this->view->part('tpl_content_end',    'template/tpl-content-end.php');
        $this->view->part('tpl_right_content',    'template/tpl-right-content.php');
        $this->view->part('tpl_bottom',            'common/tpl-bottom.php');

        $this->load->model('Otndb', 'otndb', TRUE);

        // This output cache will be put into place once the site is live
        // --AND-- getting significant enough traffic to affect performance.
        //$this->output->cache(30);
    }

    function index() {
        //$this->view->set('otn_right_stats', $this->otndb->getStats());
        //$this->view->set('otn_front_content', $this->otndb->get_latest(6));
        $this->view->load('common/otn_front');
    }

}

?>

Result:

Unable to locate the model you have specified: otndb

I'm at a complete loss. Works fine on my other site (awpti.org)

Any ideas?
#2

[eluser]wiredesignz[/eluser]
all filenames need to be lowercase.

system/application/models/otndb.php
#3

[eluser]awpti[/eluser]
Bad habit for me to type the names in uppercase.

That was it. Thanks Smile

/sigh @ me
#4

[eluser]Joe L[/eluser]
If you are using Dreamweaver, sometimes you see you file name in lowercase, but it really is not. rename it and rename it back to lowercase. That's what happened to me and I lost precious time just to find out that.
#5

[eluser]Unknown[/eluser]
thank you bro, my problem is now solved..

now i used lowercase name for my application models name

regards

den
#6

[eluser]Unknown[/eluser]
windows server dont have trouble about la filename of our models, but when you migrate to unix server you should change all you filename to lowercase.
#7

[eluser]InsiteFX[/eluser]
If you use FileZilla you can tell it to change all uppercase names to lowercase on upload!

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB