PHP uses curl to upload files and reports a file not found error. What does curl mean? php curl curl ini

WBOY
Release: 2016-07-29 08:49:58
Original
1347 people have browsed it

A function that needs to be done today is to upload a local picture to the WeChat server.
So I used the curl function of PHP and there was no problem when I tested it locally. There was a problem when uploading it online, and WeChat reported a file missing error. (I don’t want the online and offline environments to be inconsistent.)
Later it was discovered that it was caused by a parameter setting of curl.

<code>curl_setopt ( <span>$ch</span>, CURLOPT_SAFE_UPLOAD, <span>false</span> );</code>
Copy after login
TRUE disable @ prefix when sending files in CURLOPT_POSTFIELDS.
Added in PHP 5.5.0, default value is FALSE. PHP 5.6.0 changes the default value to TRUE.

If your php version is 5.6, this problem may be caused.

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the error of using curl to upload files in PHP and reporting that the file cannot be found, including the content of curl and uploading files. 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!