自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(26)
  • 收藏
  • 关注

原创 thinkphp5 + layui+ueditor富文本编辑器

1. 准备工作 1. 安装node和npmcurl --silent --location https://rpm.nodesource.com/setup_10.x | bash -yum install -y nodejsnpm install -g cnpm --registry=https://registry.npm.taobao.orgnpm installnpm run buildnpm -v   2. 安装ueditor#进入项目public目录下...

2021-05-24 16:05:22 430

原创 oss分片上传(thinkphp+layui)-前端上传

效果:准备:1.npm install ali-oss2.composer require alibabacloud/sdk前端html代码:<div class="layui-form-item"> <label class="layui-form-label">视频/音频</label> <div class="layui-input-block"> ..

2021-05-20 15:44:10 728 1

原创 vue的重置resetFields

2021-04-15 14:11:49 1071

原创 vue引入路由

进入vue项目执行命令:vue add router文档地址:https://router.vuejs.org/installation.html#npm

2021-04-02 10:50:36 157

原创 vue + element-ui

1、安装node和npm2、安装vue-cli 1、切换数据源,常用淘宝的数据源npm config set registry http://registry.npm.taobao.org/ 2、安装vue-clinpm uninstall -g vue-clinpm install -g @vue/cli3、创建项目vue create 项目名称4、启动服务yarn server或者npm run server5、启动成...

2021-04-01 15:09:01 84

原创 数据库快速插入大量数据

