libzookeeper
libzookeeper copied to clipboard
get function always return null
but i can see data in zkClient
Could you please provide me a sample to help me reproduce this issue?
`
public function GetZkNodeData($svrIp, $path, &$msg){
$zc = self::GetZkClient($svrIp, $msg);
if (is_null($zc)){
return "";
}
if (($data = $zc->get($path)) !== false){
return $data;
}
$msg = "err!";
return "";
}
public static function GetZkClient($svrIp, &$msg){
try{
$zc = new ZookeeperClient();
$zc->connect($svrIp);
} catch(\Exception $e){
$msg = $e->getMessage();
return null;
}
return $zc;
}
`
What about version info? :)