Php 通过自动执行脚本将图像从服务器上传到google云存储

Php 通过自动执行脚本将图像从服务器上传到google云存储,php,google-app-engine,google-cloud-storage,google-api-php-client,Php,Google App Engine,Google Cloud Storage,Google Api Php Client,我想从我的服务器上传图像到谷歌云存储。我不知道怎么做。从你的标签上看,我猜你在用谷歌AppEngine和PHP。有关如何使用AppEngine with PHP上传到Google云存储的文档,请访问: 最基本的例子是: $options = [ "gs" => [ "Content-Type" => "text/plain" ]]; $ctx = stream_context_create($options); file_put_contents("gs://my_bucket/he

我想从我的服务器上传图像到谷歌云存储。我不知道怎么做。

从你的标签上看,我猜你在用谷歌AppEngine和PHP。有关如何使用AppEngine with PHP上传到Google云存储的文档,请访问:

最基本的例子是:

$options = [ "gs" => [ "Content-Type" => "text/plain" ]];
$ctx = stream_context_create($options);
file_put_contents("gs://my_bucket/hello.txt", "Hello", 0, $ctx);

查看“上传到谷歌云存储”部分以了解更多信息。

从您的标签中,我猜您正在将谷歌AppEngine与PHP结合使用。有关如何使用AppEngine with PHP上传到Google云存储的文档,请访问:

最基本的例子是:

$options = [ "gs" => [ "Content-Type" => "text/plain" ]];
$ctx = stream_context_create($options);
file_put_contents("gs://my_bucket/hello.txt", "Hello", 0, $ctx);
查看“上传到谷歌云存储”部分了解更多信息