Welcome Guest, Not a member yet? Register   Sign In
problem with CI 2.0 autoloading!!!
#7

[eluser]neekey[/eluser]
[quote author="Phil Sturgeon" date="1299795297"]InsiteFX single or double quotes have no difference in this instance and never really do.

neekey: Without wanting to sound like a cliche (or like I am being rude) but I think some more manual reading is in order.

Code:
$this->config->item("setting");

"setting" is the name of the settings file (which you've pointed out is loading fine. The setting.php file should contain:

Code:
$config['foo'] = 'bar';

then you use:

Code:
$this->config->item('foo');

You don't call the file, you've already loaded it. :)

Also, you must have a syntax error in your model. Never put .php on the end, that is not required. turn display_errors = On in your php.ini and see what the error is, but 500 only happens when something goes REALLY wrong.[/quote]

Phil Sturgeon: You are right! i followed what you said, and it worked well, thank you very much, following is where I made it wrong:
my setting.php:
Code:
$config = array("my_config" => "my_config");
as you said, i corrected it:
Code:
$this->config->item("my_config")

and my model m_ajax.php is simply copy from my another project which use ci 1.7
so it still extends parent model in the old way:
Quote:class M_ajax extends Model
and I think that's why I get an 500 error!

thank you!


Messages In This Thread
problem with CI 2.0 autoloading!!! - by El Forum - 03-10-2011, 08:15 AM
problem with CI 2.0 autoloading!!! - by El Forum - 03-10-2011, 08:35 AM
problem with CI 2.0 autoloading!!! - by El Forum - 03-10-2011, 10:14 AM
problem with CI 2.0 autoloading!!! - by El Forum - 03-10-2011, 12:59 PM
problem with CI 2.0 autoloading!!! - by El Forum - 03-10-2011, 02:54 PM
problem with CI 2.0 autoloading!!! - by El Forum - 03-10-2011, 08:08 PM
problem with CI 2.0 autoloading!!! - by El Forum - 03-10-2011, 08:17 PM
problem with CI 2.0 autoloading!!! - by El Forum - 03-10-2011, 11:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB