上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页
摘要: PHP中处理JSON数组和对象 客户端有一些混淆的资源是围绕着JSON的数组和对象,以及如何在PHP中指定它们。特别是,问题是由空对象和空数组导致的。这篇文章回告诉你一些在Elasticsearch JSON API中的常用模式,以及如何转换成为PHP表示形式。 空对象 Elasticsearch 阅读全文
posted @ 2017-10-12 17:43 Nullnullisnull 阅读(332) 评论(0) 推荐(0) 编辑
摘要: 快速开始 本章节会给你一个客户端的主要功能(函数)是如何工作的快速概述。 安装 引入(包含)elasticsearch-php 在你的 composer.json 文件: [javascript] view plain copy { "require": { "elasticsearch/elast 阅读全文
posted @ 2017-10-12 17:40 Nullnullisnull 阅读(2492) 评论(0) 推荐(0) 编辑
摘要: 安装 Elasticsearch-PHP只有三个要求你需要担心: PHP 5.3.9 或更高版本(查看更多信息) Composer ext-curl: Libcurl的PHP扩展 其它的依赖会通过Composer 被自动的下载和安装。Composer是一个管理PHP依赖的包。通过Composer安装 阅读全文
posted @ 2017-10-12 17:38 Nullnullisnull 阅读(726) 评论(0) 推荐(0) 编辑
摘要: 最近在学习使用Elasticsearch,并且是和PHP一起使用的,看到了Elasticsearch-PHP,其实是Elasticsearch为PHP提供的客户端,那么我们来学习一下API文档,如何在PHP中使用Elasticsearch。 官方文档:https://www.elastic.co/g 阅读全文
posted @ 2017-10-12 17:37 Nullnullisnull 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 方法一: 如果需要搜索分页,可以通过from size组合来进行。from表示从第几行开始,size表示查询多少条文档。from默认为0,size默认为10, 如果搜索size大于10000,需要设置index.max_result_window参数 注意:size的大小不能超过index.max_ 阅读全文
posted @ 2017-10-09 11:39 Nullnullisnull 阅读(1450) 评论(0) 推荐(0) 编辑
摘要: php屏蔽电话号码中间四位: 示例: $phonenum = "13966778888"; echo hidtel($phonenum); 最后输出:139****8888 阅读全文
posted @ 2017-09-25 11:23 Nullnullisnull 阅读(650) 评论(0) 推荐(0) 编辑
摘要: 0. 简介 PHP通过正则表达式提取字符串中的手机号并判断运营商,简单快速方便,能提取多个手机号。 1. 代码 2. 测试结果 3. 结果解析 阅读全文
posted @ 2017-09-25 10:53 Nullnullisnull 阅读(2316) 评论(0) 推荐(0) 编辑
摘要: // var str1 = str.replace(/[\'\"\\\/\b\f\n\r\t]/g, '');// 去掉转义字符 // var str2= str.replace(/[\-\_\,\!\|\~\`\(\)\#\$\%\^\&\*\{\}\:\;\"\L\<\>\?]/g, '');/ 阅读全文
posted @ 2017-09-21 11:40 Nullnullisnull 阅读(855) 评论(0) 推荐(0) 编辑
摘要: $(function(){ if(window.history && window.history.pushState){ $(window).on('popstate',function () { window.history.pushState('forward',null,'#'); window.history.f... 阅读全文
posted @ 2017-09-01 10:35 Nullnullisnull 阅读(336) 评论(0) 推荐(0) 编辑
摘要: string 'content' (length=7) 'c' => string 'index' (length=5) 'a' => string 'lists' (length=5) 'catid' => string '6' (length=1) ... 阅读全文
posted @ 2017-08-24 15:21 Nullnullisnull 阅读(19693) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页