Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Autoload
  • Hello, 
    sorry for my english, i speak a little.

    My question is : 
    What's the difference between the file "/app/bootstrap.php" and the section 'always_load' in config file?


  • HarroHarro
    Accepted Answer
    They serve two different purposes.

    /app/bootstrap initializes the framework, sets the environment the framework has to run in, and allows you to define classes that extend of replace core components.

    always_load in the config allows your application to pre-load config files, language files, classes, etc that your application requires on every page load, to you don't have to load them manually in every controller.

    If your application uses sessions for example, you can always_load the Session class, so sessions are always available in every controller.
  • Thanks Harro, for this explanation.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion