<?php
@$test = $GET['link'];
$url = 'http://cf3.fancyimgs.com/310/20130521/367302239598940361_92b5e3190b3f.jpg';
$ch = curl_init($test);
$fc = fopen('c.jpg', 'w+');
curl_setopt($ch, CURLOPT_FILE, $fc);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fc);
?>这是不工作在codeigniter,上面是我的php代码,以获取图像从一个网址,我通过获取,而不是从获取请求网址图像可以任何人帮助我解决这个问题.....下面是我发送图像url的链接。
<a href="index.php?link=<?php echo $url ;?>">click to download</a>发布于 2013-05-29 19:06:00
它应该是
$_GET['link']
^
|--- Note the underline 不
$GET['link']和
echo urlencode($url) // would be better approach ... https://stackoverflow.com/questions/16812172
复制相似问题