note 41419 added to function.include
| From: | ricardo dot junior at infosoftonline dot com | Date: | Fri, 09 Apr 2004 02:57:39 +0000 |
| Subject: | note 41419 added to function.include | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-67860@lists.php.net to get a copy of this message | ||
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.
----
Manual Page -- http://www.php.net/manual/en/function.include.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41419
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41419&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41419&report=yes
Search -- http://master.php.net/manage/user-notes.php