时间:2021-07-01 10:21:17 帮助过:46人阅读
$path = "D:/wamp/www/weixin/images/A5Le5Zmn1j1j1899Jenw7D7Ec75ZW7.jpg";
$url = "https://api.weixin.qq.com/cgi-bin/media/upload?access_token={$token}&type={$type}";
$data = array(
'media' => new CURLFile(ltrim($path))
);
上传媒体图片的时候,出现了couldn't open file
$path = "D:/wamp/www/weixin/images/A5Le5Zmn1j1j1899Jenw7D7Ec75ZW7.jpg";
$url = "https://api.weixin.qq.com/cgi-bin/media/upload?access_token={$token}&type={$type}";
$data = array(
'media' => new CURLFile(ltrim($path))
);