1. In the process of building the code, you need to get the current website domain name, similar to the Base_url () function in CI
2. The following document has been found, and no similar function is seen to be used
3. Because you don't want to try PHP's own server global variable to get the current domain name,
So ask, does slim provide this function
Reply content:
1. In the process of building the code, you need to get the current website domain name, similar to the Base_url () function in CI
2. The following document has been found, and no similar function is seen to be used
3. Because you don't want to try PHP's own server global variable to get the current domain name,
So ask, does slim provide this function
Some.
$request->getUri()->getBaseUrl()
GetURI This method will return a URI object, class under HTTP, you can look at the