Php 模式窗口显示图像,然后显示错误并显示随机字符/数字

Php 模式窗口显示图像,然后显示错误并显示随机字符/数字,php,jquery,twitter-bootstrap,bootstrap-modal,Php,Jquery,Twitter Bootstrap,Bootstrap Modal,我正在努力使用Bootstrap中的模式窗口 我有一个PHPforeach循环,它应该显示用户上传的图片库。目前,他们正在一个新窗口中打开,并将用户从我的网站带走,因此我想将其更改为在模式窗口中打开图像 我已经设置了一个模式窗口,它可以触发并显示正确的图像,但大约五秒钟后,图像消失,并被一堆字符和数字(看起来像某种编码)取代 该错误还会删除关闭按钮,这意味着您无法关闭模式窗口并返回页面 我的代码: <a href="uploads/gallery-photos/<?php echo

我正在努力使用Bootstrap中的模式窗口

我有一个PHP
foreach
循环,它应该显示用户上传的图片库。目前,他们正在一个新窗口中打开,并将用户从我的网站带走,因此我想将其更改为在模式窗口中打开图像

我已经设置了一个模式窗口,它可以触发并显示正确的图像,但大约五秒钟后,图像消失,并被一堆字符和数字(看起来像某种编码)取代

该错误还会删除关闭按钮,这意味着您无法关闭模式窗口并返回页面

我的代码:

<a href="uploads/gallery-photos/<?php echo htmlentities($galleryimage['GalleryPhotoImg'], ENT_QUOTES, 'UTF-8'); ?>" target="_blank" data-toggle="modal" data-target="#GalleryImgModal-<?php echo htmlentities($galleryimage['id'], ENT_QUOTES, 'UTF-8'); ?>">
<img class="gallery_thumb" alt="" src="uploads/gallery-photos/<?php echo htmlentities($galleryimage['GalleryPhotoImg'], ENT_QUOTES, 'UTF-8'); ?>" width="80px" height="120px" /></a>

<div id="GalleryImgModal-<?php echo htmlentities($galleryimage['id'], ENT_QUOTES, 'UTF-8'); ?>" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myImgModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><br />
        <div class="modal-body">
            <img src="uploads/gallery-photos/<?php echo htmlentities($galleryimage['GalleryPhotoImg'], ENT_QUOTES, 'UTF-8'); ?>" class="img-responsive">
        </div>
    </div>
  </div>
</div>

<?php endforeach; ?>