如何在PHP中显示来自MySQL数据库的图像


how to display image from mysql database in php?

<?php 
do {
printf("<section class='sarcina'>
<h1>
<a href='firma.php?id=%s'>%s</a>
</h1>
<div id='image'> <src img='%s' width='100' height='100'> 
<div id='descriere'> 
  <h2>%s lei</h2>
 </div>
</div>
</section>", $pageres["id_sarcini"], $pageres["Den_Comp"],$pageres["foto"], $pageres["suma_ut"]) ;
}
while($pageres=mysql_fetch_array($res));
?>

在这里,我显示我需要的所有数据,所有工作,但我无法显示图片。我如何在这段代码中做到这一点?

试试这个,

 <img  src='your image url here' width='100' height='100'> 

而不是

 <src img='%s' width='100' height='100'>