Re: Package proposal: HTTP_Status
| From: | Marshall Roch | Date: | Tue, 26 Aug 2003 07:04:28 +0000 |
| Subject: | Re: Package proposal: HTTP_Status | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-20512@lists.php.net to get a copy of this message | ||
Alan Knowles wrote:
I'd suggest someone does a status_codes.ini file and both (all?) packages share it..Sounds feasible, but HTTP_Status provides other methods that are still useful. Also, I wonder if it's more work to parse an ini file than to include a file. I've never worked with ini files like that, so I have no idea.
from the code below it looks like constants are a bit messy for this..Agreed, which is why I used an array. :)
I think your checks look a bit buggy... function isInformational($code) {Whoops! That's what I get for writing it wrong once and copy/pasting... That's fixed, as well as now using those shorthand if statements... -- Marshall Roch// should this be < 200? if ($code >= 100 && $code > 200) { return true; }return false; }