简体   繁体   English

未显示Symfony2资产

[英]Symfony2 assets are not shown

I'm working on Symfony2. 我正在研究Symfony2。 pq anyone knows my website takes no assets correctly? pq有人知道我的网站没有正确获取任何资产吗?

I'm working on app.php with $ kernel = new AppKernel ('prod', false); 我正在使用$ kernel = new AppKernel ('prod', false);在app.php上工作$ kernel = new AppKernel ('prod', false); When I upload the site to the web server but I see the assets. 当我将网站上传到Web服务器时,我看到了资产。 I tried to do this: 我试图这样做:

assets: installl - symlink web
assets: install web

the install but still the same. 安装,但仍然相同。

I have also tried to clear the cache and not working. 我也尝试清除缓存,但无法正常工作。

aradasymfony@ssh:~/www/pfc$ app/console assets:install web
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
Installing assets for mio\mioBundle into web/bundles/miomio
Installing assets for FOS\JsRoutingBundle into web/bundles/fosjsrouting
Installing assets for Acme\DemoBundle into web/bundles/acmedemo
Installing assets for Symfony\Bundle\WebProfilerBundle into web/bundles/webprofiler
Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodistribution
paradasymfony@ssh:~/www/pfc$ app/console --env=prod cache:clear
Clearing the cache for the prod environment with debug true

web: http://paradasymfony.alwaysdata.net/pfc/web/login 网址: http//paradasymfony.alwaysdata.net/pfc/web/login

thanks. 谢谢。

The most common problem after deployment is that your app/cache and app/logs folders don't have appropriate permissions. 部署后最常见的问题是您的app/cacheapp/logs文件夹没有适当的权限。 As a quick fix try changing them to 777 (or create if neither of them exists). 作为快速解决方案,请尝试将它们更改为777 (如果它们都不存在,请创建)。

For proper permissions configuration read this chapter (permissions section). 有关正确的权限配置,请阅读本章 (“权限”部分)。

If it does not help - you can either read logs in app/logs folder or in your web-server logs and tell us what is an error, or you can expose app_dev.php file to world and check exception given by it. 如果没有帮助-您可以读取app/logs文件夹中的app/logs或Web服务器日志中的日志,并告诉我们什么是错误,或者可以将app_dev.php文件暴露给世界并检查其给出的异常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM