mirror of
https://github.com/w7corp/easywechat.git
synced 2025-02-02 10:44:24 +00:00
Created 图片上传 (markdown)
parent
7b0096e429
commit
ba2d423060
17
图片上传.md
Normal file
17
图片上传.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
用 POI 接口新建门店时所使用的图片 url 必须为微信自己域名的 url,因此需要先用上传图片接 口上传图片并获取 url,再创建门店。上传的图片限制文件大小限制 1MB,支持 JPG 格式。
|
||||||
|
|
||||||
|
## 上传图片
|
||||||
|
|
||||||
|
```php
|
||||||
|
$url = $wechat->image->upload($path);
|
||||||
|
```
|
||||||
|
|
||||||
|
- `$path` 为需要上传的图片路径
|
||||||
|
|
||||||
|
example:
|
||||||
|
|
||||||
|
```php
|
||||||
|
$url = $wechat->image->upload(__DIR__ . '/demo.jpg'); // https://wx.qq.com/......jpg
|
||||||
|
```
|
||||||
|
|
||||||
|
关于门店的使用请参考:[门店管理](门店管理)
|
Loading…
Reference in New Issue
Block a user