将应用程序配置变量存储到数

时间:2016-12-26 02:40:44

标签: php mysql database

是否有任何PHP开源类可以在MySQL数据库中存储应用程序配置变量,例如Wordpress? 我想存储和阅读这样的内容:

https://rawgit.com/ppham27/material/dist/dist/angular-material.js

在MySQL数据库表中,数据库表需要看起来像这样的单一

$config['name'] = "test1";
$config['name']['subname'] = "test2";

1 个答案:

答案 0 :(得分:1)

不需要课堂风格。 例如:

//config.php

    $config['name'] = "test1";
    $config['name']['subname'] = "test2";

//other php.

    require_once('{path to config.php}');
    echo $config['name'];
    echo $config['name']['subname'];