close
<?php
// Get the current response code and set a new one
var_dump(http_response_code(404));
// Get the new response code
var_dump(http_response_code());
?>
The above example will output:
int(200)
int(404)
<?php
// Get the current default response code
var_dump(http_response_code());
// Set a response code
var_dump(http_response_code(201));
// Get the new response code
var_dump(http_response_code());
?>
The above example will output:
bool(false)
bool(true)
int(201)
全站熱搜
留言列表