Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Für die PHP 5-App ist ein ordnungsgemäß konfigurierter Google Cloud Storage-Bucket erforderlich. Mit den folgenden Schritten ermöglichen Sie jeder Anwendung den problemlosen Zugriff auf einen solchen Bucket:
Hilfreiche Tricks bei der Verwendung von Standard-Buckets
Wenn Sie einen Standard-Bucket verwenden, müssen Sie den Bucket-Namen nicht kennen: Sie können #default# verwenden und dieser wird zur Laufzeit durch den Namen des Standard-Buckets ersetzt.
Sie können beispielsweise mit dem App Engine-Stream-Wrapper für Cloud Storage in den Standard-Bucket schreiben:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-11 (UTC)."],[[["\u003cp\u003eThis API supports first-generation runtimes and can be used when upgrading to corresponding second-generation runtimes.\u003c/p\u003e\n"],["\u003cp\u003ePHP 5 apps require a configured Google Cloud Storage bucket, accessible by enabling billing and creating a bucket in the Storage Browser.\u003c/p\u003e\n"],["\u003cp\u003eEach project has a default bucket that includes 5GB of free storage and a free quota for I/O operations, which might incur additional costs.\u003c/p\u003e\n"],["\u003cp\u003eWhen using a default bucket, you can use \u003ccode\u003e#default#\u003c/code\u003e in place of the bucket name, which will be replaced at runtime, or find it programmatically with \u003ccode\u003eCloudStorageTools::getDefaultGoogleStorageBucketName()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can write to the default bucket using the App Engine stream wrapper, which will leverage functions such as \u003ccode\u003efile_put_contents\u003c/code\u003e and \u003ccode\u003efwrite\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Setup\n\n| This API is supported for first-generation runtimes and can be used when [upgrading to corresponding second-generation runtimes](/appengine/docs/standard/\n| php-gen2\n|\n| /services/access). If you are updating to the App Engine PHP 7/8 runtime, refer to the [migration guide](/appengine/migration-center/standard/migrate-to-second-gen/php-differences) to learn about your migration options for legacy bundled services.\n\n\u003cbr /\u003e\n\nYour PHP 5 app requires a properly configured Google Cloud Storage\nbucket. Fortunately, each app can easily gain access to such a bucket if you do\nthe following:\n\n1. [Enable billing](https://console.cloud.google.com/billing) for your project, if you haven't already done so.\n2. Click **Create bucket** in the [Storage Browser](https://console.cloud.google.com/storage/browser) for your project.\n\nNote you might incur costs by using a Cloud Storage bucket. Each project can\nhave a default bucket, which includes\n[5GB of free storage and a free quota for I/O operations](/appengine/docs/quotas#Default_Gcs_Bucket).\n\n### Useful tricks when using default buckets\n\nWhen using a default bucket, you don't actually need to know your bucket name:\nyou can use `#default#` and this will be replaced at runtime by the name of the default bucket.\n| **Note:** The default bucket name is typically `\u003capp_id\u003e.appspot.com`, where `\u003capp_id\u003e` is your app ID. You can find the bucket name in the App Engine Admin console **Application Settings** page, under the label *Google Cloud Storage Bucket* . Alternatively, if you don't want to use `#default#`, you can use the [CloudStorageTools::getDefaultGoogleStorageBucketName()](/appengine/docs/legacy/standard/php/refdocs/classes/google.appengine.api.cloud_storage.CloudStorageTools#method_getDefaultGoogleStorageBucketName) method to find the name programmatically.\n\nFor example, you would write to the default bucket using the App Engine\nstream wrapper for Cloud Storage: \n\n $default_bucket = CloudStorageTools::getDefaultGoogleStorageBucketName();\n file_put_contents(\"gs://${default_bucket}/hello_default.txt\", $newFileContent);\n\nor \n\n $default_bucket = CloudStorageTools::getDefaultGoogleStorageBucketName();\n $fp = fopen(\"gs://${default_bucket}/hello_default_stream.txt\", 'w');\n fwrite($fp, $newFileContent);\n fclose($fp);"]]