php includes (was Re: [thelist] SSI Brain Fart)

Means, Eric D eric.d.means at boeing.com
Mon May 6 16:49:01 CDT 2002


> From: 	NanHarbisonSmith at aol.com [mailto:NanHarbisonSmith at aol.com]
> Sent:	Monday, May 06, 2002 4:26 PM
> To:	thelist at lists.evolt.org
> Subject:	Re: php includes (was Re: [thelist] SSI Brain Fart)
>
> Doesn't the include have to be in parentheses? (I am not sure, but I
always
> use them in require and include statements.)

No, it doesn't.  AFAIK you only need the parens if the function returns a
value that you want to capture, similarly to ASP/Visual Basic/VBScript.

>  And you should not leave blank lines between the <?PHP and ?>.

Why?  The PHP processor ignores whitespace, just the same as most other
modern compilers/interpreters do.

To the PHP processor,
<?php
include ('http://some-url');
?>

is identical to
<?php
include ('http://some-url');
?>

is identical to
<?php

include ('http://some-url');

?>

is identical to
<?php include ('http://some-url'); ?>

is identical to all of the above sans parentheses.



More information about the thelist mailing list