PHP code example of jimu / apollo-symfony
1. Go to this page and download the library: Download jimu/apollo-symfony 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/ */
jimu / apollo-symfony example snippets
$apolloClient = new ApolloClient();
$apolloClient
->setConfigServerUrl(getenv('CONFIG_SERVER'))
->setAppId(getenv('APPID'))
->setNamespaceNames(getenv('NAMESPACES'));
do {
try {
$apolloClient->noCacheRsync();
/**
* symfony4 保存至 .env
*/
$apolloClient->getIsModifyStatus() && $apolloClient->saveToEnv();
} catch (Exception $exception) {
echo($exception->getMessage());
}
} while (true);