Re: case ?
| From: | Brian Clark | Date: | Thu, 11 Jan 2001 04:30:17 +0000 |
| Subject: | Re: case ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33891@lists.php.net to get a copy of this message | ||
Hello Jon,
(JR == "Jon Rosenberg") php@columbusinteractive.com writes:
JR> I know this is kinda silly. but, if I have the following, will the
JR> file only be included when the case is matched or does require
JR> always bring in the file regarless?
That is *supposed* to be the way it works. That is *supposed* to be one
of the differences of require() and include(). You'd use include(),
for example, within a conditional.
I can only speak for PHP 3.0.18, but yes. require() includes it
regardless. include() only includes it if 'blah' is met.
JR> case blah:
JR> require('include.php');
JR> do something....
JR> break;
-Brian
--
Everything should be built top-down, except the first time.