1 개요[ | ]
- PHP CF 환경변수 얻기
PHP
Copy
$VCAP_SERVICES = json_decode($_ENV['VCAP_SERVICES'], true);
$credentials = $VCAP_SERVICES['p-mysql'][0]['credentials'];
$DB_hostname = $credentials['hostname'];
$DB_name = $credentials['name'];
$DB_username = $credentials['username'];
$DB_password = $credentials['password'];
2 같이 보기[ | ]
3 참고[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.