What is the difference between setting the Web-URL and the path relative to the server-root in PHP configuration?

Setting the Web-URL in PHP configuration allows you to specify the base URL for your website, which is used to generate links and redirects. On the other hand, setting the path relative to the server-root allows you to define the path to your files or directories relative to the server's document root. It is important to configure both settings correctly to ensure that your website functions properly and links are generated correctly.

// Set the Web-URL in PHP configuration
define('WEB_URL', 'http://www.example.com');

// Set the path relative to the server-root
define('SERVER_ROOT', $_SERVER['DOCUMENT_ROOT']);