From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.0.5 PHP Bug Type: Scripting Engine problem Bug description: variables set in remotely include()d file are lost upon return
When using http to include() or require() a file, the variables set within are lost when returning to the calling file. Behavior is instead as expected when included or required file is local. Example: <?php echo phpversion(); echo "<br>try include<br>\n"; $test1 = "foo"; echo "test1 = $test1"; echo "<br>now including change of test1<br>"; include("http://192.168.100.3/includechild.php"); echo "<br>outside: test1 = $test1"; echo "<br>result: $result"; echo "<br>now try require<br>\n"; $test2 = "foo"; echo "test2 = $test2"; echo "<br>now requiring change of test2<br>"; require("http://192.168.100.3/requirechild.php"); echo "<br>outside: test2 = $test2"; ?> includechild.php: (and similar to requirechild.php) ----------------- <?php $test1 = "bar"; echo "Inside: test1 = $test1"; ?> Results: ----------- 4.0.5 try include test1 = foo now including change of test1 Inside: test1 = bar outside: test1 = foo now try require test2 = foo now requiring change of test2 Inside: test2 = bar outside: test2 = foo -- Edit bug report at: http://bugs.php.net/?id=14164&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]