Php 狂饮不起作用
我正在使用此代码,但它没有返回任何内容,请帮助Php 狂饮不起作用,php,html,wiki,guzzle,Php,Html,Wiki,Guzzle,我正在使用此代码,但它没有返回任何内容,请帮助 use GuzzleHttp\Client; $response = $client->request('GET', $this->baseUrl . '/profiles/' . $options['steamid'] . '/inventory/json/' . $options['appid'] . '/' . $options['contextid'] ); 要么你的问题中缺少很多代码,要么你的代码中缺少很多必要的语法 无论哪
use GuzzleHttp\Client;
$response = $client->request('GET', $this->baseUrl . '/profiles/' . $options['steamid'] . '/inventory/json/' . $options['appid'] . '/' . $options['contextid'] );
要么你的问题中缺少很多代码,要么你的代码中缺少很多必要的语法 无论哪种方式,它都应该是这样的:
use GuzzleHttp\Client;properly.
class DoSomething
{
$client = new Client; // <---- instantiate the object
$response = $client->request('GET', $this->baseUrl . '/profiles/' . $options['steamid'] . '/inventory/json/' . $options['appid'] . '/' . $options['contextid'] );
}
但在这种特殊情况下你不能这么做
资源:
问题中要么缺少大量代码,要么代码中缺少大量必要的语法 无论哪种方式,它都应该是这样的:
use GuzzleHttp\Client;properly.
class DoSomething
{
$client = new Client; // <---- instantiate the object
$response = $client->request('GET', $this->baseUrl . '/profiles/' . $options['steamid'] . '/inventory/json/' . $options['appid'] . '/' . $options['contextid'] );
}
但在这种特殊情况下你不能这么做
资源:
您想从客户端类调用函数???/您想从客户端类调用函数???/关闭主题:关键字
使用
可用于自动加载关闭主题:关键字使用
可用于自动加载