Page 1 of 1
Access http response code?
Posted:
September 15th, 2014, 5:21 pm
by johnc
Since Phalanger isn't php5.4 compat yet I was wondering if anybody knew how to read the http status code set by previous calls to the header function.
Basically I need a phalanger version of the php function "http_response_code" which was introduced in php5.4.
Thanks.
Re: Access http response code?
Posted:
September 15th, 2014, 5:59 pm
by Jakub Misek
Hi,
http_response_code() is simple function and can be added into the next update. Otherwise, in Phalanger, you can add reference to System.Web.dll and read \System\Web\HttpContext::$Current->Response->StatusCode
Thanks,
Re: Access http response code?
Posted:
September 15th, 2014, 6:35 pm
by johnc
Thanks, I'll give it a try =)
Re: Access http response code?
Posted:
September 15th, 2014, 6:50 pm
by Jakub Misek
Re: Access http response code?
Posted:
September 15th, 2014, 9:25 pm
by johnc
Great, thanks for adding that. I installed the most recent phalanger tools a couple of days ago, loving the experience so far =)
Re: Access http response code?
Posted:
September 16th, 2014, 1:44 pm
by Jakub Misek
I'm glad you like it.
Please give us know if you would have any more feedback or suggestion.
Thanks,