FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » use GET in include
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: use GET in include [message #174524 is a reply to message #174518] Wed, 15 June 2011 16:02 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 6/15/2011 9:21 AM, Erwin Moller wrote:
> On 6/15/2011 2:01 PM, Denis McMahon wrote:
>
> Hello Dennis,
>
>
>> If his basic requirement is to make variables from including file
>> available in included file, then surely any variable that's set in the
>> including file before the include occurs will be available to the
>> included code?
>
> Absolutely. It can be done. Hence my option 2). ;-)
>
> I think it is just ugly.
> Ugly because the included file depends on variables outside itself.
>
> Compared to using a function or class it is needlessly fragile.
> (At least, I do not see any advantages doing it that way.)
>
>

You are correct, Erwin. Making the code in the included file a function
or a class decouples it from the rest of the logic. This makes the code
more robust, easier to maintain and, if coded correctly, reusable.

Definitely an advantage over just including a file which then depends on
other variables outside of itself.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: An overloading question
Next Topic: ldap_modify
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 07:41:56 GMT 2024

Total time taken to generate the page: 0.04630 seconds