摘要: #数字转字符串 String.valueOf(Object) #字符串截取第一位和最后一位 String str = ,1,2,3,; String str1 = str.substring(1); //截取第一个, String str2 = str.substring(1,str1.length 阅读全文
posted @ 2023-02-24 09:10 丶Gang 阅读(235) 评论(0) 推荐(0)
摘要: /** * [getLoLa description] * @Author:XuXianGang * @Method: 根据地址获取经纬度 * @DateTime:2023-02-06T16:01:45+0800 * @param [type] $address [description] * @r 阅读全文
posted @ 2023-02-06 16:11 丶Gang 阅读(358) 评论(0) 推荐(0)
摘要: tp5.0 1.加密类库路径 \extend\aes\Aes.php2.公共调用方法路径 \application\common.php; 加密方法encrypt;解密方法decrypt3.控制器调用使用方法: 加密:encryp('字段'); 解密 decrypt('加密后字段'); 类库文件AE 阅读全文
posted @ 2022-08-23 09:05 丶Gang 阅读(134) 评论(0) 推荐(0)
摘要: /** * 对用户的密码进行加密 * @param $password * @param $encrypt //传入加密串,在修改密码时做认证 * @return array/password */ function encrypt_password($password, $encrypt = '' 阅读全文
posted @ 2022-08-05 18:07 丶Gang 阅读(23) 评论(0) 推荐(0)
摘要: #短信账号 const ACCOUNT = ''; #短信密码 const PASSWORD = ''; #短信路由 const API_SEND_URL = ' # 发送短信 function sendSMS($mobile, $msg, $needstatus = 'true') { $post 阅读全文
posted @ 2022-06-13 17:11 丶Gang 阅读(113) 评论(0) 推荐(0)
摘要: /** * [tosize description] * @Author:XuXianGang * @Method: 文件格式大小 * @DateTime:2021-09-02T15:44:07+0800 * @param[type] $file_size [文件大小] * @return[type 阅读全文
posted @ 2021-11-10 08:32 丶Gang 阅读(105) 评论(0) 推荐(0)
摘要: 一. 生成二维码 1.下载phpqrcode类 phpqrcode类库官网下载地址:https://sourceforge.net/projects/phpqrcode/ 2.在tp下extend创建文件夹ewm ,类库下的phpqrcode.php放进去,可以改名为QRcode.php 并设置命名 阅读全文
posted @ 2021-10-29 10:49 丶Gang 阅读(403) 评论(0) 推荐(0)
摘要: 下载iTerm2 可以直接去官网下载: https://www.iterm2.com/ Mac系统默认使用dash作为终端,可以使用命令修改默认使用zsh: chsh -s /bin/zsh 如果想修改回默认dash,同样使用chsh命令即可: chsh -s /bin/bash 安装Oh my z 阅读全文
posted @ 2020-09-14 19:29 丶Gang 阅读(128) 评论(0) 推荐(0)
摘要: #获得某个软件包的文件全名 rpm -q #安装 rpm -ivh 注:安装rpm 包时提示错误:依赖检测失败 解决办法 : rpmrpm --force -ivh # 忽略报错,强制安装 命令末尾加上 --nodeps --force #列出所有安装过的包 rpm -qa #搜索某一个软件包rpm 阅读全文
posted @ 2020-09-14 17:37 丶Gang 阅读(306) 评论(0) 推荐(0)
摘要: --匹配规格-- $g = "25kg*1/箱"; #匹配 25g/箱; 25kg*1/箱; 5L/桶 preg_match("/^(\d+)?(kg|g|l|ml)(\*?)(\d*)?/i",$g,$mc); //$mc 数组 --匹配整数-- $number = '12'; preg_matc 阅读全文
posted @ 2020-07-01 16:03 丶Gang 阅读(289) 评论(0) 推荐(0)