随笔分类 -  [02]PHP

1 2 3 4 5 ··· 25 下一页
摘要:TOKEN 概念: 令牌,就是加密的字符串, 是访问资源的凭证。Token需要查库验证token 是否有效。 客户端使用用户名跟密码请求登录。 服务端收到请求,去验证用户名与密码。 验证成功,服务端会签发一个Token保存到(Session,redis,mysql…)中,然后再把这个 Token 发 阅读全文
posted @ 2022-04-29 10:20 TBHacker 阅读(967) 评论(0) 推荐(0) 编辑
摘要:# ln -s /usr/local/php7.3/bin/php /usr/bin/php73 阅读全文
posted @ 2022-04-26 16:13 TBHacker 阅读(437) 评论(0) 推荐(0) 编辑
摘要:两种方法。 <?php echo hexdec("00EF"); // 239 echo base_convert("00EF",16,10); // 239 都可以! 阅读全文
posted @ 2022-04-18 16:02 TBHacker 阅读(139) 评论(0) 推荐(0) 编辑
摘要:公司开发智慧公厕。 发送指令,研究了一周。 头都大了。 总结如下。 发送指令 indata="FF030000006451FF";in_data = hex2bin(preg_replace('# #', '', $in_data)); // hex2bin — 转换十六进 阅读全文
posted @ 2022-04-16 16:51 TBHacker 阅读(333) 评论(0) 推荐(0) 编辑
摘要:<?php // input-> modbus rtu string // output -> 2bytes string, in correct modbus order function crc16(string,length = 0) { $auchCRCHi = array( 0x00 阅读全文
posted @ 2022-04-15 18:59 TBHacker 阅读(631) 评论(0) 推荐(0) 编辑
摘要:下载 1.10.5 (支持php5.6的最新版本) https://pecl.php.net/package/swoole 第一步 phpize sudo /opt/homebrew/Cellar/php@5.6/5.6.40_3/bin/phpize 第二步 configure sudo ./co 阅读全文
posted @ 2022-04-12 14:46 TBHacker 阅读(168) 评论(0) 推荐(0) 编辑
摘要:下载 swoole最新版 https://pecl.php.net/package/swoole sudo /opt/homebrew/Cellar/php@7.3/7.3.32/bin/phpize sudo ./configure --with-php-config=/opt/homebrew/ 阅读全文
posted @ 2022-04-12 12:44 TBHacker 阅读(316) 评论(0) 推荐(0) 编辑
摘要:-- -- 表的结构 `eb_store_category` -- DROP TABLE IF EXISTS `eb_store_category`; CREATE TABLE `eb_store_category` ( `id` int(11) NOT NULL COMMENT '商品分类表ID' 阅读全文
posted @ 2022-01-10 15:02 TBHacker 阅读(413) 评论(0) 推荐(0) 编辑
摘要:获取单条数据命名:get+要获取的数据+Info 比如获取用户数据 getUserInfo; 获取多条数据: get+要获取的数据+List 比如获取用户数据 getUserList; 获取分页数据: get+要获取的数据+PageList 比如获取用户列表 getUserPageList; 添加数 阅读全文
posted @ 2021-12-28 15:43 TBHacker 阅读(141) 评论(0) 推荐(0) 编辑
摘要:弹出表单处理,很常见的场景。 一些简单的业务需求,可以直接通过对话框来完成。 直接看效果! 看实现代码,首先要有对话框的内容部分。 <el-dialog title="延迟审核" :visible.sync="dialogDelayFormVisible"> <el-form style="widt 阅读全文
posted @ 2021-12-23 15:46 TBHacker 阅读(322) 评论(0) 推荐(0) 编辑
摘要:/** * 获取小程序太阳码 */ public function getXcxCodeUrl(accesstoken,scene,page,check_path = true,$env_version = 'release') { $request_data = [ 'page' => 阅读全文
posted @ 2021-12-18 17:47 TBHacker 阅读(871) 评论(0) 推荐(0) 编辑
摘要:<?php /** * User: Eden * Date: 2019/3/21 * 共有内容 */ namespace Common\Service; use Common\Util\JsonUtil; use Vendor\Func\Http; use Vendor\Func\Red; clas 阅读全文
posted @ 2021-12-17 17:07 TBHacker 阅读(611) 评论(0) 推荐(0) 编辑
摘要:<?php /** * User: Eden * Date: 2019/3/21 * 共有内容 */ namespace Common\Service; use Common\Util\JsonUtil; use Vendor\Func\Http; use Vendor\Func\Red; clas 阅读全文
posted @ 2021-12-17 16:34 TBHacker 阅读(409) 评论(0) 推荐(0) 编辑
摘要:<?php function hash($a) { salt=xxx;//saltb=a.salt; //把密码和salt连接 b=md5(b); //执行MD5散列 return $b; //返回散列 } ?> 将hash值与salt同时存入数据库。 登录时,验证密码 阅读全文
posted @ 2021-12-13 16:51 TBHacker 阅读(187) 评论(0) 推荐(0) 编辑
摘要:DROP TABLE IF EXISTS `sys_config`; CREATE TABLE `sys_config` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `param_key` varchar(50) DEFAULT NULL COMMENT ' 阅读全文
posted @ 2021-12-13 16:04 TBHacker 阅读(160) 评论(0) 推荐(0) 编辑
摘要:/** * HTTP_HOST = SERVER_NAME:SERVER_PORT * 获取当前的host */ public static function getSelfHost() { setlog(SERVER,_SERVER['HTTP_HOST'],$_SERVER['SERVER 阅读全文
posted @ 2021-12-06 12:03 TBHacker 阅读(994) 评论(0) 推荐(0) 编辑
摘要:// 循环 do { phone=host_phone . '-' . saltval;exist = usercustomervillage>where([phone=>phone, 'house_id' => houseid])>find();salt 阅读全文
posted @ 2021-12-01 10:35 TBHacker 阅读(125) 评论(0) 推荐(0) 编辑
摘要:<?php function isTimeCross(beginTime1=,endTime1 = '', beginTime2=,endTime2 = '') { beginTime1=strtotime(beginTime1); $beginTime2 = s 阅读全文
posted @ 2021-11-29 10:06 TBHacker 阅读(172) 评论(0) 推荐(0) 编辑
摘要:public function changeMonth() { originmonth=this->input_data['origin_month']; addmonth=this->input_data['add_month']; if (!Verify::checkMont 阅读全文
posted @ 2021-11-17 10:47 TBHacker 阅读(93) 评论(0) 推荐(0) 编辑
摘要:brew update brew install tidy-html5 阅读全文
posted @ 2021-11-01 18:15 TBHacker 阅读(417) 评论(0) 推荐(0) 编辑

1 2 3 4 5 ··· 25 下一页
点击右上角即可分享
微信分享提示