Welcome Guest, Not a member yet? Register   Sign In
Core not autoloading
#2

[eluser]Pascal Kriete[/eluser]
Quote:Is there a file with an autoload function that I need to require in my bootstrap

Since CI is PHP 4 compatible, it doesn't provide an __autoload function. You are, of course, welcome to add your own though.

Quote:If I explicitly require Controller I would then need to do the same for all base classes used in Controller
Even if you require all other files, you will soon run into trouble. A lot of PHP scripts work backwards by including all dependencies needed for a file. CI on the other hand, works it's way up from index.php until it eventually instantiates the controller. If you're curious how it works take a look at system/codeigniter/codeigniter.php, where all major bootstrapping is done.

The easiest way to do ajax calls is to handle them directly in a regular controller. It depends on what loader.php does though.

Let me know if that clears things up at all.


Messages In This Thread
Core not autoloading - by El Forum - 05-26-2009, 04:07 PM
Core not autoloading - by El Forum - 05-26-2009, 05:05 PM
Core not autoloading - by El Forum - 05-26-2009, 05:27 PM
Core not autoloading - by El Forum - 05-26-2009, 06:41 PM
Core not autoloading - by El Forum - 05-27-2009, 03:50 PM
Core not autoloading - by El Forum - 05-27-2009, 04:04 PM
Core not autoloading - by El Forum - 05-28-2009, 10:28 PM
Core not autoloading - by El Forum - 05-28-2009, 11:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB