Re: Output of html without using functions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

You can use your code1.php as

<?php
return rand(1,10000);
?>

and then you can get the value as

$returnedData = require("code1.php");


On 9/14/05, Gustav Wiberg <gustav@xxxxxxxxxxxxxx> wrote:
> 
> Hi there!
> 
> Look at the following code
> 
> 
> code1.php
> 
> <?php
> echo rand(1,10000);
> ?>
> 
> 
> code2.php
> 
> //Here I want to get the output of code1.php without using functions. Is 
> it
> possible?
> //
> //Something like $test = require("http://<domain>/mobil_info.php"); but
> instead of returning 1 at success I want to return the random value...
> 
> Why? Because I want to be platform independent. I'm connecting to a server
> running PHP 4.3.11.
> 
> Ideas? Please give me!
> 
> /G
> http://www.varupiraten.se
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
*** phpgurru.com <http://phpgurru.com> [A php resource provider] ***

\\\|///
\\ - - //
( @ @ ) PHP is too logical for my brain
+---oOOo-(_)-oOOo------------------------------------------+
| Mian Shafiq ur Rehman
| phpgurru.com <http://phpgurru.com> [A php resource provider]
| 107 B, New Town, Multan Road
| Lahore Pakistan
|
| Mobile: 0300 423 9385
|
| ooo0 http://www.phpgurru.com
| ( ) 0ooo E-Mail: rehmanms@xxxxxxxxx
+---\ (----( )------------------------------------------+
\_) ) /
(_/

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux