> Actually what you need is <?php echo phpinfo(); ?> otherwise 
> you're never going to get anything on the screen.

Some functions do act this way yes but not phpinfo, phpinfo() spits out
information and has no need for a print or echo.

    function bar()
    {
       Return 'blah';
    }

    function foo()
    {
       print 'blah';
    }

Now, bar() alone will not spit out the information but print bar() will.
People create functions this way for many reasons, one of which is to
allow for :

    $var = bar();

Where $var is now equal the output of bar() which is 'blah'.  Now if one
does just this :

    foo();

It will spit out 'blah' and no echo or print is needed.  But doing :

   print foo();

Will also work but is not at all needed.  

This is sorta how phpinfo works, it just spits out information for us.
Why am I using the word spit?  Not sure :)  Return can be read about here
:

    http://www.php.net/manual/en/functions.returning-values.php

Regarding the semi-colon discussion within this thread, it is not required
to make this work, see :

http://php.net/manual/en/language.basic-syntax.instruction-separation.php

Regards,

Philip

On Fri, 26 Jan 2001, John Guynn wrote:

> Actually what you need is <?php echo phpinfo(); ?> otherwise you're never
> going to get anything on the screen.
> 
> John Guynn
> 
> This email brought to you by RFCs 821 and 1225.
> 
> 
> -----Original Message-----
> From: Robert Collins [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 26, 2001 3:30 PM
> To: kaab kaoutar; [EMAIL PROTECTED]
> Subject: RE: [PHP] phpinfo ?
> 
> 
> looks like you forgot the semi-colon (;) at the end of phpinfo();
> 
> Robert W. Collins
> [snip]
> ----- Original Message -----
> From: "kaab kaoutar" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, January 26, 2001 10:23 AM
> Subject: [PHP] phpinfo ?
> 
> 
> > Hi there!
> >
> > I'm sure it's a stupid problem but the phpinfo does work while trying the
> > following html code:
> >
> > <html><head><title>PHP Test</title></head>
> > <body>
> > <?php phpinfo() ?>
> >
> > </body></html>
> >
> > the result is a blank page!
> [snip]
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to