会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
空空如也的空
博客园
首页
新随笔
联系
订阅
管理
2018年8月9日
PHP 将二维数组转成一维数组
摘要: $authArrs = array(); //待转的数组 $authIds = array(); //声明一个空数组 array_walk_recursive($authArrs, function($value) use (&$authIds) { array_push($authIds, $va
阅读全文
posted @ 2018-08-09 18:39 SOIQ
阅读(2009)
评论(0)
推荐(0)
2018年7月30日
7.30犯了一个低级错误,查不出来问题一定要做log
摘要: file_put_contents('./log.html', M()->getlastsql().'<br>',FILE_APPEND); file_put_contents('./log.html', ' <br>',FILE_APPEND); file_put_contents('./log.
阅读全文
posted @ 2018-07-30 20:17 SOIQ
阅读(125)
评论(0)
推荐(0)
PHP利用 PHPMailer发送邮件
摘要: // 引入PHPMailer的核心文件 require_once("PHPMailer/class.phpmailer.php"); require_once("PHPMailer/class.smtp.php"); // 实例化PHPMailer核心类 $mail = new PHPMailer(
阅读全文
posted @ 2018-07-30 17:04 SOIQ
阅读(164)
评论(0)
推荐(0)
2018年7月23日
ThinkPHP group和count 无法同时使用解决办法
摘要: $res = M() ->table('__USER__ u') ->join('LEFT JOIN __USER_INFO__ i ON i.user_id=u.id') ->where($where) ->order($order) ->limit($page,$page_num) ->fiel
阅读全文
posted @ 2018-07-23 18:49 SOIQ
阅读(1733)
评论(0)
推荐(0)
2018年6月9日
无限极分类
摘要: private function GetTree($arr,$pid,$step){ global $tree; foreach($arr as $key=>$val) { if($val['pid'] == $pid) { $flg = str_repeat('--',$step); $val['
阅读全文
posted @ 2018-06-09 15:05 SOIQ
阅读(105)
评论(0)
推荐(0)
2018年5月14日
ZipArchive 生成压缩包
摘要: 压缩多个文件 压缩多个文件,其实就是addFile执行多次,可以通过数组的遍历来实现。 $fileList = array( "c:/wamp/www/log.txt", "c:/wamp/www/weixin.class.php"); $name = time().rand(100,999).'.
阅读全文
posted @ 2018-05-14 15:29 SOIQ
阅读(2409)
评论(0)
推荐(0)
2018年5月11日
删除临时文件
摘要: //删除临时文件 function deldir($path){ //如果是目录则继续 if(is_dir($path)){ //扫描一个文件夹内的所有文件夹和文件并返回数组 $p = scandir($path); foreach($p as $val){ //排除目录中的.和.. if($val
阅读全文
posted @ 2018-05-11 18:03 SOIQ
阅读(131)
评论(0)
推荐(0)
复制文件
摘要: function file2dir($sourcefile, $dir){ if(!file_exists($sourcefile)){ return false; } if(!is_dir(dirname($dir))){ mkdir(dirname($dir), 0777, true); } r
阅读全文
posted @ 2018-05-11 18:01 SOIQ
阅读(103)
评论(0)
推荐(0)
2018年5月4日
超出div隐藏,鼠标移入显示全部
摘要: .teacher_wrap .teacher_list .col_7 { display: inline-block; word-break: keep-all; overflow:hidden; text-overflow: ellipsis; width: 80px; padding: 0 10
阅读全文
posted @ 2018-05-04 18:20 SOIQ
阅读(455)
评论(0)
推荐(0)
将秒(非时间戳)转化成 ** 小时 ** 分
摘要: function sec2time($sec){ $hh = intval(floor($sec/3600)); $mm = ($sec%3600)/60; if($hh!='0'){ if($mm=='0'){ $res = $hh.'小时'; }else{ $res = $hh.'小时'.$mm
阅读全文
posted @ 2018-05-04 17:14 SOIQ
阅读(322)
评论(0)
推荐(0)
公告