如何将文件设置为可公开读写

只需定义:

// These rules give anyone, even people who are not users of your app,
// read and write access to your database
{
  "rules": {
    ".read": true,
    ".write": true
  }
}

它在开发过程中很有用,但请注意,因为这种访问级别意味着任何人都可以读取或写入你的数据库