Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在Predis中使用hmset的问题_Php_Redis_Predis - Fatal编程技术网

Php 在Predis中使用hmset的问题

Php 在Predis中使用hmset的问题,php,redis,predis,Php,Redis,Predis,我在使用$predis->hmset()时遇到问题。我需要使用什么参数? 我尝试了许多变体,但没有成功 $this->client()->hmset( $this->name, array( 1 => 3 )) $this->client()->hmset( $this->name, array( 1, 3 )) 发件人: 也许,请确保使用字符串而不是整数…?错误与redis有关。Thx的答案:) // Prepare an hash with so

我在使用
$predis->hmset()
时遇到问题。我需要使用什么参数? 我尝试了许多变体,但没有成功

$this->client()->hmset( $this->name, array( 1 => 3 ))

$this->client()->hmset( $this->name, array( 1, 3 ))
发件人:


也许,请确保使用字符串而不是整数…

?错误与redis有关。Thx的答案:)
// Prepare an hash with some fields and their respective values.
$client->hmset('metavars', array('foo' => 'bar', 'hoge' => 'piyo', 'lol' => 'wut'));