function uploadimg(){
$client=new Client();
$url='http://www.example.com/photo';
$response = $client->request('POST',$url,[
'multipart' => [
[
'name' => 'photo',
'contents' => fopen('/Users/pptlook/wangwei/visitorySystem/public/picture/QQ20181213-163055.png', 'r')
],
],
]);
$data = $response->getBody();
echo $data;
}
Laravel Guzzle post file
最新推荐文章于 2024-04-30 15:36:41 发布