- Joined
- Dec 16, 2011
- Messages
- 2,009
- Reaction score
- 640
Well the title says it all...
What exactly is the difference between:
include();
require();
include_once();
require_once();
Or are they all exactly the same.. It's just I'm coding some little scripts and I want to make sure I'm including pages right! (The pages I am including/requiring are pages like config's, class.core etc..)
ALSO, my other question is; If a page I'm requiring has a require inside it that the page that I am requiring on requires the page..
For example;
My index.php page is requiring class.core.php, which in the class page also includes config.php, which is also required by index.. So will I need to also include/require the config in the index page or will the config load with the class.core so that I don't need to re-require it?
What exactly is the difference between:
include();
require();
include_once();
require_once();
Or are they all exactly the same.. It's just I'm coding some little scripts and I want to make sure I'm including pages right! (The pages I am including/requiring are pages like config's, class.core etc..)
ALSO, my other question is; If a page I'm requiring has a require inside it that the page that I am requiring on requires the page..
For example;
My index.php page is requiring class.core.php, which in the class page also includes config.php, which is also required by index.. So will I need to also include/require the config in the index page or will the config load with the class.core so that I don't need to re-require it?

