0
我有一個多域名枝條url條件多個域名
我想在我的樹枝文件給我的當前域的條件。
我嘗試:
{% set path = app.request.getSchemeAndHttpHost() %}
{% if(path == 'http://mysite.it/')%}
<img src="{{asset('images/xxxx.jpg')}}" alt="profile image" class="circle z-depth-2 responsive-img activator">
{% endif %}
但它不工作。
它不工作,好吧但什麼不行,它會拋出任何錯誤或意外的行爲?包括* path *轉儲,詳細一點點 –
symfony的版本是什麼? –
嘗試app.request.server.get('HTTP_HOST')) –