(Thinkphp),在sae上怎样将字符串生成文本文件放到storage上啊?

主要就是想在storage中将字符串内容生成文件,用file_put_contents('saemc://xxx)函数可以生成,但这样就破坏了可移植的规则啊。
有没有别的什么函数可以操作啊?
还有就是,如果我将sae中的storage设置为private私有,就不能直接访问其中文件了,那个access key 和secret key怎么用啊?看了半天api文档,也不知道怎么一回事

SaeStorage使用说明

下面是一个小的demo

  $domain = 'xhprof';
    $fileName = 'test.txt';     
    if ($storage->fileExists($domain,$fileName)){
        $res = $storage->read($domain,$fileName);
    }
    $content = "aaaa";
    $storage->write($domain,$fileName,$content);