Re: include()

From: Date: Mon, 13 Jun 2005 16:07:42 +0000
Subject: Re: include()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-216894@lists.php.net to get a copy of this message
() is meaningless in an include. But in PHP you can put () around just about anything you want. Just like you can do: $a = ($b); There is no point in the brackets there. The PHP parser simply uses brackets to create precedence groups. So yes, you can do include("foo.php") if you want, but you are just making the parser do extra work for no reason. -Rasmus I. Gray wrote: > Hi > > Just a quickie. > > Is there a big difference between me including a file by putting the url > in the include() such as > include("http://www.examplesite.com/examplefile.php) and > putting the > server path such as > include("number/www.examplesite.com/public_html/examplefile.php") ? > > I want to get into good habits you see. > > I assume I have to use the first example when the file is on a different > server. > > Many thanks. >

« previous php.general (#216894) next »