Imagining that I have a small site, and this site stores and returns information from the database. I currently see a lot of people storing the login data for MySQL or paths in PHP variables or defines constants.
<?php
...
$db_host = "localhost";
$db_x = "xxx";
// ou
DEFINE("DB_HOST", "localhost");
...
?>
On the PHP page I read some of the user contribution notes, and some said that the best way to store settings is in .ini
configuration files, in other cases, such as frameworks in>, store paths and other data in .json
files.
If I save settings to one of these files, what warranty do I have that will be more secure, and how can I safely read these settings?