摘要:
git clean -d -fx 阅读全文
摘要:
<details> <summary>点击查看代码</summary> ``` 1. array_merge() 函数 将一个或多个数组合并为一个数组, 也可以用于重置数组键名 array_merge() 官方文档 : https://www.php.net/manual/zh/function.a 阅读全文
摘要:
点击查看代码 1. 文件上传验证器类 2. 基础类库层 3. 逻辑层 4. 控制器调用 引入扩展包 composer require phpoffice/phpspreadsheet 1. 文件上传验证器类 <?php declare(strict_types=1); namespace app\v 阅读全文
摘要:
1. 为什么使用 {} 当字符串中存在 $ 时,PHP 引擎将尽可能多的查找字符串作为变量名 为了防止变量名称和字符串中的其他内容混为一体,可以使用 {} 将变量名称作为一个整体使用 错误示例: 如果要在 $string 中使用变量 $name, 下面代码将会抛出错误 (未定义变量: $nameab 阅读全文
摘要:
点击查看代码 /** * * @param $money 金额 * @param $count 数量 * @return array * @throws Exception * @author 51924 * @date 2022-09-19 14:06 */ function redAlgorit 阅读全文
摘要:
对接杉德支付主要还是看人家给出的demo和文档 以下文件都是根据官方给出的demo修改而来的 配置类 <?php namespace sandpay; use Exception; use think\Db; class SandConfig { // 1、基础参数配置 const API_HOST 阅读全文
摘要:
$arr23 = [ ['day' => 1], ['day' => 2], ['day' => 3],];$res = array_filter($arr23, function ($element) { return $element['day'] == 2; //只保留数组中的day元素为天数 阅读全文
摘要:
1、创建一个自定义命令类文件 php think make:command Test 该命令会生成一个app\command\Test.php命令行指令类 我们修改内容如下: 点击查看代码 <?php declare (strict_types=1); namespace app\command; 阅读全文
摘要:
今个先就友盟的推送来讲解下;http://push.umeng.com/依然是以开源项目示例:https://github.com/baijunyao/thinkphp-bjyadmin一:注册应用工欲善其事必先注其key;找到消息推送、添加应用;获得key和secret; 这里面有2个坑;1:安卓 阅读全文
摘要:
很多时候会登录一台陌生的服务器; 当需要调整环境的时候; 那真是起步啥都没有;装备全靠打; 两眼一抹黑到处找配置项; 还好我这记的有一份笔记; 可以先总结下; 大都是先用 which 获取目录; 然后再获取配置项位置; which mysql /usr/bin/mysql /usr/bin/mysq 阅读全文