<small id='c9l9h'></small><noframes id='c9l9h'>

        <bdo id='c9l9h'></bdo><ul id='c9l9h'></ul>

        <legend id='c9l9h'><style id='c9l9h'><dir id='c9l9h'><q id='c9l9h'></q></dir></style></legend>
        <i id='c9l9h'><tr id='c9l9h'><dt id='c9l9h'><q id='c9l9h'><span id='c9l9h'><b id='c9l9h'><form id='c9l9h'><ins id='c9l9h'></ins><ul id='c9l9h'></ul><sub id='c9l9h'></sub></form><legend id='c9l9h'></legend><bdo id='c9l9h'><pre id='c9l9h'><center id='c9l9h'></center></pre></bdo></b><th id='c9l9h'></th></span></q></dt></tr></i><div id='c9l9h'><tfoot id='c9l9h'></tfoot><dl id='c9l9h'><fieldset id='c9l9h'></fieldset></dl></div>
        <tfoot id='c9l9h'></tfoot>

        教义实体管理器导致页面中断

        时间:2024-08-09

            • <bdo id='no3xE'></bdo><ul id='no3xE'></ul>
              <tfoot id='no3xE'></tfoot>

              <small id='no3xE'></small><noframes id='no3xE'>

              <i id='no3xE'><tr id='no3xE'><dt id='no3xE'><q id='no3xE'><span id='no3xE'><b id='no3xE'><form id='no3xE'><ins id='no3xE'></ins><ul id='no3xE'></ul><sub id='no3xE'></sub></form><legend id='no3xE'></legend><bdo id='no3xE'><pre id='no3xE'><center id='no3xE'></center></pre></bdo></b><th id='no3xE'></th></span></q></dt></tr></i><div id='no3xE'><tfoot id='no3xE'></tfoot><dl id='no3xE'><fieldset id='no3xE'></fieldset></dl></div>
            • <legend id='no3xE'><style id='no3xE'><dir id='no3xE'><q id='no3xE'></q></dir></style></legend>

                  <tbody id='no3xE'></tbody>
                  本文介绍了教义实体管理器导致页面中断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我是 Symfony2 的新手,并试图显示一个页面列出实体的项目.但是,一旦我使用下面的代码,分页符会出现未收到数据错误"或ERR_EMPTY_RESPONSE"导致我认为我的路线不起作用并引发问题 这里 但问题与 Doctrine 有关:

                  I'm new to Symfony2 and trying to display a page listing items of an entity. However, once i use the code below the page breaks with a "No data received error" or "ERR_EMPTY_RESPONSE" leading me to think that my routes were not working and raising the issue here but the issue was related to Doctrine:

                      public function indexAction() {
                      $em = $this->getDoctrine()->getManager();
                  
                      $entities = $em->getRepository('ApsaBundle:Apsa')->findAll();
                  
                      return $this->render('ApsaBundle:Apsa:index.html.twig', array(
                                  'entities' => $entities,
                      ));
                  

                  但是,这个简单的函数显示页面:

                  However, this simple function displays the page :

                      public function indexAction() {
                               return $this->render('ApsaBundle:Apsa:index.html.twig');
                     }
                  

                  我很高兴知道如何调试这个教义问题.在树枝下面用来显示页面

                  i'll be glad to know how to go about debugging this doctrine issue.Below the twig use to display the page

                  {% extends ::base.html.twig %}
                  {% block body -%}
                      Apsa list
                  
                      <table class="records_list">
                          <thead>
                              <tr>
                                  <th>Id</th>
                                  <th>Titre</th>
                                  <th>Description</th>
                                  <th>Actions</th>
                              </tr>
                          </thead>
                          <tbody>
                          {% for entity in entities %}
                              <tr>
                                  <td><a href="#">{{ entity.id }}</a></td>
                                  <td>{{ entity.titre }}</td>
                                  <td>{{ entity.description }}</td>
                                  <td>
                                  <ul>
                                      <li>
                                          <a href="#">show</a>
                                      </li>
                                      <li>
                                          <a href="#">edit</a>
                                      </li>
                                  </ul>
                                  </td>
                              </tr>
                          {% endfor %}
                          </tbody>
                      </table>
                  
                          <ul>
                          <li>
                              <a href="#">
                                  Create a new entry
                              </a>
                          </li>
                      </ul>
                      {% endblock %}
                  

                  您能否在此处

                  推荐答案

                  可能是由于 WAMP 配置错误.

                  Probably due to a bad WAMP configuration.

                  我邀请您尝试使用此命令行可用的内置 symfony 服务器:

                  I invite you to try with the build-in symfony server available by this command line:

                  php 应用程序/控制台服务器:运行

                  这篇关于教义实体管理器导致页面中断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Doctrine 在水合期间添加了额外的查询,导致“正常"的 n+1 问题.一对一和自引用关系 下一篇:如何让数据库在 Symfony 上运行

                  相关文章

                  1. <legend id='Swbhm'><style id='Swbhm'><dir id='Swbhm'><q id='Swbhm'></q></dir></style></legend>

                    <i id='Swbhm'><tr id='Swbhm'><dt id='Swbhm'><q id='Swbhm'><span id='Swbhm'><b id='Swbhm'><form id='Swbhm'><ins id='Swbhm'></ins><ul id='Swbhm'></ul><sub id='Swbhm'></sub></form><legend id='Swbhm'></legend><bdo id='Swbhm'><pre id='Swbhm'><center id='Swbhm'></center></pre></bdo></b><th id='Swbhm'></th></span></q></dt></tr></i><div id='Swbhm'><tfoot id='Swbhm'></tfoot><dl id='Swbhm'><fieldset id='Swbhm'></fieldset></dl></div>
                    <tfoot id='Swbhm'></tfoot>

                    • <bdo id='Swbhm'></bdo><ul id='Swbhm'></ul>

                      <small id='Swbhm'></small><noframes id='Swbhm'>