Maison > Article > développement back-end > 微信上传图片,couldn't open file
上传媒体图片的时候,出现了couldn't open file
<code>$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)) ); </code>
上传媒体图片的时候,出现了couldn't open file
<code>$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)) ); </code>