note 87029 deleted from function.include by danbrown
| From: | danbrown@php.net | Date: | Mon, 18 May 2009 00:51:29 +0000 |
| Subject: | note 87029 deleted from function.include by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155442@lists.php.net to get a copy of this message | ||
Note Submitter: w-o-f at gmx dot net
----
@ jimmy dot axenhus at gmail dot com
Your example
<?php
if(include './foo.php' && $bar = "bar") {
echo "FooBar";
}
?>
evaluates as
<?php
if(include ('./foo.php' && $bar = "bar")) {
echo "FooBar";
}
?>
Therefore you have to use
<?php
if((include './foo.php') && $bar = "bar") {
echo "FooBar";
}
?>
(See Example #4 of the documentation)