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'])
)
Looking for answers to the above questions, I encountered the same problem. Come and answer your questions!