php - Symfony UrlGeneratorInterface::ABSOLUTE_URL -


symfony 2.6.11 need base url use urlgeneratorinterface::absolute_url

$base_url = urlgeneratorinterface::absolute_url; 

and have true, need url how can base url?

you can generate url request

$baseurl = $request->getscheme() . '://' . $request->gethttphost() . $request->getbasepath(); 

urlgeneratorinterface interface url generator classes must implement (within symphony). , absolute_url constant trivially used in parameters point method generate absolute url


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -