Bootstrap 模式中的 PHP 不工作

标签 php html bootstrap-modal

有什么东西可以阻止 PHP 在 Bootstrap 模式中显示吗?

我无法让这个简单的 echo 在我的模态中工作。

<!-- Button trigger modal -->
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
      </div>
      <div class="modal-body">
        
       <?php echo "Test"; ?>
       
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>

最佳答案

抱歉...我发现了问题所在。由于某种原因,div 上的 CSS 样式设置为 "display: none;"。现在可以了。谢谢!

关于Bootstrap 模式中的 PHP 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34317653/

相关文章:

html - 样式生成的表格行

仅使用单个密码字段(无用户名)的 PHP session ?

php - 使用 Laravel 5 从 mysql 数据创建多维数组

html - a::before 伪元素中的多个值

javascript - 为什么数组没有显示在文本区域中?

angular - 无法解析 BsModalService 的所有参数

php - IMAP_OPEN 使网页崩溃

php - 从 SAML 响应 (XML) 中检索属性和名称 ID

html - 如何在 HTML 中为 <td> 设置固定宽度

php - 输出2时如何从第一行获取数据