Welcome Guest, Not a member yet? Register   Sign In
The case-sensitivity has me confused -- Probably not a case-sensitive problem, but problem still not resolved
#11

[eluser]geitvdplas[/eluser]
Hi,

I'm developing with easyPHP on windows XP and my remote server is linux.
Both are PHP5> and the server that has the 'glitch' (either mine or codeigniter's), is version 5.1.6.
Both work OK at the moment, so I can continue my work, but only when I autoload the models.

What you suggested worked, but I can ensure you that I only modified the model class to test it and it's in it's original state now.

This code:
Code:
$this->load->model('datafile_model');
$CI =& get_instance();
$CI->datafile_model->test();
$this->datafile_model->test();

Generates:
Code:
datafile_model test function response!
A PHP Error was encountered

Severity: Notice
Message: Undefined property: Tab_create_task::$datafile_model
Filename: tabs/tab_create_task.php
Line Number: 32
Where the test function echo's "datafile_model test function response!".

So you can see, the first one works, the second one doesn't. We are getting closer, I'm sure somebody here can tell me what's what now Smile Much appreciated!

Bye,

Geit
#12

[eluser]WanWizard[/eluser]
What is exactly in this method test(). Because this error message suggests your issues are elsewhere.

All of a sudden a 'tab/tab_create_task.php' pops up, in which you appearantly have a reference back to your datafile_model. What is this file, were is it loaded, how is it loaded. It's clear you expect CI's objects to be assigned to this Tab_create_task object, and this seems to fail on one occasion.
#13

[eluser]geitvdplas[/eluser]
Sorry for being inconsistent, but the problem is throughout my whole application. I load a model inside a controller and the reference just won't work. In the case I posted above, "tabs" is the folder and "tab_create_task" is the controller. In the other one "actions" is the folder and "upload_datafile" is the controller. The function test is simply a function that echo's.

So the model that's not being loaded (sort of) looks a bit like this:

system/application/models/datafile_model.php
Code:
<?php
class Datafile_model extends Model {
    
  function Datafile_model()
  {
    // load model parent
    parent::Model();
  }
  function test()
  {
        echo 'datafile_model test function response!';
  }
}
?>




Theme © iAndrew 2016 - Forum software by © MyBB