如何在本地服务器中配置 symfony 项目? [英] How to configure symfony project in local server?

查看:32
本文介绍了如何在本地服务器中配置 symfony 项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 symfony 的初学者.我必须配置使用 symfony 构建的已经开发的项目.我更改了数据库信息,但是在浏览 localhost/myproject/web 时没有显示任何内容.我该怎么做才能在本地服务器中配置项目.我也创建了数据库.希望得到帮助.谢谢....

I am beginner for symfony. I have to configure the already developed project that is built using symfony. I changed the database information but when browse localhost/myproject/web there is nothing displayed. What can i do to configure the project in local server. I have created the database as well. Hope to get help. Thanks ..........

推荐答案

您需要将 apache 指向 symfony 项目中的 web 文件夹.或者如果您的项目驻留在 apache web root 中,您可以使用:

you need to point apache to the web folder in your symfony project. or if your project reside inside apache web root you could use:

http://localhost/myproject/web/index.php 但这不会显示任何错误.你可以使用:

http://localhost/myproject/web/index.php but that won't show any errors. insted of that you could use:

http://localhost/myproject/web/前端_dev.php,其中frontend 是前端控制器的名称(此文件在 web/文件夹中).

http://localhost/myproject/web/frontend_dev.php where frontend is the name of front controler ( this file is in web/ folder).

如果没有任何输出,请查看 apache 服务器错误日志以找出项目不工作的原因.

and if then you don't get any output look into your apache server error log to find why project isn't working.

很少解决:

当在 symfony 项目 root 中时,在命令提示符下执行:

when in symfony project root execute this in command prompt:

php symfony cache:clear
php symfony fix-perms

然后尝试上面的网址.

更多信息这里

这篇关于如何在本地服务器中配置 symfony 项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