多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## sAdd ##### *Description* Adds a value to the set value stored at key. If this value is already in the set, `<span class="calibre12">FALSE</span>` is returned. 添加一个VALUE到SET容器中,如果这个VALUE已经存在于SET中,那么返回FLASE。 ##### *Parameters* *key* *value* ##### *Return value* *BOOL*`<span class="calibre12">TRUE</span>` if value didn't exist and was added successfully, `<span class="calibre12">FALSE</span>` if the value is already present. 如果VALUE不存在于SET中,那么ADDED成功,返回TRUE,负责返回FALSE。 ##### *Example* ``` <pre class="calibre9">$redis->sAdd('key1' , 'member1'); /* TRUE, 'key1' => {'member1'} */ $redis->sAdd('key1' , 'member2'); /* TRUE, 'key1' => {'member1', 'member2'}*/ $redis->sAdd('key1' , 'member2'); /* FALSE, 'key1' => {'member1', 'member2'}*/ ```