Query: http_response_code
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
HTTP_RESPONSE_CODE(3) 1 HTTP_RESPONSE_CODE(3) http_response_code - Get or Set the HTTP response codeSYNOPSISint http_response_code ([int $response_code])DESCRIPTIONIf you pass no parameters then http_response_code will get the current status code. If you pass a parameter it will set the response code.PARAMETERSo $response_code - The optional $response_code will set the response code. <?php http_response_code(404); ?>RETURN VALUESThe current response code. By default the return value is int(200).EXAMPLESExample #1 Examples using http_response_code(3) <?php // Get the current default response code var_dump(http_response_code()); // int(200) // Set our response code http_response_code(404); // Get our new response code var_dump(http_response_code()); // int(404) ?> The above example will output:SEE ALSOheader(3), headers_list(3). PHP Documentation Group HTTP_RESPONSE_CODE(3)
Similar Topics in the Unix Linux Community |
---|
Find replace a particular string of data with wildcard |
Split File based on different conditions |
SQL Injection Detection |
New Responsive 404 Page for UNIX.com |
Deciphering AWK code |