随笔分类 - PHP
摘要:其中的条件类似于mysql的where cate_id=keyword or content=keyword = '常德学院'; url = 'http://127.0.0.1/aaaaaaa/_sea
阅读全文
摘要:<?php namespace ftp; /** * 作用:FTP操作类( 拷贝、移动、删除文件/创建目录 ) */ class ftp { public conn_id; // FTP连接 /** * 方法:FTP连接 * @FTP_H
阅读全文
摘要:为本人原创,转载请注明出处! 一、命令 /** * _search 查询命令 * _update_by_query 更新命令 * _delete_by_query 删除命令 */ 二、指定字段查询 $url = 'http://192.168.10.2:9200/article/_search';
阅读全文
摘要:arr = explode(',',str_replace(array('A、','B、','C、','D、','E、','F、','G、','H、','A.','B.','C.','D.','E.','F.','G.','H.'),
阅读全文
摘要:exp = new \think\Db\Expression('field(web_company.company_id,'.$order_company_id.') desc,web_company.company_sort
阅读全文
摘要:zip->open("$exportPath.zip",ZIPARCHIVE::CREATE)) { echo "创建[$exportPath.zip]失
阅读全文
摘要:// 原目录,复制到的目录 function recurse_copy(dst) { src); @mkdir(file = readdir($dir)) ) { if (( $file != '.' )
阅读全文
摘要:#方法一:使用 not in ,容易理解,效率低 ~执行时间为:1.395秒~ SELECT COUNT(1) FROM ecs_goods WHERE ecs_goods.goods_id NOT IN (SELECT ecs_member_price.goods_id FROM ecs_memb
阅读全文
摘要:action('index/index/upload',['参数' => '参数值']); //第一种 controller('index/index')->upload('参数'); //第二种
阅读全文
摘要:entlist = Db::name('company') ->join('
阅读全文
摘要:问题:使用coreseek搜索关键词发现搜索出来数据还没有mysql模糊查询的数据多。。。问题出在配置的参数上。 代码如下: <?php require_once('sphinxapi.php'); _GET['keys'])?p
阅读全文
摘要:// 仿 Word 统计文章字数,和 word 统计出来的一致 function comment_count_word($str){ //str); //判断是否存在替换字符 str,"龘"); try {
阅读全文
摘要:/* + * 去掉html中的空格和换行的方法 + */ function delhtml($str) { str); //清除字符串两边的空格 str,""); //利用php自带的函数清除html格式 $str = preg_rep
阅读全文
摘要:你在网上搜索tp6的session,会有大量的说开启中间件的文件,无一例个,全都行不通。 当然,中间件里开启是必须的,生成的session文件目录给写入权限也是必须的,但这样,还是无法使用session。 经过搜索,最后发现是需要在方法中加入:\think\facade\Session::save(
阅读全文
摘要:使用环境为php7.3 function createZip(zipObj,newRelat = '') { while((openFile)) != false) { if(file==
阅读全文
摘要:合并数组的方法 array_merge 如:array_merge(data2); 数组去重 //1.单数组去重复 array_unique(arr1)+array_flip($arr2))
阅读全文