note 28846 deleted from function.include by sniper

From: Date: Wed, 29 Jan 2003 04:27:44 +0000
Subject: note 28846 deleted from function.include by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-43002@lists.php.net to get a copy of this message
The documentation said that "If the target server interprets the target file as PHP code [...] the script is actually being run on the remote server and the result is then being included into the local script." The only way I've found to include the result into the local script is: in the local file: $file = fopen('http://my_remote_file', 'r'); if ($file) { while (!feof ($file)) $lines .= fgets ($file); eval($lines); fclose($file); } and then, if in the remote file I echoed a hash: echo "\$options[\"$option\"] = '$value';"; I can acces this hash in my local file. Perhaps there is a better way to do that, but I've been unable to find it. It seems that the result of a remote file include()'d in a script it's not included in the local script...

« previous php.notes (#43002) next »