What potential security risks are associated with using absolute path references in PHP scripts?

Using absolute path references in PHP scripts can pose a security risk as it exposes the server's file system structure to potential attackers. This can make it easier for attackers to navigate through directories and potentially access sensitive files. To mitigate this risk, it is recommended to use relative path references instead of absolute paths in PHP scripts.

// Example of using relative path references instead of absolute paths
include_once(__DIR__ . '/config.php');