1、存储过程 1、创建数据表CREATE TABLE `sys_user_login_log` ( `id` bigint(100) NOT NULL AUTO_INCREMENT, `user_code` varchar(100) DEFAULT NULL COMMENT '用户编码', `username` varchar(100) DEFAULT NULL COMMENT '用户名', `login_time` datetime DEFAULT NULL COMME...

2021-03-30 10:29:52 1260

原创 curl上传

protected function curlFile($url, $postFields = null) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_FAILONERROR, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_.

2021-03-30 09:49:24 119

原创 tp5.1 + kindeditor

效果:前端:后端:注意返回值为 {‘error’=>0, 'url'=>图片路径},备注图片上传我用的是oss上传

2021-03-25 14:20:41 221

原创 php过滤emoji表情

if (!function_exists('filter_emoji')){ //过滤掉emoji表情 function filter_emoji($str){ $str = preg_replace_callback('/./u', function (array $match){ return strlen($match[0]) >= 4 ? '' : $match[0]; }, $str); return .

2021-03-22 09:23:47 224

原创 php的时间段搜索器

public function searchTimeAttr($query, $value, $data) { $timeKey = $data['timeKey'] ?? 'add_time'; switch ($value){ case 'today': case 'week': case 'month': case 'year': c...

2021-03-16 14:31:34 123

原创 php获取季度时间段

if (!function_exists('getMonth')) { function getMonth(int $ceil = 0){ if ($ceil != 0){ $season = ceil(date('n') / 3) - $ceil; }else{ $season = ceil(date('n') / 3); } $firstday = date('Y-m-01', mk.

2021-03-16 14:11:36 575

原创 docker环境centos7下安装mysql

1、 下载命令wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm2、 进行repo安装rpm -ivh mysql57-community-release-el7-9.noarch.rpm3、进入repo目录下cd /etc/yum.repos.d/4、执行命令yum install mysql-server5、 启动mysql命令systemctl start my

2021-02-19 10:32:41 92

原创 dockerfile

操作步骤:1. git bash到E:\docker\Dockerfile2. vim Dockerfile 内容:FROM nginxRUN echo '这是一个本地构建的nginx镜像' > /usr/share/nginx/html/index.html3. 执行命令:docker build -t nginx:v4 . 4. 进入cmd命令5. 执行命令: docker images 查看所...

2021-02-05 14:42:09 25770

原创 docker

window10上安装Docker操作步骤:https://www.runoob.com/docker/windows-docker-install.htmldocker安装成功:1. docker安装centos7运行cmd命令 构建centos容器:docker run -itd -p 8801:80 --privileged=true --name xiamu centos:centos7 进入容器:docker exec -it xiamu /bin/bash 安装

2021-02-05 10:47:27 147

原创 tp5.1+极光推送

1. 安装 链接:https://github.com/jpush/jpush-api-php-client2. 代码片段<?phpnamespace app\api\controller;use JPush\Client;use think\App;use think\Controller;class Push extends Base { protected $appkey=''; protected $appsecret=''; ...

2021-01-22 15:03:04 313

原创 tp5.1定时任务

1. 在tp框架的command目录下,创建Task.php文件<?phpnamespace app\command;use think\console\Command;use think\console\Input;use think\console\Output;use think\facade\Request;class Task extends Command{ protected function configure() { $thi

2021-01-22 14:39:56 558 1

原创 tp5.1+workerman的mqtt

1. 安装composer require workerman/mqtt2. 在tp框架根目录创建mqtt.php文件<?php// +----------------------------------------------------------------------// | ThinkPHP [ WE CAN DO IT JUST THINK ]// +--------------------------------------------------------.

2021-01-22 14:29:30 1684

原创 tp5.1的oss上传

1. 安装 链接:https://packagist.org/packages/aliyuncs/oss-sdk-php 安装:composer require aliyuncs/oss-sdk-php2. 代码片段:<?phpnamespace app\admin\controller;use OSS\OssClient;use OSS\Core\OssException;use Think\Controller; class OssUpload...

2021-01-22 11:20:39 282

原创 tp5.1导出

1. 引入phpoffice 说明:我是放在了extend目录下 步骤:1. cd extend目录下 2. composer require phpoffice/phpexcel2. 引入成功 代码:public function export(){ //引入phpexcel require_once Env::get('ROOT_PATH').'extend/phpof...

2021-01-22 10:58:42 241

原创 Indirect modification of overloaded element of think\\Collection has no effect

原代码问题解决之后的代码

2020-12-29 13:48:14 1163

原创 怎么把自己本地的项目上传到gitee上面

1. gitee新建仓库2. 本地创建 tp目录3. git bash 到新建的tp目录下4. 相关命令操作 4.1 git init 4.2 git remote add origin + 刚刚在gitee创建的仓库地址 4.3 git pull origin master 4.4 复制你要上传...

2020-12-28 15:01:02 201

原创 Wrong parameters for Exception([string $message [, long $code [, Throwable $previous = NULL]]])

报错:解决:

2020-12-28 10:07:37 3034 2

原创 tp6.0的多应用模式

tp6.0的多应用模式操作步骤:1. 安装多应用模式扩展 composer require topthink/think-multi-app2. 快速生成多应用的命令php think build demo

2020-12-25 10:38:08 245 1

原创 安装tp6时出现Could not find package topthink/think with stability stable.

安装tp6.0操作步骤: 1.git bash到要安装的地方 2. 执行命令:composer create-project topthink/think tp6出现的错误: [InvalidArgumentException] Could not find package topthink/think with stability stable.解决方案:删除之前的镜像:composer config -g --unset repos.packa...

2020-12-25 09:51:00 6021 3

原创 安装tp5.1的时候出现了 Could not find package topthink/think with version 5.1.*.

安装tp5.1操作步骤: 1. git bash到要安装的地方 2. 执行命令 composer create-project topthink/think=5.1.* tp5出现的错误: [InvalidArgumentException] Could not find package topthink/think with version 5.1.*.解决方案:之前使用的镜像是:composer config -g repo.packagist c...

2020-12-25 09:45:33 5058 4

原创 第一次写,随便说点吧

正式接触PHP这方面已经将近一年半的时间,2016年10月6日开始正式学习,2017年3月开始正式工作,一年的工作下来发现自己还在菜鸟级别徘徊,期间换了三份工作,一共接触过2个项目(还没有完全开发完),现在的这份工作是关于医院内部网站的一个开发和维护(当然还是维护居多),所以现在的我迷茫了,不知道该学习些神马,所以想起来写个博客提醒下我自己,我计划在此后每接触一个新的知识点,都用博客写下来,来作为...

2018-04-23 10:49:12 173

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除