Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #2194
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: use GET in include |
| Date | 2011-06-15 12:02 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <ital2b$12v$1@dont-email.me> (permalink) |
| References | <57655471-4b66-45db-abcf-e9194758655c@22g2000prx.googlegroups.com> <4df8676c$0$49180$e4fe514c@news.xs4all.nl> <4df89f17$0$8527$bed64819@gradwell.net> <4df8b1b6$0$49184$e4fe514c@news.xs4all.nl> |
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@attglobal.net ==================
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
use GET in include cerr <ron.eggler@gmail.com> - 2011-06-14 21:09 -0700
Re: use GET in include Erwin Moller <Since_humans_read_this_I_am_spammed_too_much@spamyourself.com> - 2011-06-15 10:04 +0200
Re: use GET in include Denis McMahon <denis.m.f.mcmahon@gmail.com> - 2011-06-15 12:01 +0000
Re: use GET in include Erwin Moller <Since_humans_read_this_I_am_spammed_too_much@spamyourself.com> - 2011-06-15 15:21 +0200
Re: use GET in include Jerry Stuckle <jstucklex@attglobal.net> - 2011-06-15 12:02 -0400
Re: use GET in include cerr <ron.eggler@gmail.com> - 2011-06-15 21:58 -0700
Re: use GET in include Jerry Stuckle <jstucklex@attglobal.net> - 2011-06-16 07:14 -0400
csiph-web