Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

apollo-php-client

> 开发工具
Open source

携程Apollo配置中心PHP客户端

177 stars0 likes1 views
WebsiteGitHub

About

携程Apollo配置中心PHP客户端

携程Apollo的PHP客户端

install

php version >= 7.0

bash
$ composer require multilinguals/apollo-client

php version >= 5.4 , setClientIp($clientIp); }

ini_set('memory_limit','128M'); $pid = getmypid(); echo "start [$pid]\n"; $restart = true; //auto start if failed do { $error = $apollo->start(); if ($error) echo('error:'.$error."\n"); }while($error && $restart);


### 配置管理

拉取的配置默认保存在脚本所在目录,每个namespace的配置以`apolloConfig.{$namespaceName}.php`的方式命名保存

### Docker环境客户端自启动

在docker的启动脚本中加入启动代码,一般的php容器启动脚本是docker-php-entrypoint
```bash
if [ -f "/path/to/start.php" ]; then
    apollo_ps=$(ps -aux | grep -c "php /path/to/start.php")
    if [ $apollo_ps -eq 1 ]; then
        php /path/to/start.php &
    fi
fi

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHPapolloapollo-clientphp

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具