In the context of PHP, what are some alternative methods to using __FILE__ for storing page information?

Using __FILE__ to store page information may not always be the most secure or efficient method, as it exposes the file path to potential attackers. An alternative method is to use a combination of predefined constants like $_SERVER['REQUEST_URI'] and $_SERVER['HTTP_HOST'] to store page information in a more secure manner.

$page_url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
echo "Current page URL: " . $page_url;