随笔分类 -  php

摘要:/** * String from columnindex * * @param int $pColumnIndex Column index (base 0 !!!) * @return string */ public static function stringFromColumnIndex( 阅读全文
posted @ 2021-12-21 16:52 没事就更 阅读(204) 评论(0) 推荐(0)
摘要:在 phpinfo 中有在 php -m 中没有 先确认 CLI 模式下是否有,命令行输入 php --ri swoole 如果输出了 Swoole 的扩展信息就说明你安装成功了! 99.999% 的人在此步成功就可以直接使用 swoole 了 不需要管 php -m 或者 phpinfo 网页打印 阅读全文
posted @ 2021-07-06 11:19 没事就更 阅读(294) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/wuzuyu365/article/details/90290556function http($url, $data = NULL, $json = false){ $curl = curl_init(); curl_setopt($curl, CURL 阅读全文
posted @ 2021-04-20 13:00 没事就更 阅读(625) 评论(0) 推荐(0)
摘要:https://packagist.org/packages/firebase/php-jwt 阅读全文
posted @ 2021-04-06 16:48 没事就更 阅读(80) 评论(0) 推荐(0)
摘要:省-市-区-乡镇-行政代码 项目中需要用到4级地区代码划分,网上到了一个但是发现数据不完整,就自己写了个爬虫到中国统计局的网上爬了一份完整的。测试过是完整的数据。更新到2016年。 https://gitee.com/QiMaDaZhang/Sheng-Shi-Qu-XiangZhen-XingZh 阅读全文
posted @ 2021-01-25 15:11 没事就更 阅读(302) 评论(0) 推荐(0)
摘要:/** @JsonRpcMethod- delFile*/ public function delFile($data){ if(empty($data->filename)){ throw new Exception('参数错误',3104); }else{ $filename = $data-> 阅读全文
posted @ 2020-12-09 11:22 没事就更 阅读(191) 评论(0) 推荐(0)
摘要:// ini_set('display_errors',1); //错误信息 // ini_set('display_startup_errors',1); //php启动错误信息 阅读全文
posted @ 2020-12-07 22:06 没事就更 阅读(99) 评论(0) 推荐(0)
摘要:sudo killall -9 php 阅读全文
posted @ 2020-08-30 18:52 没事就更 阅读(437) 评论(0) 推荐(0)
摘要:function mbStrSplit ($string, $len=1) { $start = 0; $strlen = mb_strlen($string); while ($strlen) { $array[] = mb_substr($string,$start,$len,"utf8"); 阅读全文
posted @ 2020-06-03 09:48 没事就更 阅读(473) 评论(0) 推荐(0)
摘要:json_encode($params['map_data'],JSON_UNESCAPED_UNICODE) 阅读全文
posted @ 2020-05-25 20:14 没事就更 阅读(146) 评论(0) 推荐(0)
摘要:XHProf是一个分层PHP性能分析工具。 阅读全文
posted @ 2020-04-15 16:58 没事就更 阅读(131) 评论(0) 推荐(0)
摘要:打点统计——1(nginx的配置) 需要统计的页面都导入js统计代码,根据要统计的信息访问统计服务器api地址 要统计的内容举例: (ip什么的就不上报了,交给nginx) 然而真实的统计代码是要做容错处理的,比如说一个页面套一个页面的时候会不会统计两次,要不要加全局锁,防止调用一次以后再调用统计多 阅读全文
posted @ 2020-04-07 17:06 没事就更 阅读(1368) 评论(0) 推荐(0)
摘要:https://www.php.cn/php-weizijiaocheng-395926.html 阅读全文
posted @ 2020-04-07 11:52 没事就更 阅读(140) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/alen_xiaoxin/article/details/80255766 阅读全文
posted @ 2020-04-07 11:35 没事就更 阅读(1001) 评论(0) 推荐(0)
摘要:1 /** 2 * 生成不带横杠的UUID 3 * @return string 4 */ 5 public static function genuuid() 6 { 7 return sprintf('%04x%04x%04x%04x%04x%04x%04x%04x', 8 // 32 bits 阅读全文
posted @ 2020-03-16 19:32 没事就更 阅读(761) 评论(0) 推荐(0)
摘要:转载weixin_34357962 最后发布于2018-03-30 14:30:00 阅读数 204 收藏 展开 $a = [1,2,3]; $b = [2,3,7,1,5]; $arr3 = array_merge(array_diff($a,$b),array_diff($b,$a)); 阅读全文
posted @ 2020-03-12 19:22 没事就更 阅读(1128) 评论(0) 推荐(0)
摘要:private function outPut() { $imgPath = tempnam(sys_get_temp_dir(), 'k'); //创建临时文件 imagejpeg($this->img,$imgPath,50); //生成验证码图片 imagedestroy($this->img 阅读全文
posted @ 2019-11-01 17:21 没事就更 阅读(252) 评论(0) 推荐(0)
摘要:一、在session_start() 前设置session_name(); 例子: string session_name([string $name]) 说明: PHP会话控制之如何正确设置session_name 定义: string session_name([string $name]) 说明: 在php.ini中配置为:session.name = PHPSESSID 在请求开始... 阅读全文
posted @ 2019-10-18 17:33 没事就更 阅读(521) 评论(0) 推荐(0)
摘要:/** * @brief 使用HMAC-SHA1算法生成oauth_signature签名值 * * @param $key 密钥 * @param $str 源串 * * @return 签名值 */ 1 function getSignature($str, $key) { 2 $signature = ""; 3 if (function_exists('hash_hmac')) { 4 $ 阅读全文
posted @ 2019-09-23 10:37 没事就更 阅读(2013) 评论(0) 推荐(0)
摘要:1 strtotime($end)) { 14 $mend = $end; 15 } 16 $m[] = [ 17 's' => preDate($start), 18 'e' => $mend 19 ]; 20 $start = date(... 阅读全文
posted @ 2019-09-10 12:31 没事就更 阅读(921) 评论(3) 推荐(1)