我正在尝试使用一个函数来实现这个功能:
<img src='login.php?image=ind_legend.jpg'>
Run Code Online (Sandbox Code Playgroud)
但我不能通过功能来放置图像.我回过头几步,只尝试了这部分代码:
<?php
$file = "http://localhost/sales/test.jpg";
header('Content-type: image/jpeg');
readfile($file);
?>
Run Code Online (Sandbox Code Playgroud)
或使用此功能:
echo file_get_contents($source);
Run Code Online (Sandbox Code Playgroud)
但事实是,我唯一得到的是一个破碎的图像交叉(IE)或在Firefox中没有.
我将不胜感激任何建议
提前致谢