随笔分类 -  php应用数据

php中用到好的数据代码
摘要:https://blog.csdn.net/u013288190/article/details/132460961 阅读全文
posted @ 2023-10-10 08:56 宋先生日记 阅读(23) 评论(0) 推荐(0)
摘要:命令行php think list - 查看所有可用的命令列表php think help [command] - 查看指定命令的帮助信息php think build - 生成运行时文件php think clear - 清空应用的缓存、日志等文件php think optimize - 优化应用 阅读全文
posted @ 2023-09-27 16:40 宋先生日记 阅读(148) 评论(0) 推荐(0)
摘要:<?php $str = '这是一段包含图片链接的字符串,其中包括<img src="https://example.com/image1.jpg">和<img src=\'https://example.com/image2.jpg\'>。'; preg_match_all('/<img\s+sr 阅读全文
posted @ 2023-09-27 14:58 宋先生日记 阅读(192) 评论(0) 推荐(0)
摘要:TP6 在初次安装时 创建 /app/admin/controller/Index 文件时 无法访问 默认的thinkphp 6 只有 部分的 内置拓展包括:自带的 framework think thinkphp 核心驱动think-filesystem 文件储存驱动think-helper 常用 阅读全文
posted @ 2023-09-26 18:01 宋先生日记 阅读(233) 评论(0) 推荐(0)
摘要:前端在调用接口时都要关注接口返回给我们的状态码,之前只是大概的了解比如404是前端的错,可能是路径错误等,300+可能是重定向了,500以上是服务端或者服务器的错误,并没有一个很好的总结。今天中午看群里有人问这问题,就搜集对比整理了一下,如下:1xx - 信息提示 这些状态代码表示临时的响应。客户端 阅读全文
posted @ 2023-09-20 16:01 宋先生日记 阅读(499) 评论(0) 推荐(0)
摘要:function check_link($str){ $patten = "/<a.*?href\s*?=\s*?[\"\'](.*?)[\"\'].*?>(.*?)<\/a>/is"; preg_match_all($patten,$str,$match); return $match;} 阅读全文
posted @ 2023-08-21 18:04 宋先生日记 阅读(79) 评论(0) 推荐(0)
摘要:/** * php截取指定两个字符之间字符串,默认字符集为utf-8 Power by 大耳朵图图 * @param string $begin 开始字符串 * @param string $end 结束字符串 * @param string $str 需要截取的字符串 * @return stri 阅读全文
posted @ 2023-06-28 18:01 宋先生日记 阅读(114) 评论(0) 推荐(0)
摘要:/** * 生成随机数 * @param int $length * @return string */ function random_keys($length) { $pattern = array( '1','2','3','4','5','6','7','8','9','0', 'a','b 阅读全文
posted @ 2023-01-18 09:52 宋先生日记 阅读(58) 评论(0) 推荐(0)
摘要:<tr> <td width='16%' height=25 bgcolor='ffffff'>上传附件</td> <td bgcolor='ffffff'><script type="text/javascript" src="/ziyuan/js/clipboard.min.js"></scri 阅读全文
posted @ 2022-07-27 10:57 宋先生日记 阅读(107) 评论(0) 推荐(0)
摘要:/** * 把数字1-1亿换成汉字表述,如:123->一百二十三 * @param [num] $num [数字] * @return [string] [string] */ function numToWord($num) { $chiNum = array('零', '一', '二', '三' 阅读全文
posted @ 2022-07-22 10:27 宋先生日记 阅读(219) 评论(0) 推荐(0)
摘要:// Informational 1xx 100 => 'Continue', 101 => 'Switching Protocols', // Success 2xx 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Aut 阅读全文
posted @ 2022-02-09 09:24 宋先生日记 阅读(674) 评论(0) 推荐(0)
摘要:<?php /** * 这是关于mongo数据操作的类 * song * 2022.01.20 */ declare(strict_types=1); class MongoDb{ public static $_instance = null; public $conf = null; publi 阅读全文
posted @ 2022-01-24 16:11 宋先生日记 阅读(143) 评论(0) 推荐(0)
摘要:function uploadFile($fileName) { global $empire, $dbtbpre; if($fileName){ if ($_FILES['upfile']['name'][0] == "") { exit("请上传文件!"); }//判断第一个文件名是否为空 $d 阅读全文
posted @ 2021-11-30 10:06 宋先生日记 阅读(407) 评论(0) 推荐(0)
摘要:function doreplace($str){ global $api,$empire,$class_r,$dbtbpre,$public_r; $text=Repurl($str); $exp1="[--copyurl--]"; $exp2="[/--copyurl--]"; $rr=expl 阅读全文
posted @ 2021-06-11 14:38 宋先生日记 阅读(108) 评论(0) 推荐(0)
摘要:<?php /** php下载类,支持断点续传 * download: 下载文件 * setSpeed: 设置下载速度 * getRange: 获取header中Range */ class FileDownload{ /** 下载 * @param String $file 要下载的文件路径 * 阅读全文
posted @ 2021-05-26 15:07 宋先生日记 阅读(351) 评论(0) 推荐(0)
摘要://查找手机号或者电话号码function findThePhoneNumbers($oldStr = ""){ // 检测字符串是否为空 $oldStr=trim($oldStr); $numbers = array(); if(empty($oldStr)){ return $numbers; 阅读全文
posted @ 2021-05-13 14:53 宋先生日记 阅读(1628) 评论(0) 推荐(0)
摘要:private function isCreditNo($vStr){ $vCity = array( '11','12','13','14','15','21','22', '23','31','32','33','34','35','36', '37','41','42','43','44' 阅读全文
posted @ 2021-04-25 16:26 宋先生日记 阅读(217) 评论(0) 推荐(0)
摘要:function isMobile(){ if( navigator.userAgent.match(/Android/i)|| navigator.userAgent.match(/webOS/i)|| navigator.userAgent.match(/iPhone/i)|| navigato 阅读全文
posted @ 2021-04-02 10:14 宋先生日记 阅读(171) 评论(0) 推荐(0)
摘要:$api->query("select * from ((select * from {$dbtbpre}custom_guanzhu) UNION (select * from {$dbtbpre}custom_newsguanzhu)) as a where a.Userid={$member[ 阅读全文
posted @ 2021-01-08 17:33 宋先生日记 阅读(328) 评论(0) 推荐(0)
摘要:function doreplace($str){ global $api,$empire,$class_r,$dbtbpre,$public_r; // $list = $api->select("ecms_news"); // $urllist = $api->select("ecms_news 阅读全文
posted @ 2021-01-08 17:28 宋先生日记 阅读(78) 评论(0) 推荐(0)