主要就是想在storage中将字符串内容生成文件,用file_put_contents('saemc://xxx)函数可以生成,但这样就破坏了可移植的规则啊。
有没有别的什么函数可以操作啊?
还有就是,如果我将sae中的storage设置为private私有,就不能直接访问其中文件了,那个access key 和secret key怎么用啊?看了半天api文档,也不知道怎么一回事
(Thinkphp),在sae上怎样将字符串生成文本文件放到storage上啊?
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
1条回答 默认 最新
陌里红尘 2015-06-12 13:54关注下面是一个小的demo
$domain = 'xhprof'; $fileName = 'test.txt'; if ($storage->fileExists($domain,$fileName)){ $res = $storage->read($domain,$fileName); } $content = "aaaa"; $storage->write($domain,$fileName,$content);解决 无用评论 打赏 举报