php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27930 Including remote PHP script, Return DO NOT works.
Submitted: 2004-04-09 07:23 UTC Modified: 2004-04-09 08:50 UTC
From: ricardo dot junior at infosoftonline dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.3.4 OS: Windows
Private report: No CVE-ID: None
 [2004-04-09 07:23 UTC] 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??


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-09 08:50 UTC] derick@php.net
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.

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 07:01:31 2024 UTC