-2
<?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));
?>
在這裏我顯示所有我需要的數據,所有的作品,但我不能顯示圖片。我怎樣才能在這個代碼中做到這一點?如何在php中顯示來自mysql數據庫的圖像?
你存儲圖像數據的數據庫,或者圖像的只是位置?生成的HTML是什麼樣的? –
使用[驗證器](http://validator.w3.org/) – Quentin
首先,切換img和src在''然後發佈任何錯誤消息你正在得到。 –
Dan