Using a database to store a configuration, not a configuration file

Unfortunately, the search for such material makes me a lot of noise, so I was wondering if anyone knew of a good resource for those who want to learn how to use the database to store information about the site’s configuration, not the file.

I think some points that interest me: 1) How to save data. One array like e107? Separate line for each custom? 2) How to get configuration data. Global array

+3
source share
5 answers

Consider the following:

  • , , ,
  • - - , .
  • SCM.
  • , , . ? .

, -.

- --, . SQL, LDAP DNS.

+7

, :)

, , .

, :

  • .
  • , , "reset" it
  • , ( ).
  • - ( -).
  • -.
+2
  • , EAV.

  • , .

0

, -.

, WordPress .

0

- :

CREATE TABLE `config` (
  `prop` varchar(100) DEFAULT NULL,
  `value` mediumtext,
  UNIQUE KEY `lookup` (`lookup`)
) ENGINE=InnoDB

prop .

0

Source: https://habr.com/ru/post/1780120/


All Articles