#27930 [Opn->Bgs]: Including remote PHP script, Return DO NOT works.

From: Date: Fri, 09 Apr 2004 12:50:32 +0000
Subject: #27930 [Opn->Bgs]: Including remote PHP script, Return DO NOT works.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-57852@lists.php.net to get a copy of this message
ID: 27930 Updated by: derick@php.net Reported By: ricardo dot junior at infosoftonline dot com -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Windows PHP Version: 4.3.4 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. . Previous Comments: ------------------------------------------------------------------------ [2004-04-09 07:23:49] ricardo dot junior at infosoftonline dot com Description: ------------ I don't know if this is the wanted situation... But if you include a remote php script that has a RETURN statment, the value is not return from remote script. Reproduce code: --------------- 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); ?> ----------------------------------------------- Expected result: ---------------- Running main_1.php (http://localhost/main_1.php) I got the following output: simples Actual result: -------------- Running main_2.php (http://localhost/main_2.php) I got the following output instead of "simples": 1 What could be done to return the result of a remote script execution?? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27930&edit=1

« previous php.bugs (#57852) next »