#43552 [Fbk->Csd]: Cannot find variables defined in files included

From: Date: Wed, 12 Dec 2007 05:57:07 +0000
Subject: #43552 [Fbk->Csd]: Cannot find variables defined in files included
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-120586@lists.php.net to get a copy of this message
ID: 43552 User updated by: tariq at prime-service dot com Reported By: tariq at prime-service dot com -Status: Feedback +Status: Closed Bug Type: *General Issues Operating System: Windows Server 2003 PHP Version: 5.2.5 New Comment: Sorry I bothered you for this little problem. short_open_tag directive in php.ini was off Previous Comments: ------------------------------------------------------------------------ [2007-12-11 10:57:22] jani@php.net Is short_open_tag php.ini directive on or off? (note: I can't reproduce this) ------------------------------------------------------------------------ [2007-12-10 11:44:39] tariq at prime-service dot com Description: ------------ variables defined in files included are not being populated. However if we print something in included file it displays on the screen. But variables and their values are not passed to the file calling the included file. Reproduce code: --------------- Test1.php <? $A = 10; $B = 15; ?> Test2.php <?php require('Test1.php'); echo $A; ?> it would result into variable undefined warning. Expected result: ---------------- 10 in output Actual result: -------------- Warning! variable not defined ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43552&edit=1

« previous php.bugs (#120586) next »