Re: include()

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

 



() 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.
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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