Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/261.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何从Zend Framework中的每个请求中获取http响应/服务器代码?_Php_Zend Framework_Zend Http Client - Fatal编程技术网

Php 如何从Zend Framework中的每个请求中获取http响应/服务器代码?

Php 如何从Zend Framework中的每个请求中获取http响应/服务器代码?,php,zend-framework,zend-http-client,Php,Zend Framework,Zend Http Client,使用Zend Framework Http客户端,如何从每个请求中获取Http响应/服务器代码?我的身体很好,但响应代码也很好。找到了答案: $response->getStatus(); 找到了答案: $response->getStatus(); 找到答案:$response->getStatus();您应该将其添加为答案,并将其标记为acceptedFound the answer:$response->getStatus();你应该把它作为一个答案,并把它标记为accep

使用Zend Framework Http客户端,如何从每个请求中获取Http响应/服务器代码?我的身体很好,但响应代码也很好。

找到了答案:

$response->getStatus();
找到了答案:

$response->getStatus();

找到答案:$response->getStatus();您应该将其添加为答案,并将其标记为acceptedFound the answer:$response->getStatus();你应该把它作为一个答案,并把它标记为acceptedor
$response->getCode()
来获得像(int)404这样的东西,对吗?或者
$response->getCode()
来获得像(int)404这样的东西,对吗?