摘要:
on(string $event,$mixed $callback); /* * $serv:服务器信息 * $data:接收到的数据 * $fd:客户端信息 */ //监听数据接收的事件 $serv->on('packet',function($serv,$data,$fd){ //发送数据到相应客户端,反馈信息 $serv->sendto($fd['address'... 阅读全文
摘要:
1.安装swoole扩展 2.网络调试助手进行调试 阅读全文
摘要:
解决方法:参考博文 http://blog.csdn.net/laomengnevergiveup/article/details/52104862 阅读全文
摘要:
(1)php判断检测一个数组里有没有重复的值 if (count($array) != count(array_unique($array))) { echo '该数组有重复值'; } (2)处理从前端传来的json数据 public function dealJson($param){ return json_decode(htmlspecia... 阅读全文
摘要:
//分类数大于4的都放到其他分类下$where ="is_deleted=1 and is_open=1 and concat(path,'/') like '".$cate_id."/%' and type_id !=0"; $cate_info=$store_goods_category->field('id,name,path,sort') ->where($wh... 阅读全文