PHP 版 Google Cloud 客户端库是一个用于访问 Google Cloud 服务的客户端库,可减少您必须编写的样板代码。该库提供易于理解的高级 API 抽象。它接受 PHP 的习语,与标准库良好适配,并且与您的代码库更紧密地集成。所有这些特点意味着您可以有更多的时间创建对您来说真正重要的代码。
在本地安装库:
composer require google/cloud
借助 Google Cloud CLI,您可以在本地处理身份验证。如果您希望本地应用临时使用您自己的用户凭据进行 API 访问,请运行以下命令:
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-20。"],[[["\u003cp\u003eDependencies for PHP applications can be declared in a \u003ccode\u003ecomposer.json\u003c/code\u003e file, which App Engine uses to install them via \u003ccode\u003ecomposer\u003c/code\u003e before starting the application.\u003c/p\u003e\n"],["\u003cp\u003eAny Linux-compatible PHP package can be utilized, and dependencies can be pinned to specific versions by committing the \u003ccode\u003ecomposer.lock\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eA variety of web frameworks such as Symfony, Laravel, CodeIgniter, WordPress, Drupal, and Joomla! can be integrated by adding them to \u003ccode\u003ecomposer.json\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Cloud Client Library for PHP can be installed to access Google Cloud services and reduce boilerplate code, requiring \u003ccode\u003ecomposer require google/cloud\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003ePrivate repositories can be accessed by configuring them in \u003ccode\u003ecomposer.json\u003c/code\u003e and providing the necessary credentials in an \u003ccode\u003eauth.json\u003c/code\u003e file located in the project root.\u003c/p\u003e\n"]]],[],null,[]]