base64编码解码图片问题

WBOY
Release: 2016-06-23 13:58:12
Original
1099 people have browsed it

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


为什么没写入文件。。


回复讨论(解决方案)

你的那个图片地址能打开吗。

打开之后提示: 403 Forbidden

你的那个图片地址能打开吗。

打开之后提示: 403 Forbidden


$aaaa=file_get_contents('http://img211.poco.cn/mypoco/myphoto/20080924/3526959720080924225448061_640.jpg');
file_put_contents('./Uploads/jquery.jpg', file_get_contents($aaaa));
我不解码编码都写不进去。。。

确认 Uploads 目录存在且可写

确认 Uploads 目录存在且可写

你可以?

$aaaa=file_get_contents('http://img211.poco.cn/mypoco/myphoto/20080924/3526959720080924225448061_640.jpg');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