[英]How can I upload image from database and push it into <div> in php ?
I have <div>
in php like this.. 我在php中有这样的
<div>
。
I have Database name "pv"
and table which have a lot of image name "picture"
我有数据库名称
"pv"
和表,其中的图像名称"picture"
很多
How can load image from my table into <div>
in php ? 如何将图像从表加载到php中的
<div>
中?
My div code: 我的div代码:
<div id = "leftContent">
<?php
for($i = 1; $i<49; $i++)
{
echo"<div class = product>San Pham $i</div>";
if($i%4==0)
echo "<br />";
}
?>
My css "product" code 我的CSS“产品”代码
{
width:180px;
height:190px;
float:left;
background-color:#33FF99 ;
border-right-color:#000000;
border-bottom-color:#000000;
border-width:1px;
border-style:dashed;
} }
Please help I'm just newbie of PHP :( 请帮助我只是PHP的新手:(
You did not give us much information about the DB you are using and the structure of it. 您没有向我们提供有关正在使用的数据库及其结构的太多信息。 But as a starting point maybe you wanna read:
但作为起点,您可能想读:
http://ch2.php.net/function.mysql-connect or http://www.cramerz.com/php/php_connect_to_db http://ch2.php.net/function.mysql-connect或http://www.cramerz.com/php/php_connect_to_db
If you have more concrete questions then, come back and ask. 如果您还有其他具体问题,请回来询问。
hope this helps. 希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.