Why does the WeChat public account always report 41005 when adding permanent picture material?
LiuBo
LiuBo 2017-09-30 14:43:28
0
1
1642

FUNCTION ADD_MATERIAL ($ Obj) {
$ File_info = Array (
'FILENAME' = & GT; '/public/download.png', // The path of the picture compared to the path of the website root directory
# 'Content-Type' = & GT; 'Image/PNG', // File type
'FileLength' = & GT; '11011' // 图
); = $this -> get_access_token();

    $url = "https://api.weixin.qq.com/cgi-bin/material/add_material?access_token={$access_token}&type=image"

$ Real_path = "{$_Server ['Server_name']} {$ File_info ['FILENAME']}"; {$real_path}", 'form-data' => $file_info); json_decode($result, true);

if($result['media_id'])
)

LiuBo
LiuBo

reply all(1)
直奔十维

Looking for answers to the above questions, I encountered the same problem. Come and answer your questions!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!