Home > Backend Development > PHP Tutorial > base64编码解码图片有关问题

base64编码解码图片有关问题

WBOY
Release: 2016-06-13 11:55:38
Original
1749 people have browsed it

base64编码解码图片问题

       $aaaa=base64_encode(file_get_contents('http://t10.baidu.com/it/u=3419096712,54017040&fm=55&s=6A00F50B4AEB0298352025A50300A022&w=121&h=81&img.JPEG'));<br />        file_put_contents('./Uploads/jquery.jpg', file_get_contents(base64_decode($aaaa)));
Copy after login


为什么没写入文件。。
------解决方案--------------------
$aaaa=file_get_contents('http://img211.poco.cn/mypoco/myphoto/20080924/3526959720080924225448061_640.jpg');<br />file_put_contents('./Uploads/jquery.jpg', $aaaa);
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