Hello I want to save the configuration of my web page in a php file.The idea is the configuration is available regardless of whether there is a connection or not to database. I want to be in php files to more secured even if there is not a file forbidding to read the file (json, txt ...). I need to edit the values or add new ones dynamically through the page rather than scrolling through the files.
To solve my problem I found 2 methods used: 1st to record everything in the form of an array:
<?php return array(
'host' => 'localhost',
'username' => 'root', );
2nd to record everything in a flat-file database, but I do not find one that writes the files in php except: This CodeIgniter Flat-File Database Library Who can not work alone without CodeIgniter.
Basically, I've come to the second option if I find something similar to the example. The 1st option implies the use of 1 file that will be difficult to service and it is possible to break something when recording. You can also give other options to dynamically change the values and record them.