04 2021 档案

摘要:1、首先,你需要在你的框架中下载queue这个扩展 composer require topthink/think-queue 2.公共配置,配置文件位于:config/queue.php return [ 'default' => 'redis', 'connections' => [ 'sync 阅读全文
posted @ 2021-04-18 21:38 Conqueror· 阅读(3183) 评论(1) 推荐(0)
摘要:1.需要在qq邮箱获取你的授权码,获取后才能用你的qq账号发送邮件 2.使用 下载扩展包 composer require phpmailer/phpmailer 3.可以封装,使用时自己调用 public function sendMail() { $toemail = '407489256@qq 阅读全文
posted @ 2021-04-18 18:35 Conqueror· 阅读(1545) 评论(0) 推荐(0)
摘要:GET _search { "query": { "match_all": {} } } POST /2021aa/_doc { "username":"zaq", "age":"20" } POST 2021aa/_doc { "username":"zaq", "age":"18" } PUT 阅读全文
posted @ 2021-04-14 12:51 Conqueror· 阅读(58) 评论(0) 推荐(0)
摘要:<?php namespace app\admin\controller; use app\admin\model\Esones; use app\common\lib\ES; use think\Controller; use think\Request; class Esone extends 阅读全文
posted @ 2021-04-14 11:31 Conqueror· 阅读(95) 评论(0) 推荐(0)
摘要:return [ 'connector' => 'Redis', // Redis 驱动 'expire' => null, // 任务的过期时间,默认为60秒; 若要禁用,则设置为 null 'default' => 'default', // 默认的队列名称 'host' => '127.0.0 阅读全文
posted @ 2021-04-13 21:53 Conqueror· 阅读(409) 评论(0) 推荐(0)
摘要:1、首先,compare需要下载安转包,如果你有的话就可以直接使用这个扩展包 消息队列扩展 composer require topthink/think-queue 在extra文件夹中的queue.php进行配置 return [ 'connector' => 'database', 'tabl 阅读全文
posted @ 2021-04-13 20:53 Conqueror· 阅读(287) 评论(0) 推荐(0)
摘要:原生方式 添加索引 $hosts = [ '127.0.0.1:9200' ]; $client = \Elasticsearch\ClientBuilder::create()->setHosts($hosts)->build(); // 创建索引 $params = [ 'index' => ' 阅读全文
posted @ 2021-04-13 17:57 Conqueror· 阅读(161) 评论(0) 推荐(0)
摘要:可以放置到你的类库文件,使用的时候直接引用 下载扩展包 全文检索 composer require elasticsearch/elasticsearch <?php namespace app\common\lib; use Elasticsearch\ClientBuilder; class E 阅读全文
posted @ 2021-04-13 17:31 Conqueror· 阅读(495) 评论(0) 推荐(0)