获取mysql图片路径显示到网页
数据库里面 picture 是varchar类型 id.1的值是 c:\mypic\yyh.jpg
echo "
 | ";这一段不会写 :
全部代码如下 :
$titlesql="select id,name,born,gender,identity_card,picture from myfamily;";
?>
id |
name |
born |
gender |
identity_card |
picture |
while($title=mysql_fetch_array($titleresult)){
echo " ";
echo "$title[id] | ";
echo "$title[name] | ";
echo "$title[born] | ";
echo "$title[gender] | ";
echo "$title[identity_card] | ";
echo " | ";
echo "
";
}
echo "
";
?>
------解决方案--------------------
少了引号
echo "
 | ";