note 87029 added to function.include
| From: | w-o-fatgmxdotnet at osu1 dot php dot net | Date: | Sat, 15 Nov 2008 18:53:45 +0000 |
| Subject: | note 87029 added to function.include | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-146582@lists.php.net to get a copy of this message | ||
@ 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)
----
Server IP: 212.124.37.9
Probable Submitter: 85.178.105.123
----
Manual Page -- http://www.php.net/manual/en/function.include.php
Edit -- https://master.php.net/note/edit/87029
Del: integrated -- https://master.php.net/note/delete/87029/integrated
Del: useless -- https://master.php.net/note/delete/87029/useless
Del: bad code -- https://master.php.net/note/delete/87029/bad+code
Del: spam -- https://master.php.net/note/delete/87029/spam
Del: non-english -- https://master.php.net/note/delete/87029/non-english
Del: in docs -- https://master.php.net/note/delete/87029/in+docs
Del: other reasons-- https://master.php.net/note/delete/87029
Reject -- https://master.php.net/note/reject/87029
Search -- https://master.php.net/manage/user-notes.php