Home > Backend Development > PHP Tutorial > php端怎么把ios POST过来的16进制图片 解析成图片

php端怎么把ios POST过来的16进制图片 解析成图片

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:16:15
Original
1545 people have browsed it

求大牛解答,求大牛解答

回复内容:

求大牛解答,求大牛解答

$img = base64_decode($_POST['img']); //POST接受 base64 图片数据流 并解码

<code>    // 生成的文件名
    $file_dir  = "./public/".time().".png";  //文件需上传路径
    $res = file_put_contents($file_dir,$img);  //上传图片 并返回结果</code>
Copy after login
Related labels:
php
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