摘要: <?php namespace app\service; use fast\Random; use think\Exception; use think\Log; class SmsService extends BaseService { public $key = '';//您申请的接口调用Ke 阅读全文
posted @ 2023-07-07 11:57 一个退伍PHPsir 阅读(25) 评论(0) 推荐(0) 编辑
摘要: <?php namespace App\Services; use Illuminate\Http\Request; class LocationService { public function __construct() { $this->key = '********'; } public f 阅读全文
posted @ 2023-06-12 16:48 一个退伍PHPsir 阅读(36) 评论(0) 推荐(0) 编辑
摘要: Excel导入类: <?php namespace App\Utils; use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Storage; use Maatwebsite\Excel\Facades\Excel; cl 阅读全文
posted @ 2023-03-06 09:32 一个退伍PHPsir 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 恢复内容开始 1.在最近的开发需求因为要用到类似支付宝或者微信收款声音模拟,要将金额改为中文,所以做一下处理 2.思路是已小数点为区分,比如是0.45元就是零点四五元,具体如下,如有优化的希望大佬指点: $num = '153.2';//"一百五十三点二 function cc($num){ if( 阅读全文
posted @ 2022-03-19 00:25 一个退伍PHPsir 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 宝塔webhook对接 码云 自动 pull 一. 准备工作 码云申请账号,建立仓库 服务器安装宝塔,GIT和webhook 二. 1.服务器安装 GIT yum install git 2.宝塔安装 webhook插件 3.添加脚本 注意: 其中 “$1”是参数,是你码云仓库的名称,脚本内容大致是 阅读全文
posted @ 2022-03-11 10:34 一个退伍PHPsir 阅读(841) 评论(0) 推荐(0) 编辑
摘要: 1.通过composer安装: composer require aliyuncs/oss-sdk-php 2.config 配置文件 //aliyun OSS 'aliyun_oss' => [ 'KeyId' => '******', 'KeySecret' => '******', 'Endp 阅读全文
posted @ 2020-06-19 15:03 一个退伍PHPsir 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1.因为Phpexecel已经停止维护,所以要使用心得phpoffice; 2.注意引入 use PhpOffice\PhpSpreadsheet\Helper\Sample; use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpre 阅读全文
posted @ 2019-09-11 15:57 一个退伍PHPsir 阅读(1827) 评论(1) 推荐(0) 编辑
摘要: 1.阿里短信接口需要企业认证: 2.短信需要短信模板 <?php /** * 阿里云短信验证码发送类 * @param string $accessKeyId key * @param string $Secret key * @param string $signName 短信模板名称 * @pa 阅读全文
posted @ 2019-09-02 16:41 一个退伍PHPsir 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 一些论坛网站需要每日签到太麻烦,于是写了一个Win 的定时任务,通过curl 去处理传递的伪造Cookie 和 header; 有不妥的地方,希望各位大佬们多多指正,谢谢各位大佬: $fp = @fopen("test.txt", "a+");$error = @fopen("error.txt", 阅读全文
posted @ 2019-08-21 10:20 一个退伍PHPsir 阅读(620) 评论(0) 推荐(0) 编辑
摘要: 一、安装YII 三种安装方式,选择Composer安装 composer create-project --prefer-dist yiisoft/yii2-app-basic basic 二、启动YII 默认文件在Web/index.php路径下 三、定义 方法定义前,要加入action+方法,如 阅读全文
posted @ 2019-08-15 17:19 一个退伍PHPsir 阅读(103) 评论(0) 推荐(0) 编辑