【发布时间】:2012-12-23 22:31:22
【问题描述】:
如何设置尺寸,我想以 400X400 格式显示边缘图像:
- 高度 = 400
- 宽度 = 400
请给出 400X400 的代码大小,谢谢。
代码如下:
<?php
// Grab the data from our people table
$sql = "select * from njerz";
$result = mysql_query($sql) or die ("Could not access DB: " . mysql_error());
while ($row = mysql_fetch_assoc($result)) {
echo "<div class=\"picture\">";
echo "<p>";
// Note that we are building our src string using the filename from the database
echo $row['fname'] . " " . $row['lname'] . "<br />";
echo "<img src=\"images/" . $row['filename'] . "\" alt=\"\" /><br ;
echo "</p>";
echo "</div>";
}
?>
【问题讨论】:
标签: php html image echo image-size