Bug #15438 Updated: include_once fails when comparing output to a value
| From: | derick@php.net | Date: | Fri, 08 Feb 2002 15:51:59 +0000 |
| Subject: | Bug #15438 Updated: include_once fails when comparing output to a value | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-79742@lists.php.net to get a copy of this message | ||
ID: 15438
Updated by: derick@php.net
Reported By: michael@gamepoint.net
-Status: Bogus
+Status: Open
-Bug Type: Filesystem function related
+Bug Type: Scripting Engine problem
Operating System: FreeBSD
PHP Version: 4.1.1
New Comment:
Actually you can check if an include failed or not like this, but I
think the parser gets confused if you use the '== false'.
Making this a scripting engine problem.
Derick
Previous Comments:
------------------------------------------------------------------------
[2002-02-08 09:48:32] sander@php.net
RTM! You can't include_once check for succes on include/include_once.
include(_once) is not a function.
------------------------------------------------------------------------
[2002-02-07 17:21:40] michael@gamepoint.net
When trying to check if include_once succeeded i came up the following
bug (i believe):
if( include_once("test1.php") == false ) {
print "Failed to include file";
}
Warning: Failed opening '' for inclusion
(include_path='.:/usr/local/lib/php') in /usr/home/michael/www/bug.php
on line 6
Removing '== false' removes the problem.
My configuration is:
FreeBSD 4.5
Apache 1.3.22
PHP 4.1.1
Configure options: './configure' '--with-mysql' '--with-apxs'
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15438&edit=1