RE: [PHP] phpinfo ?

From: Date: Fri, 26 Jan 2001 23:04:49 +0000
Subject: RE: [PHP] phpinfo ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-36912@lists.php.net to get a copy of this message
> 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:rcollins@Insight.com] > Sent: Friday, January 26, 2001 3:30 PM > To: kaab kaoutar; php-general@lists.php.net > 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" <kaab_k@hotmail.com> > To: <php-general@lists.php.net> > 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#36912) next »