Guys, please bear with me as i am a newbie on PHP.
I would like to know how php include works... assuming you have an include statement inside a series of if and switch statements, will all the included php/txt/htmls be loaded on runtime or does the control structure be validated first before the file is included?
thanks.
- miko
PHP Includes
Moderator: General Moderators
- Bill H
- DevNet Resident
- Posts: 1136
- Joined: Sat Jun 01, 2002 10:16 am
- Location: San Diego CA
- Contact:
Re: PHP Includes
The include file will be loaded only if the "if" clause is validated
"this.inc" will always load, "that.inc" will, "not.inc" will not.
Code: Select all
include "this.inc"
if (true)
{
include "that.inc";
}
if (false)
{
include "not.inc";
}