我很疑惑,MongoGridFS::put 和 MongoGridFS::storeFile 除了 php 的选项参数外还有什么区别?
public mixed MongoGridFS::storeFile ( string $filename [, array $extra = array() [, array $options = array() ]] )
public mixed MongoGridFS::put ( string $filename [, array $extra = array() ] )
最佳答案
你是对的 - 除了 $options 数组之外没有区别。但是设置“安全”选项 Mongo 可以抛出 MongoCursorException,如果保存失败,您可以捕获它。
关于php - php中MongoGridFS::put和MongoGridFS::storeFile函数有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9372908/