摘要:
阅读全文
摘要:
1、查找字符位置函数 strpos($str,search,[int]):查找search在$str中的第一次位置从int开始; stripos($str,search,[int]):函数返回字符串在另一个字符串中第一次出现的位置。该函数对大小写不敏感 strrpos($str,search,[in 阅读全文
摘要:
//简单数组排序的使用 $data=array(5,8,1,7,2); sort($data);//元素由小到大进行排序 print_r($data);//Array ( [0] => 1 [1] => 2 [2] => 5 [3] => 7 [4] => 8 ) rsort($data);//元素 阅读全文
摘要:
1.生成验证码专门重新定义生成验证码的方法,相当于仓库备料备用;2.表单页面通过Img src调用验证码图片 设置点击更新验证码事件: function fun(obj){ obj.src="__URL__/verify/(注意:一定要加/)"+Math.random(); }3.验证 验证码是否正 阅读全文
摘要:
步骤:1.接收ajax传过来的搜索条件 id,name...2.拼接搜索条件 $where='1=1' 判断使用哪一条搜索条件 if(!empty($id)){ $where.=" and name like '%$name%'"}else{ $where.=" and name like '%$n 阅读全文
摘要:
表格:<center> <form action="upload_do.php" method="post" enctype="multipart/form-data"> <table> <tr> <td>请选择要上传的文件</td> <td><input type="file" name="myf 阅读全文
摘要:
表格:<?php header("content-type:text/html;charset=utf-8");?><form action="do_form.php" method="post" enctype="multipart/form-data"> <center> <table> <tr 阅读全文
摘要:
session:1.session('name','value'); //设置session2.$value = session('name'); // 获取所有的session 3.2.2版本新增 $value = session();3.session('name',null); // 删除na 阅读全文
摘要:
controller:$info=array('error'=>0,'msg'=>'');if($user_info){ if($user_info['is_lock']){ $info['error']=1; $info['msg']='该账户已被锁定'; $this->ajaxReturn($i 阅读全文
摘要:
get:var ajax=new XMLHttpRequest();ajax.open('get','__URL__/check_all?val='+check);ajax.send();ajax.onreadystatechange=function(){ if(ajax.readyState== 阅读全文