ID: 14164
Updated by: brianlmoon
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 4.0.5
New Comment:

The file that is served remotely is being parsed on that server, not the local one.  
You would have to have the remote server serve .php files as plain text to achieve 
what you want.

Previous Comments:
------------------------------------------------------------------------

[2001-11-21 14:35:43] [EMAIL PROTECTED]

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 this 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]

Reply via email to