摘要: $authArrs = array(); //待转的数组 $authIds = array(); //声明一个空数组 array_walk_recursive($authArrs, function($value) use (&$authIds) { array_push($authIds, $va 阅读全文
posted @ 2018-08-09 18:39 SOIQ 阅读(1997) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(123) 评论(0) 推荐(0) 编辑
摘要: // 引入PHPMailer的核心文件 require_once("PHPMailer/class.phpmailer.php"); require_once("PHPMailer/class.smtp.php"); // 实例化PHPMailer核心类 $mail = new PHPMailer( 阅读全文
posted @ 2018-07-30 17:04 SOIQ 阅读(158) 评论(0) 推荐(0) 编辑
摘要: $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 阅读(1655) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 压缩多个文件 压缩多个文件,其实就是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 阅读(2370) 评论(0) 推荐(0) 编辑
摘要: //删除临时文件 function deldir($path){ //如果是目录则继续 if(is_dir($path)){ //扫描一个文件夹内的所有文件夹和文件并返回数组 $p = scandir($path); foreach($p as $val){ //排除目录中的.和.. if($val 阅读全文
posted @ 2018-05-11 18:03 SOIQ 阅读(123) 评论(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 阅读(102) 评论(0) 推荐(0) 编辑
摘要: .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 阅读(422) 评论(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 阅读(312) 评论(0) 推荐(0) 编辑