html5 - php在移动端上传图片的问题

WBOY
Release: 2016-06-06 20:24:38
Original
1283 people have browsed it

使用PHP上传图片,打印出来的图片类型是图片类型是 application/octet-stream,我在电脑上发现图片类型是image/png 请问怎么将application/octet-stream转换为image/png,或是让上传的时候直接提交为image/png

回复内容:

使用PHP上传图片,打印出来的图片类型是图片类型是 application/octet-stream,我在电脑上发现图片类型是image/png 请问怎么将application/octet-stream转换为image/png,或是让上传的时候直接提交为image/png

=。=
楼主不需要纠结,也并不需要转换,直接存成png的扩展名称, 就可以了。
如果实在想知道文件类型,就用文件头判断吧

html5 - php在移动端上传图片的问题

html5 - php在移动端上传图片的问题

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