Re: Re: Passing variables with include()
| From: | Stefan Rusterholz | Date: | Mon, 14 Jan 2002 14:37:55 +0000 |
| Subject: | Re: Re: Passing variables with include() | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-80458@lists.php.net to get a copy of this message | ||
> Scott Houseman wrote:
>
> > Hi Al.
> >
> > While we are on topic, what are the key differences between include() &
> > require() ?
>
>
> "Unlike include(), require() will always read in the target file,
> even if the line it's on never executes. If you want to conditionally
> include a file, use include(). The conditional statement won't affect
> the require(). However, if the line on which the require() occurs is
> not executed, neither will any of the code in the target file be
> executed."
I'm pretty sure that at last for PHP 4.06 or higher this is deprecated. I
don't know why it is still in the manual.
Please correct me if I'm wrong.
best regards
Stefan Rusterholz