Access http response code?

Discussion about the open-source Phalanger [?] project.

Access http response code?

Postby johnc » September 15th, 2014, 5:21 pm

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.
johnc
 
Posts: 45
Joined: March 24th, 2013, 9:17 pm

Re: Access http response code?

Postby Jakub Misek » September 15th, 2014, 5:59 pm

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,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Access http response code?

Postby johnc » September 15th, 2014, 6:35 pm

Thanks, I'll give it a try =)
johnc
 
Posts: 45
Joined: March 24th, 2013, 9:17 pm

Re: Access http response code?

Postby Jakub Misek » September 15th, 2014, 6:50 pm

https://github.com/DEVSENSE/Phalanger/c ... e485a86159

Will be available within the next release.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Access http response code?

Postby johnc » September 15th, 2014, 9:25 pm

Great, thanks for adding that. I installed the most recent phalanger tools a couple of days ago, loving the experience so far =)
johnc
 
Posts: 45
Joined: March 24th, 2013, 9:17 pm

Re: Access http response code?

Postby Jakub Misek » September 16th, 2014, 1:44 pm

I'm glad you like it.

Please give us know if you would have any more feedback or suggestion.

Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 1 guest

cron

User Control Panel

Login

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 124 on September 25th, 2020, 6:57 am

Users browsing this forum: No registered users and 1 guest