RE: [PHP] what is the different between request() and include()?

From: Date: Sat, 14 Oct 2000 06:16:42 +0000
Subject: RE: [PHP] what is the different between request() and include()?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-20128@lists.php.net to get a copy of this message
Not a whole lot. The big difference I've seen occurs when you use them with conditional statements. For example: if($myCat == "is black") require("sheds-lots-of-hair.php3"); //this file is always 'used' no matter if $myCat == "is black" is true of false if($myCat == "is white") include("soft-fur.php3"); //this file is only 'used' if $myCat == "is white" is true If you're 'using' files based on conditions, include() them. Otherwise, require() or include() is fine. virtual() is kinda like require() and include() but acts like a server-side-include by the web server. marco -----Original Message----- From: Yorgo Sun [mailto:sunhe@bj.tom.com] Sent: Friday, October 13, 2000 11:07 PM To: php-general@lists.php.net Subject: [PHP] what is the different between request() and include()? see the subject question,thanks Yorgo Sun Project Manager Technology Dept. Tom.com Email:sunhe@bj.tom.com Mobile:13701243390

« previous php.general (#20128) next »