摘要: 1.在项目config.php配置文件类 配置chahe 代码: 'cache' => [ // 驱动方式 'type' => 'redis', // 缓存保存目录 'path' => CACHE_PATH, // 缓存前缀 'prefix' => '', // 缓存有效期 0表示永久缓存 'exp 阅读全文
posted @ 2021-09-28 20:59 晚夜聆风 阅读(250) 评论(0) 推荐(0)
摘要: 1.找到public目录下的.htaccess文件 代码 <IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d Rewrite 阅读全文
posted @ 2021-09-28 20:39 晚夜聆风 阅读(55) 评论(0) 推荐(0)
摘要: 1.前端搜索框 <form action="{:url('home/goods/index')}" method="get"> <div> <input type="text" id="autocomplete" name="keywords" value="{$Request.param.keyw 阅读全文
posted @ 2021-09-28 20:03 晚夜聆风 阅读(175) 评论(0) 推荐(0)
摘要: 1.项目目录/application/cli/controller/Es.php (也可自定义) <?php namespace app\cli\controller; use think\Controller; use think\Request; class Es extends Control 阅读全文
posted @ 2021-09-28 19:52 晚夜聆风 阅读(116) 评论(0) 推荐(0)
摘要: 1.先下载 composer require elasticsearch/elasticsearch 2.在项目的 /extends/tools/es/MyElasticsearch.php 中封装 文件夹不存在的手动创建 <?php namespace tools\es; use Elastics 阅读全文
posted @ 2021-09-28 19:48 晚夜聆风 阅读(153) 评论(0) 推荐(0)
摘要: 1、首先我们要把对应的分词器的版本下载下来,网址是:https://github.com/medcl/elasticsearch-analysis-ik/releases 2、将下载下来的压缩包解压,然后将文件复制到 es的安装目录/plugin/ik下面即可,没有的目录直接手动创建就行,完成之后效 阅读全文
posted @ 2021-09-28 19:45 晚夜聆风 阅读(83) 评论(0) 推荐(0)
摘要: phpmailer 安装或者下载方式: 1、从 github 上下载: https://github.com/PHPMailer/PHPMailer/ 2、使用 composer 安装: composer require phpmailer/phpmailer use PHPMailer\PHPMa 阅读全文
posted @ 2021-09-28 19:39 晚夜聆风 阅读(91) 评论(0) 推荐(0)
摘要: 先根据用户来查询签到数据 如果没有则说明第一次签到 有则判断是否是重复签到 比较上次签到时间和昨天的时间 如果属于昨天的时间表示是连续签到 上次签到时间在今天的时间内 表示今天已经签到过了 上次的签到时间在昨天之前 表示昨天没有签到 属于断签 重新开始 代码如下 1 public function 阅读全文
posted @ 2021-09-28 19:35 晚夜聆风 阅读(180) 评论(0) 推荐(0)
摘要: composer require elasticsearch/elasticsearch 配置php.ini 的 sys_temp_dir 改为 php的tmp文件下 在Elasticsearch中存储数据的行为就叫做索引(indexing) 在Elasticsearch中,文档归属于一种类型(ty 阅读全文
posted @ 2021-09-28 18:10 晚夜聆风 阅读(213) 评论(0) 推荐(0)
摘要: 1. elasticsearch-head是一个用于浏览ElasticSearch集群并与其进行交互的Web项目 2.下载安装 elasticsearch-head GitHub托管地址:https://github.com/mobz/elasticsearch-head 下载完成后 解压 安装:打 阅读全文
posted @ 2021-09-28 17:05 晚夜聆风 阅读(114) 评论(0) 推荐(0)
摘要: ElasticSearch是用JAVA语言开发的,其运行需要安装JDK。 JDK (Java Development Kit) ,是整个Java的核心,包括了Java运行环境(Java Runtime Envirnment),一堆Java工具和Java基础的类库(rt.jar)。 下载jdk 地址 阅读全文
posted @ 2021-09-28 16:56 晚夜聆风 阅读(68) 评论(0) 推荐(0)