note 64466 deleted from function.require by bjori

From: Date: Fri, 14 Apr 2006 22:16:49 +0000
Subject: note 64466 deleted from function.require by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-108117@lists.php.net to get a copy of this message
Note Submitter: amroth at coldshock dot net Reason: bad code ---- Just a note: <?php @require( 'file.php' ) or die(); ?> will not work. Without the @, php will complain about it trying to require '1'. That's because of the () not being actually used by PHP: being the Require statement a language construct the statement will be interpreted as <?php @require ( 'file.php' or die() ); ?> And that's kinda useless, so you would need to use parentheses to force the wanted behavior: <?php ( @require( 'file.php' ) ) or die(); ?> Hope it saves some time to anyone!

« previous php.notes (#108117) next »