iOS sends a picture to the server, how to save the picture on the PHP side

WBOY
Release: 2016-08-18 09:15:36
Original
1125 people have browsed it

As the title says, what was sent is binary. Can I write it directly into the file? The file suffix should be .png or .jpg or something

Reply content:

As the title says, what was sent is binary. Can I write it directly into the file? The file suffix should be .png or .jpg or something

Your interface now

<code>print_r($_FILES);
print_r($_POST);</code>
Copy after login

See what I print so I can decide the next step

Let the ios client tell you the file suffix, and then you just use file_put_content

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!