How to store site wide settings in a database?

前端 未结 9 2902
时光说笑
时光说笑 2021-02-19 10:08

I\'m debating three different approaches to to storing sitewide settings for a web application.

A key/value pair lookup table, each key represents a setting.

    <
9条回答
  •  深忆病人
    2021-02-19 10:29

    I have used a mixed approach before in which i had put all the settings (which are not likely to change) into a separate PHP file. The individual settings (which are likely to change) as a key/value pair. That way I could reduce entries from the database thereby reducing my overall query time also this helped my keep the key size small .

提交回复
热议问题