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

base64编码解码图片有关问题

WBOY
WBOYOriginal
2016-06-13 11:55:381762browse

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)));


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

Statement:
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
Previous article:phpcms 札记Next article:php的缓存有关问题