会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
寒皓皓
博客园
首页
新随笔
联系
订阅
管理
2019年8月10日
把数字循环输出为拼接字符串
摘要: $and=20; $aa = array(); $bb = array(); for($i=0;$i<$and;$i++){ $aa[$i] = 0; } for($i=0;$i<count($aa);$i++){ if($i == count($aa)-1){ $bb[$i] = $aa[$i];
阅读全文
posted @ 2019-08-10 17:27 寒皓皓
阅读(459)
评论(0)
推荐(0)
2019年8月5日
PHP中防止编码乱码
摘要: PHP设置编码 (防止浏览器乱码, 一般用在php代码里面出现中文时 加在 代码前) header('content-type: text/html; charset=utf-8');
阅读全文
posted @ 2019-08-05 14:49 寒皓皓
阅读(310)
评论(0)
推荐(0)
JS 完成时钟效果
摘要: <script> function playTime(){ var today=new Date(); var hour=today.getHours(); var minute=today.getMinutes(); var second=today.getSeconds(); if(hour<1
阅读全文
posted @ 2019-08-05 10:12 寒皓皓
阅读(207)
评论(0)
推荐(0)
2019年7月25日
tp5 用户注册;登录
摘要: public function work_login_add() { /*添加用户*/ $names=$_POST["names"]; $user=$_POST["user"]; $pwd=$_POST["pwd"]; $pwd=base64_encode($pwd); $res=Db::name(
阅读全文
posted @ 2019-07-25 12:05 寒皓皓
阅读(2485)
评论(0)
推荐(0)
tp5 (自用)提交试卷
摘要: public function student_send() {/*(学生) 提交试卷*/ if(request()->isGet()){ return $this->fetch("stu_finish"); }else{ /*试卷id*/$paper_id=$_POST["paper_id"]=2
阅读全文
posted @ 2019-07-25 12:01 寒皓皓
阅读(201)
评论(0)
推荐(0)
tp5 分页
摘要: (1) $pageNow =$_POST["page"]=1; //当前显示第几页 $pageSize = 10; //每页显示的数量 $rowCount = 0; //要从数据库中获取 //如果有pageNow就使用,没有就默认第一页。 if (!empty($pageNow)){ $pageNo
阅读全文
posted @ 2019-07-25 11:59 寒皓皓
阅读(1435)
评论(0)
推荐(0)
公告