我是 php 新手,正在尝试将数据从 mysql 数据库输出到页面。文本和数字正确打印在页面上,但图像并不是我看到的全部。��� �������� �w� ��|�PF��0100�V����h � I
谁能告诉我如何使用 php 将图像输出到页面上.
下面是我使用的代码
<?php
$username = "egesachi_baby";
$password = "babyclass" ;
$database = "egesachi_babyclass";
$server = "localhost";
$db_handle = mysql_connect($server,$username,$password);
$db_found = mysql_select_db($database)or die ("cannot connect");
if ($db_found) {
$sql = "SELECT * FROM baby";
$result= mysql_query($sql);
while($db_field = mysql_fetch_assoc($result)) {
echo $db_field['NO']."<br>";
echo $db_field['Name']."<br>";
echo $db_field['Age']."<br>";
echo $db_field['photo']."<br>";
}
mysql_close($db_handle);
}
else {
print "database not found";
mysql_close($db_handle);
}
?>