Re: Security and methods
| From: | Alain Roger | Date: | Sat, 02 Dec 2006 21:41:27 +0000 |
| Subject: | Re: Security and methods | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-245457@lists.php.net to get a copy of this message | ||
I personally chose the include method...
I was scared also that the dispatch method will only finish by polluting a
single file...
on the other side, i like the idea to have a clear view on each php file, so
include a security.inc file (which has the switch ...case function) was a
logical path for me.
Alain
On 12/2/06, Richard Lynch <ceo@l-i-e.com> wrote:
On Sat, December 2, 2006 9:47 am, Alain Roger wrote: After reading the documentation about security from phpsec.org, i see that 2 "schools" exist (dispatch method or include method). I do not see any huge difference between them. I would like to know what is the most suitable method to centralize security in 1 single file. They both work fine. I found that the logic needed in the "dispatch" method to get what I wanted to happen in a complex web application often ended up "polluting" the single control file, so went for the "include" method. But that was a long time ago when I was much younger... I think it's more important that you understand what your goals are in either method, and push yourself to follow your own guidelines. Choose whichever one strikes your fancy. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?-- Alain ------------------------------------ Windows XP SP2 PostgreSQL 8.1.4 Apache 2.0.58 PHP 5