寫入雲端儲存

App Engine 不允許寫入檔案,而是寫入和讀取雲端儲存。

寫入雲端儲存

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

從雲端儲存中讀取

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