Home > Backend Development > PHP Tutorial > iOS sends a picture to the server, how to save the picture on the PHP side

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-08-18 09:15:36
Original
1229 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:
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template