Best way to store a PHP App's Settings?

前端 未结 10 1858
南笙
南笙 2020-12-08 11:26

What is the best approach to storing a group of global settings for a custom PHP application? I am working on a personal project (first major one really), and need a method

10条回答
  •  南笙
    南笙 (楼主)
    2020-12-08 12:21

    We just use

    $siteConfig['db_name'] = 'database1';
    $siteConfig['site_name'] = 'Stackoverflow';
    

    In a included php file. Putting the values in a array helps with name conflicts.

提交回复
热议问题