|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2007-04-17 20:03 UTC] moron at industrial dot org
  [2007-04-18 06:07 UTC] derick@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Thu Oct 30 18:00:02 2025 UTC | 
Description: ------------ Anything string that comes after concat operator will be concaticated in string param of include_once function. Reproduce code: --------------- <?php print "Including file from lib first<BR>"; echo "result = " . include_once("lib/file.php") . "<BR>"; test1(); function test1() { print "Including file from lib inside function.<BR>"; print "result = " . include_once("lib/file.php") . "<BR>"; } ?> Actual result: -------------- PHP 4 ===== Including file from lib first Warning: main(lib/file.php ): failed to open stream: No such file or directory in /var/www/www.mobiletest.com/htdocs/html/php.samnan/php5_tests/test_include_once.php on line 4 Warning: main(): Failed opening 'lib/file.php<BR>' for inclusion (include_path='.:/usr/local/php/lib/php') in /var/www/www.mobiletest.com/htdocs/html/php.samnan/php5_tests/test_include_once.php on line 4 result = Including file from lib inside function. Warning: test1(lib/file.php ): failed to open stream: No such file or directory in /var/www/www.mobiletest.com/htdocs/html/php.samnan/php5_tests/test_include_once.php on line 10 Warning: test1(): Failed opening 'lib/file.php<BR>' for inclusion (include_path='.:/usr/local/php/lib/php') in /var/www/www.mobiletest.com/htdocs/html/php.samnan/php5_tests/test_include_once.php on line 10 result = PHP 5 ===== Including file from lib first Warning: include_once(lib/file.php<BR>) [function.include-once]: failed to open stream: No such file or directory in /var/webuser/php.samnan/temp/test_include_once.php on line 4 Warning: include_once() [function.include]: Failed opening 'lib/file.php<BR>' for inclusion (include_path='./:/usr/local/php/lib/php') in /var/webuser/php.samnan/temp/test_include_once.php on line 4 result = Including file from lib inside function. Warning: include_once(lib/file.php<BR>) [function.include-once]: failed to open stream: No such file or directory in /var/webuser/php.samnan/temp/test_include_once.php on line 10 Warning: include_once() [function.include]: Failed opening 'lib/file.php<BR>' for inclusion (include_path='./:/usr/local/php/lib/php') in /var/webuser/php.samnan/temp/test_include_once.php on line 10 result =