Home  >  Q&A  >  body text

Why does the WeChat public account always report 41005 when adding permanent picture material?

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'])
)

LiuBoLiuBo2550 days ago1608

reply all(1)I'll reply

  • 直奔十维

    直奔十维2017-10-01 14:18:48

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

    reply
    0
  • Cancelreply