写入云存储

App Engine 不允许写入文件,而是写入和读取云存储。

写入云存储

$file = 'gs://<your-bucket>/hello.txt';
file_put_contents($file, 'hello world');

从云存储中读取

$contents = file_get_contents($file);
var_dump($contents);