This is a discussion on include_once() - always included? within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi All, Always looking for efficiency, consider the following code: <?php function one($arg){ if ($arg == 1){ include_once(...); do ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi All,
Always looking for efficiency, consider the following code: <?php function one($arg){ if ($arg == 1){ include_once(...); do some stuff... }else{ do some stuff... } } ?> If the above function is called with an argument value of '2', is the 'include_once' file included? Regards, Aaron |
|
|||
|
On Fri, 15 Oct 2004 17:58:33 -0500, "Aaron DeLoach" <aaron@deloachcorp.com>
wrote: >Always looking for efficiency, consider the following code: > ><?php >function one($arg){ > if ($arg == 1){ > include_once(...); > do some stuff... > }else{ > do some stuff... > } >} >?> > >If the above function is called with an argument value of '2', is the >'include_once' file included? No. (What happened when you tried it?) -- Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk> <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool |
|
|||
|
ehrm no... please tell me this is a joke :P
Aaron DeLoach wrote: > Hi All, > > Always looking for efficiency, consider the following code: > > <?php > function one($arg){ > if ($arg == 1){ > include_once(...); > do some stuff... > }else{ > do some stuff... > } > } > ?> > > If the above function is called with an argument value of '2', is the > 'include_once' file included? > > Regards, > Aaron > > > > |