【发布时间】:2011-08-18 03:23:32
【问题描述】:
我正在尝试使用一个函数来使其正常工作:
<img src='login.php?image=ind_legend.jpg'>
但是我不能通过函数来放置图像。我倒退了几步,只尝试了这部分代码:
<?php
$file = "http://localhost/sales/test.jpg";
header('Content-type: image/jpeg');
readfile($file);
?>
或使用此功能:
echo file_get_contents($source);
但事实是,我得到的唯一结果是图像交叉损坏 (IE) 或 Firefox 中什么都没有。
如果有任何建议,我将不胜感激
提前致谢
【问题讨论】:
标签: php image file-get-contents readfile