解决了,我服务器重启了,要重启一下redis服务
看的好仔细,incrBy和incr确实是这个区别,只有incrBy可以带第二参数,但是php方法incr()是可以带第二参数的,就是与incrBy()没区别,可能是底层方法都用的incrBy
请大佬指点
那就把那个ip地址改成你的云ip地址,端口号和账号密码什么的都写上就可以了
daemonize yes就可以后台运行
文档上incr, incrBy是放在一起的,描述:If the second argument is filled, it will be used as the integer value of the increment. 如果第二个参数填写会被当做增量。两个函数是一样的,两个原型分别是 incr($key, $value=1) incrBy($key, $value)