需要帮助bootstrap上传带文件名的图像?

时间:2016-04-21 01:09:39

标签: twitter-bootstrap

有这个代码,但是这段代码也没有显示我的文件名也可以显示文件名sry new只想上传图片并在图片上显示图像名称??

<div class="row">
       <?php 
        //scan "uploads" folder and display them accordingly
       $folder = "uploads";
       $results = scandir('uploads');
       foreach ($results as $result) {

        if ($result === '.' or $result === '..') continue;

        if (is_file($folder . '/' . $result)) {
            echo '
            <div class="col-md-3">
                <div class="thumbnail">
                    <img src="'.$folder . '/' . $result.'" alt="...">
                        <div class="caption">
                        <p><a href="remove.php?name='.$result.'" class="btn btn-danger btn-xs" role="button">Remove</a></p>
                    </div>
                </div>
            </div>';
        }
       }
       ?>
    </div>

0 个答案:

没有答案