Centos 使用 supervisor 管理进程

在使用队列的时候,启动了监听的进程,但是进程监听一段时间之后,就自动被收回,后面才看了解到还有神器可以辅助. Supervisor (http://supervisord.org) 是一个用 Python 写的进程管理工具,

PHP7 类型提示

参数类型提示 PHP7 新增了形参类型提示 . int . float . string . bool 代码示例: <?php function test(int $a,string $b,bool $c) { var_dump($a,$b,$c); } test(1,'hello world',true); 结果: int(1) string(11) "hello world" bool(true) 如果传递与形参类型提示不一致的参数则会报错,

PHP 判断字符串是否序列化的字符串

使用PHP函数判断一个字符串是否为序列化的字符串的小技巧 $result = @unserialize(serialize('hello')); if ($result === false) { echo 'is not serialize string'; } else { echo 'is serialize string'; } }

Redis 集群配置

Redis 集群配置 主服务器配置 redis.conf部分配置如下,主服务器使用aof方式持久化备份数据 #关闭`redis.conf`中得rdb功能 #save 900