我已经将symfony2脚本从网站移动到另一台服务器上的另一个脚本
当我输入ls -l来检查包dir并快捷显示其显示的传送域名
这是示例
lrwxr-xr-x 1 Jack staff 61 Feb 3 2013 cmsadmin -> /var/www/mywebsite.com/src/CMS/AdminBundle/Resources/public
lrwxr-xr-x 1 Jack staff 61 Feb 3 2013 cmsfront -> /var/www/mywebsite.com/src/CMS/FrontBundle/Resources/public
lrwxr-xr-x 1 Jack staff 64 Feb 3 2013 cmssecurity -> /var/www/mywebsite.com/src/CMS/SecurityBundle/Resources/public
如何重新编写此捆绑包以匹配新域名或新路径?
例如
old domain : mywebsite.com
new domain : anotherweb.com
此捆绑包仍然具有旧的域快捷方式!有什么建议吗?
答案 0 :(得分:0)
最后在花了12个小时研究这个
之后找到了它 1-删除此文件夹web/bundles
。
2-执行此命令app/console assets:install web
你会看到类似这样的东西
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
Installing assets for CMS\AdminBundle into web/bundles/cmsadmin
Installing assets for CMS\SecurityBundle into web/bundles/cmssecurity
Installing assets for Coddict\NewsBundle into web/bundles/coddictnews
Installing assets for Coddict\ContactBundle into web/bundles/coddictcontact
Installing assets for Coddict\SliderBundle into web/bundles/coddictslider
Installing assets for Coddict\MediaBundle into web/bundles/coddictmedia
Installing assets for FOS\JsRoutingBundle into web/bundles/fosjsrouting
Installing assets for CMS\FrontBundle into web/bundles/cmsfront
Installing assets for Coddict\NewsletterBundle into web/bundles/coddictnewsletter
Installing assets for Symfony\Bundle\WebProfilerBundle into web/bundles/webprofiler
Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodistribution
现在你完成了....创建了新的捆绑包
如果您遇到红色消息的时区错误,只需在§AppKernel.php§中添加此代码,写一下:
public function init() {
date_default_timezone_set( 'Europe/Lisbon' );
parent::init();
}