Welcome Guest, Not a member yet? Register   Sign In
Problems with altervista
#1

I have installed my website on Altervista but gives me problems with loading 'models'.
I don't know what is the problem. Can someone help me?

[Image: Immagine.jpg]
Reply
#2

$this->load->model('home_model');
Reply
#3

This is my code:


Code:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Welcome extends CI_Controller {

function index()
   {
       $this->load->model('home_model');

       $data['n'] = $this->home_model->Novita();
       $data['v'] = $this->home_model->Venduti();
       $this->load->view('primaview');
       $this->load->view('menu');
       $this->load->view('home', $data);
       $this->load->view('footer');
   }
}
?>

Also the folder "membri" that appears in the path is not part of my site but I think it's part of altervista



Code:
Message: Unable to locate the model you have specified: Home_model

Filename: /membri/****/system/core/Loader.php
Reply
#4

(This post was last modified: 09-16-2015, 06:27 AM by ivantcholakov.)

Debug the method CI_Loader::model directly on the production site and try to see what path is really built about loading the model. Use temporary code, something like: var_dump($path); exit;
Reply
#5

Make sure the model's class and filename both start with an uppercase letter: "Home_model". You can use all lowercase when calling the loader and when referencing it via $this->home_model, but the loader is going to look for Home_model.php with a class named Home_model, and some filesystems (like those used in Windows) are case-insensitive, but the filesystems on most servers are not.

If that's not the problem, make sure your APPPATH is set correctly, since APPPATH . 'models/' is where it's most likely to be looking for your model.
Reply
#6

My APPPATH is set to  
PHP Code:
/membri/***/application
but I don't know why there is always the folder calls "membri".
Reply




Theme © iAndrew 2016 - Forum software by © MyBB