Home > Backend Development > PHP Tutorial > php 中把一个array(255,11,22,2,0.)转换成图片输出,该如何解决

php 中把一个array(255,11,22,2,0.)转换成图片输出,该如何解决

WBOY
Release: 2016-06-13 12:02:47
Original
1037 people have browsed it

php 中把一个array(255,11,22,2,0...)转换成图片输出
从第三方的接口中获取得到一个图片的二进制数组类似如下结果:

<br />$img_data = array(255,11,2,0,112,4,...);<br />
Copy after login

请教大家怎么把上述的数组转换为图片输出?
------解决方案--------------------
这个数据不正常吧
------解决方案--------------------
如果这的数图片数据的话,则
echo join('', array_map('chr', $img_data));
Copy after login

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