How to use http_response_code() function to get or set the HTTP response in PHP

2 Answers

0 votes
var_dump(http_response_code()); 

   
/*
run: 

int(200) 

*/

 



answered May 11, 2016 by avibootz
0 votes
http_response_code(404);
var_dump(http_response_code());

   
/*
run: 

int(404) 

*/

 



answered May 11, 2016 by avibootz

Related questions

3 answers 277 views
1 answer 205 views
...