PHP code example of zhujinkui / tp5-config
1. Go to this page and download the library: Download zhujinkui/tp5-config library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zhujinkui / tp5-config example snippets
namespace app\common\controller;
use think\Controller;
use think\ConfigApi;
class Base extends Controller
{
public function _initialize()
{
//获取数据列表
$config = ConfigApi::lists();
Config::set($config);
}
}