What is the purpose of the config file (config.inc.php) in the PHP code provided?

The purpose of the config file (config.inc.php) in PHP code is to store configuration settings such as database credentials, API keys, and other environment-specific variables in one central location. This helps in maintaining a clean and organized codebase as well as providing an easy way to make changes to these settings without modifying the actual code files.

// config.inc.php

define('DB_HOST', 'localhost');
define('DB_USER', 'username');
define('DB_PASS', 'password');
define('DB_NAME', 'database_name');