文字

HttpResponse::status

(PECL pecl_http >= 0.12.0)

HttpResponse::statusSend HTTP response status

说明

static bool HttpResponse::status ( int $status )

此函数是该函数的别名: http_send_status() .

用户评论:

[#1] VolodyA! V Anarhist [2014-10-09 09:02:31]

For those with the older versions of PHP you can still set the response code by using the header function. For example:

  //HttpResponse::status(403);
  header("HTTP/1.0 403 Forbidden");

上一篇: 下一篇: