Slim Framework Base URL

后端 未结 7 530
太阳男子
太阳男子 2020-12-16 23:34

I\'m new to Slim Framework. How to get the base URL like with the Codeigniter function base_url()?

Thanks

相关标签:
7条回答
  • 2020-12-17 00:19

    The easiest way to get the base url is to append the request url and the request root url like below: $req = $app->request; $base_url = $req->getUrl()."".$req->getRootUri()."/";

    0 讨论(0)
提交回复
热议问题