note 28846 added to function.include

From: Date: Sat, 25 Jan 2003 19:26:12 +0000
Subject: note 28846 added to function.include
Groups: php.notes 
Request: Send a blank email to php-notes+get-42740@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... -- http://www.php.net/manual/en/function.include.php http://master.php.net/manage/user-notes.php?action=edit+28846 http://master.php.net/manage/user-notes.php?action=delete+28846 http://master.php.net/manage/user-notes.php?action=reject+28846

« previous php.notes (#42740) next »