PHP 정보

PHP 정보 가져오기

더 살펴보기

이 코드 샘플이 포함된 자세한 문서는 다음을 참조하세요.

코드 샘플

PHP

Cloud Functions에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.


use Psr\Http\Message\ServerRequestInterface;

function phpInfoDemo(ServerRequestInterface $request): string
{
    // phpinfo() displays its output directly in the function's
    // HTTP response, so we don't need to explicitly return it
    //
    // Note: we recommend deleting the deployed Cloud Function once you no
    // longer need it, as phpinfo() may broadcast potential security issues.
    phpinfo();
    return '';
}

다음 단계

다른 Google Cloud 제품의 코드 샘플을 검색하고 필터링하려면 Google Cloud 샘플 브라우저를 참조하세요.