The `getSiteRoot` function is a PHP function that returns the root URL of the website. This can be helpful when building dynamic website content or when constructing URLs for links or redirects.
**Example 1:** Using `getSiteRoot` in a basic PHP script.
**Example 2:** Using `getSiteRoot` with a package library.
In this example, the `getSiteRoot` function is part of a package library called `MyPackage`. The library is included using PHP's `require_once` function, and the function is accessed using the namespace `MyPackage\Config`.
PHP Config::getSiteRoot - 30 examples found. These are the top rated real world PHP examples of Config::getSiteRoot from package huge extracted from open source projects. You can rate examples to help us improve the quality of examples.