PHP code example of totoro / apollo-config

1. Go to this page and download the library: Download totoro/apollo-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/ */

    

totoro / apollo-config example snippets


//值是否存在
app('apollo')->has($key)

//获取某个值
app('apollo')->get($key)

//获取所有值
app('apollo')->all()


APOLLO_DRIVER=file
APOLLO_CONF=/etc/xultra/php_conf