这是我的html和CSS代码:
<div class="divphotos">
<form action="upload.php" class="dropzone" id="mydropzone" ></form>
<div id="divphotos-content" >
<?php
require 'getimages.php';
?>
</div>
</div>
css:
#mydropzone {
width:130px;
height:130px;
border: 2px dashed black;
display:inline-block;
}
我尝试过inline
和inline-block
,但是放置区域总是像这样换行:
修改
这是getimages.php:
<?php
// Include the database configuration file
require 'dbConfig.php';
// Get files from the database
$query = $db->query("SELECT * FROM files ORDER BY id DESC");
if($query->num_rows > 0){
while($row = $query->fetch_assoc()){
$filePath = 'images/jill_photos/'.$row["file_name"];
$fileMime = mime_content_type($filePath);
?>
<img src="<?php echo $filePath; ?>" width="130px" height="130px" />
<?php
}
}else{
?>
<p>No file(s) found...</p>
<?php
}
?>
感谢您的帮助。