Re: [PHP] Class not functioning (RESOLVED)

2009-12-18 Thread Allen McCabe
I looked into registries (singleton registries), and while I can see the advantage they provide, most every article I read advised AGAINST using singleton registries because it creates extra dependencies (ie. a file needs the database class AND the registry class instead of just the database class)

Re: [PHP] Logic of conditionals and the ( ) operators

2009-12-18 Thread Jonathan Tapicer
Hi, Yes, what Ashley said is correct. Also, if you want to avoid writing $perm several times in the if, or if you have a lot of permissions you can do: if (in_array($perm, array(11, 22))) And you can put in that array all the permissions you need to. Regards, Jonathan On Fri, Dec 18, 2009 at

Re: [PHP] Logic of conditionals and the ( ) operators (RESOLVED)

2009-12-18 Thread Allen McCabe
Thank you Ashley, it makes perfect sense. I don't know why I didn't just set up some tests like Shiplu suggested! I've rewritten all my code BACK to the correct way. (I thought it looked cooler, oh well). On Fri, Dec 18, 2009 at 10:47 AM, Ashley Sheridan wrote: > On Fri, 2009-12-18 at 10:21 -0

Re: [PHP] Logic of conditionals and the ( ) operators

2009-12-18 Thread Ashley Sheridan
On Fri, 2009-12-18 at 10:21 -0800, Allen McCabe wrote: > In a nutshell: > > Will this work? > > if ($perm == (11 || 12)) > > > Explanation: > > I am laying the groundwork for a photo viewing system with a private and > public mode, and additionally if an admin is logged in, there is an > addi

[PHP] Logic of conditionals and the ( ) operators

2009-12-18 Thread Allen McCabe
In a nutshell: Will this work? if ($perm == (11 || 12)) Explanation: I am laying the groundwork for a photo viewing system with a private and public mode, and additionally if an admin is logged in, there is an additional level of permission. I came up with a number system to make it easier (an

Re: [PHP] PHP to answer HEAD requests

2009-12-18 Thread Richard Quadling
2009/12/18 Dan Field : > Is it possible to use PHP to answer HEAD http requests? Is it as simple as > doing something like: > > header('blah') > exit; > > I'd expect PHP to produce a full page rather than just a header though. > > -- > Dan Field                   Ffôn/Tel. +44 1970 632 582 > Peiri

[PHP] PHP to answer HEAD requests

2009-12-18 Thread Dan Field
Is it possible to use PHP to answer HEAD http requests? Is it as simple as doing something like: header('blah') exit; I'd expect PHP to produce a full page rather than just a header though. -- Dan FieldFfôn/Tel. +44 1970 632 582 Peiriannydd Meddalwedd

Re: [PHP] Open source project management tool - PHP

2009-12-18 Thread Gaurav Kumar
OK one more the list http://dotproject.net/ Its a nice one with all project management features. Easy to use. Just checkout the website. Gaurav Kumar blog.oswebstudio.com On Fri, Dec 18, 2009 at 12:16 AM, Robert Cummings wrote: > Angelo Zanetti wrote: > >> Hi guys >> I would like to know what o