【发布时间】:2012-06-27 18:14:36
【问题描述】:
我正在使用 symfony 1.4 创建一个约会网站(这是我第一个使用 symfony 的项目)。问题是如果只有 10 个或更少的用户在线,服务器就会冻结。我尝试使用 yslow 优化我的 js、css、sprites,我得到了 A 级,但问题仍然存在。这就是为什么我认为我构建应用程序的方式可能是错误的,所以这里是网站 naijaconnexion.com 我正在向你寻求建议和要做的事情,所以我克服了这个问题
如果我不够清楚,请问,如果您想要 cpanel 管理员访问权限,我会发布它
我真的很需要你的帮助
例如,我的主页上有此代码操作,它看起来不错还是需要优化以及如何优化
$this->me = $this->getUser()->getGuardUser()->getPerson();
$this->cities = Doctrine_Core::getTable('City')->findByDql("zipcode=''");
$this->countries = Doctrine_Core::getTable('City')->findByDql("zipcode='10'");
$this->contacts = $this->me->getContacts();
$this->favorites = $this->me->getFavorites();
$this->matches = $this->me->getMatches();
$this->pager = new sfDoctrinePager('Conversation', sfConfig::get('app_home_conversations_per_page'));
$this->pager->setQuery($this->me->getConversationsQuery());
$this->pager->setPage($request->getParameter('page', 1));
$this->pager->init();
没有 HYDRATE_ARRAY 我可以做到这一点
如果我使用 HYDRATE_ARRAY 我能做 $this->contacts[0]['username'];
之类的东西吗请帮忙
【问题讨论】:
-
还是一样的problem?为什么不回复其他答案并提供更多信息?
-
只要问任何你想让我澄清的事情;)