You are here: Re: Functions v includes « PHP Programming Language « IT news, forums, messages
Re: Functions v includes

Posted by Richard on 02/16/07 15:02

"Captain Paralytic" <paul_lautman@yahoo.com> writes:

> On 16 Feb, 13:00, Richard <rgr...@gmail.com> wrote:
>> I am new to php and am looking for some quick "get up and go" help.
>>
>> What would the arguments for and against be for function declarations v
>> simple include?
>>
>> e.g
>>
>> <?php
>> include("myfunc.php"); // declares a function "myfunc".
>> myfunc("hello");
>> ?>
>>
>> and
>>
>> <?php
>> include("myfunc.php"); // just a bunch of php code with no function
>> ?>
>>
>> Does PHP cache the functions? Must functions be included on all pages
>> which use them? The plethora of web resources makes some of this a
>> trifle confusing and difficult/time consuming to pin down, so any best
>> practice pointers much appreciated.
>>
>> Would you keep functions & includes seperate from the main pages? is it
>> then necessary to specify a fully qualified name when including them or
>> should one just set the include_path in a header? Can the include path
>> just be set once for a single session? or in every file which references
>> includes? Can you recommend a web resource which covers this type of stuff?
>
> Think furthr than functions. Create classes with methods then
> instantate objects.
>

Classes haven't even entered the picture yet.

 

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

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