ID: 14164 Updated by: bate Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 4.0.5 New Comment:
:) but i think he want that his code executed on the remote machine. He want just an :resource_id #xxx to use it local. Btw. due this way its possible to execute external code on a othersite. ?include=myfile.php are a very high security risk. Previous Comments: ------------------------------------------------------------------------ [2001-11-21 16:08:17] [EMAIL PROTECTED] Change your included file extensions from .php to something which the remote server won't parse, so that you're including the *text* of the remote file, not its *output*. ------------------------------------------------------------------------ [2001-11-21 14:45:14] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [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]