What are the potential pitfalls of using PHP to manage and display advertising banners on a website?

One potential pitfall of using PHP to manage and display advertising banners on a website is the risk of exposing sensitive information, such as database credentials, in the code. To solve this issue, it is important to store sensitive information in a separate configuration file outside of the web root directory.

// config.php
<?php
$db_host = 'localhost';
$db_user = 'username';
$db_pass = 'password';
$db_name = 'database_name';
?>

// index.php
<?php
include('config.php');

// Use $db_host, $db_user, $db_pass, $db_name variables for database connection
?>