You are here: Re: [PHP] include() « PHP « IT news, forums, messages
Re: [PHP] include()

Posted by Rasmus Lerdorf on 06/13/05 19:07

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация