note 41419 rejected from function.include by betz

From: Date: Fri, 09 Apr 2004 08:32:39 +0000
Subject: note 41419 rejected from function.include by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-67865@lists.php.net to get a copy of this message
Note Submitter: ricardo.junior@infosoftonline.com ---- I don't know if this is the wanted situation... But if you include a remote php scrit that has a RETURN statment, the value is not return ! See the example below: simples.php 's code: <? $val = "simples"; return $val; ?> ----------------------------------------------- main_1.php 's code: <? $resultado = include ("./simples.php"); print_r($resultado); ?> ----------------------------------------------- main_2.php 's code: <? $resultado = include ("http://localhost/simples.php"); print_r($resultado); ?> ----------------------------------------------- Running main_1.php (http://localhost/main_1.php) I got the following output: simples Running main_2.php (http://localhost/main_2.php) I got the following output: 1 What could be done to return the result of a remote script execution?? Cheers, Ricardo Jr.

« previous php.notes (#67865) next »