Re: include and require

From: Date: Thu, 27 May 2004 18:22:02 +0000
Subject: Re: include and require
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-187074@lists.php.net to get a copy of this message
> Can anyone help me with this one: > Is there a difference between "include()" and "require()" ? http://php.net/require http://php.net/include require() and include() are identical in every way except how they handle failure. include() produces a Warning while require() results in a Fatal Error. In other words, don't hesitate to use require() if you want a missing file to halt processing of the page. include() does not behave this way, the script will continue regardless. Be sure to have an appropriate include_path setting as well. --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html

« previous php.general (#187074) next »