微信上传图片,couldn't open file

WBOY
Release: 2016-06-06 20:06:28
Original
3874 people have browsed it

上传媒体图片的时候,出现了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>
Copy after login
Copy after login

回复内容:

上传媒体图片的时候,出现了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>
Copy after login
Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template