Home  >  Article  >  Backend Development  >  php创设zookeeper临时变量

php创设zookeeper临时变量

WBOY
WBOYOriginal
2016-06-13 12:08:10922browse

php创建zookeeper临时变量

临时变量会在连接断开之后被删除。

<?php        $zookeeper = new Zookeeper("127.0.0.1:2182");        $k = "/zk_test3";        $acl = array(                array(                'perms' => Zookeeper::PERM_ALL,                'scheme' => 'world',                'id' => 'anyone',        ));        $zookeeper->create("/zk_test3", "1000", $acl, Zookeeper::EPHEMERAL);        print_r(array(                $zookeeper->get($k),         ));        sleep(5);

?

?

?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn