At 13:41 7/3/2001, Derek Sivers wrote:

>>Which is the main difference between include() and
>>require() functions?
>
>
>"include" is optional
>you can put it inside an "IF"
>like this:
>
>if (0)
>   {
>   /* THIS WILL NOT SHOW... */
>   include "optional_file.php";
>   }
>
>
>but "require" happens every time,
>even if it is inside an "IF" that does not happen.
>
>if (0)
>   {
>   /* THIS WILL SHOW ANYWAY... */
>   require "optional_file.php";
>   }


That's actually no longer true, in more recent versions of PHP (it used to 
be true).  The only difference between include() and require() is that 
require() will bail out if it fails, whereas include() would not.

Zeev


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to