摘要: #!/bin/bash# Name:bakmysql.sh# This is a ShellScript For Auto DB Backup and Delete old Backup#备份地址backupdir=/home/mysqlbackup#备份文件后缀时间time=_` date +%Y 阅读全文
posted @ 2020-11-11 16:01 TOPHP 阅读(149) 评论(0) 推荐(0) 编辑
摘要: done(data,curr, count){ var tableView = this.elem.next(); var totalRow = tableView.find('.layui-table-total'); layui.each(totalRow.find('td'), functio 阅读全文
posted @ 2020-10-16 09:23 TOPHP 阅读(4005) 评论(5) 推荐(0) 编辑
摘要: 框架是用的tp5.1 使用composer 安装 composer require workerman/phpsocket.io 扩展 然后public入口出新建socket.php 具体代码如下: <?php // [ 应用入口文件 ] namespace think; // 加载基础文件 req 阅读全文
posted @ 2020-08-13 14:52 TOPHP 阅读(583) 评论(0) 推荐(0) 编辑
摘要: 一、首先在github注册账号 然后https://github.com/settings/applications/1267636这里填写相关资料获取到key和secret 二、在.env配置文件写相关配置: GITHUB_KEY=Client ID GITHUB_SECRET=Client Se 阅读全文
posted @ 2020-05-29 19:13 TOPHP 阅读(376) 评论(0) 推荐(0) 编辑
摘要: /** * @param array $data * @param string $msg * @param int $code * @return string */ function _success($data = [],$msg = '操作成功',$code = 200) { return 阅读全文
posted @ 2020-05-29 18:22 TOPHP 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 长度 strlen($string):得到字符串长度 字符串查找 strpos($string, $search[, $offset]):在指定字符串中查找目标字符串第一次出现的位置 stripos($string, $search[, $offset]):忽略大小写的去查找 strrpos($st 阅读全文
posted @ 2020-05-29 18:20 TOPHP 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 一、数组的一些关于键名和值的基础操作函数 1.获取数组所有的键或值:array_keys() array_values() $arr_keys = array_keys($array); $arr_values = array_values($arr); 2.交换数组中键和值的位置,若重复前面的会被 阅读全文
posted @ 2020-05-29 18:19 TOPHP 阅读(319) 评论(0) 推荐(0) 编辑
摘要: 简单的发送邮件类: <?php /** * Created by PhpStorm. * User: gyc * Date: 2020/4/4 * Time: 下午2:42 * 邮件发送 */ namespace app\plugins; use PHPMailer\PHPMailer\PHPMai 阅读全文
posted @ 2020-04-04 15:49 TOPHP 阅读(1631) 评论(0) 推荐(0) 编辑
摘要: <?php /** * 微信分享相关 * * @since 2017-07-15 */ use Yaf\Registry; class Service_WxShare{ private $appId; private $appSecret; public function __construct($ 阅读全文
posted @ 2020-02-12 15:41 TOPHP 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 1:虚拟机配置文件修改: location / { index index.php index.html; if (!-e $request_filename) { rewrite ^/index.php(.*)$ /index.php?s=$1 last; #必须在前面 rewrite ^(.*) 阅读全文
posted @ 2019-12-03 09:29 TOPHP 阅读(4792) 评论(0) 推荐(0) 编辑