Are there any potential security risks involved in offering PHP files for download directly?

Offering PHP files for download directly can pose security risks if the files contain sensitive information or if they are not properly sanitized. To mitigate these risks, it is recommended to store sensitive information in a separate configuration file outside of the web root directory and to sanitize user input to prevent injection attacks.

<?php
// Example of storing sensitive information in a separate configuration file
$config = include('/path/to/config.php');