Post error occurred: error code 40005, WeChat returned error message: invalid file type

WBOY
Release: 2016-08-08 09:21:42
Original
2822 people have browsed it

Deploy PxxCms to customers, and when using the mass sending function to send pictures and texts, it prompts: Post error occurred: error code 40005, WeChat returned error message: invalid file type, I have not learned PHP and cannot afford to hurt...

Google to a certain Brother's blog has a solution, but tmd charges... I wiped it and changed it myself

Find the sendAll method of PigCmsLibActionUserMessageAction.class.php, about 112 lines, change it to the following, comment out the first line file_put_contents(...) ;

//file_put_contents(CONF_PATH.<span>'</span><span>img_</span><span>'</span>.$img[<span>'</span><span>id</span><span>'</span>].<span>'</span><span>.jpg</span><span>'</span>,file_get_contents($img[<span>'</span><span>pic</span><span>'</span><span>]));
$postMedia[</span><span>'</span><span>media</span><span>'</span>]=$_SERVER[<span>'</span><span>DOCUMENT_ROOT</span><span>'</span>].str_replace(<span>'</span><span>http://</span><span>'</span>.$_SERVER[<span>'</span><span>HTTP_HOST</span><span>'</span>],<span>''</span>,$img[<span>'</span><span>pic</span><span>'</span><span>]);</span>
Copy after login

The reason should be understood by looking at the code.

The above introduces the Post error: error code 40005, WeChat returns the error message: invalid file type, including the relevant content, I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!