RE: [PHP] Require() vs Include()

From: Date: Tue, 14 Nov 2000 04:33:33 +0000
Subject: RE: [PHP] Require() vs Include()
Groups: php.general 
Request: Send a blank email to php-general+get-25117@lists.php.net to get a copy of this message
Well, with include() if an included file does not exists it WILL fail. so where's the difference? -----Original Message----- From: Lawrence.Sheed@dfait-maeci.gc.ca [mailto:Lawrence.Sheed@dfait-maeci.gc.ca] Sent: Tuesday, November 14, 2000 1:26 PM To: Maxim Maletsky Subject: RE: [PHP] Require() vs Include() include won't fail out if the includes not there, but require will. If you have something that *has* to be in there, then require is used, if something could be optional - eg a generated header or something than might be or might not be there at a given time, use include. -----Original Message----- From: Maxim Maletsky [mailto:maxim.maletsky@japaninc.net] Sent: November 14, 2000 12:21 PM To: 'PHP General List. (E-mail)' Subject: [PHP] Require() vs Include() Hi, A tiny question: why to use require() when include() works just as well and even better when there are some conditions like if{} ? I ask it because although I read many articles on this issue I found no reason for myself to use require() instead of include() and I have driven some huge projects in PHP. Why do I see these hardcore PHP gurus writing PHPLIB, mySQLadmin and examples in their articles using require() where include() would fit just as perfect? WHERE THE TRIIIICK? It escapes from me ... Thanks. Maxim Maletsky - maxim@j-door.com <mailto:maxim@j-door.com> Webmaster, J-Door.com / J@pan Inc. LINC Media, Inc. TEL: 03-3499-2175 x 1271 FAX: 03-3499-3109 http://www.j-door.com <http://www.j-door.com/> http://www.japaninc.net <http://www.japaninc.net/> http://www.lincmedia.co.jp <http://www.lincmedia.co.jp/>

« previous php.general (#25117) next »