php
请叫我大稳哥
大家好
展开
-
php 做一个签名验证
public function getSign($args = []) { $timestamp = time(); $params = [ 'timestamp' => $timestamp, ]; $params += $args; $signs = (new Sign())->signature($params); return $signs; } class Sign { // 测试秘钥 protec.原创 2021-03-17 14:04:17 · 562 阅读 · 0 评论 -
nginx 配置
# nginx运行的用户名 user nginx; # nginx启动进程,通常设置成和cpu的数量相等,这里为自动 worker_processes auto; # errorlog文件位置 error_log /usr/local/nginx/logs/error.log; # pid文件地址,记录了nginx的pid,方便进程管理 pid /usr/local/nginx/logs/nginx.pid; # Load dynamic modules. See /usr/share/nginx/RE原创 2021-03-15 15:39:52 · 134 阅读 · 0 评论 -
php 多sheet
$datas = json_decode($datas,true)['indexConfigInsert']; $datas2 = json_decode($datas,true)['linkConfigInsert']; $datas3 = json_decode($datas,true)['loopGroupInsert']; foreach($datas as &$item){ unset($item['md5_link']); unset($item['md5_link_.原创 2021-03-12 15:07:37 · 240 阅读 · 0 评论 -
php csv
//开始生成CSV文件 // 设置输出头部信息 // header('Content-Encoding: UTF-8'); // header("Content-Type: text/csv; charset=UTF-8"); // header("Content-Disposition: attachment; filename={$filename}.csv"); ...原创 2021-03-12 09:32:14 · 580 阅读 · 0 评论 -
字符串过滤特殊字符表情
function removeEmoji($str) { $clean_text = ""; // Match Emoticons $regexEmoticons = '/[\x{1F600}-\x{1F64F}]/u'; $clean_text = preg_replace($regexEmoticons, '', $str); // Match Miscellaneous Symbol...转载 2021-03-04 09:31:04 · 395 阅读 · 1 评论 -
lnmp
1、安装nginx (1)下载,解压(http://nginx.org/download/) wget http://nginx.org/download/nginx-1.18.0.tar.gz tar zxf nginx-1.18.0.tar.gz cd nginx-1.18.0 解压之后进行安装输入命令: cd nginx-1.18.0 //切换到解压后的nginx目录 ./configure --prefix=/usr/local/nginx //安装到/usr/local目录下 (如果出错 ..原创 2021-02-26 11:28:01 · 169 阅读 · 0 评论 -
Window环境下执行php定时任务备份数据库,操作文件
服务器上部署的是window环境,开发过程中提到备份数据库的问题;之前做的项目开发,更多都是在Linux环境下,这次不是,最初是比较迷茫的,后来翻阅了一些资料,找到了解决方法,原来和设置自动关机查不了多少,比较简单; 本地的环境是win10,客户服务器是win7,不过大差不差。主要几步是一致的。废话不多说,讲方法; 控制面板 -》系统与安全->管理工具/计划任务 创建任...转载 2019-11-11 17:10:22 · 181 阅读 · 0 评论 -
composer 版本忽略
执行 composer update 命令的时候报 Your requirements could not be resolved to an installable set of packages. 错误 Your requirements could not be resolved to an installable set of packages. 以上原因:不匹配composer...原创 2019-11-11 14:52:26 · 1552 阅读 · 0 评论 -
MySQL 数据库并自动备份
<?php //每天早上备份一次 MySQL 数据库并自动打包,同时删除 5 天前的备份文件 建议在本地运行没有任何问题再传到服务器上 以后就可以添加计划任务 ////////////////////////*/ //保存目录,路径要用反斜杠.您需要手动建立它. //WinRAR.exe 要把压缩包的exe文件跟当前运行页面放在同一个目录,当然你也可以自己配置,这样才能压缩 ini_se...原创 2019-11-08 15:41:56 · 160 阅读 · 0 评论 -
windows 下 PHP脚本 计划任务(实现php代码开关机自动执行)
1、建立PHP脚本,如下: <meta charset='utf-8'> <?php file_put_contents('D:\www\root\1.txt','ok'); ?> 大家,可以看见,我们在这里对将要创建的文件路径使用了绝对路径,这是因为我们将要通过windows命令行来调用此脚本,由于cmd.exe与我们的web根目录是不一样的,而php的文件目...转载 2019-11-04 13:39:18 · 775 阅读 · 0 评论 -
多维数字 子元素交叉相乘
原创 2019-09-19 16:03:18 · 191 阅读 · 0 评论