摘要: file_put_contents('log.txt',PHP_EOL.'zhangsan'.$time.'查看了数据', FILE_APPEND); 阅读全文
posted @ 2017-02-09 09:30 班尼 阅读(93) 评论(0) 推荐(0) 编辑
摘要: header("content-type:text/html;charset=utf-8");//页面字符集的设置 header("location:index.php")//立即跳转 header("refresh:2,url=index.php")//提示跳转 阅读全文
posted @ 2017-02-09 08:48 班尼 阅读(127) 评论(0) 推荐(1) 编辑
摘要: 配置 phpstudy 虚拟主机 1在httpd.conf中 把#Include conf/extra/httpd-vhosts.conf前面的#去掉 2在站点域名管理 添加 要配置的 虚拟主机 添加 3在phpstudy中phpstudy设置中 ,勾选允许目录列表 ,这样会显示站点下的文件目录 4 阅读全文
posted @ 2017-02-04 09:44 班尼 阅读(222) 评论(0) 推荐(1) 编辑
摘要: 文本框:textInput(); 密码框:passwordInput(); 单选框:radio(),radioList(); 复选框:checkbox(),checkboxList(); 下拉框:dropDownList(); 隐藏域:hiddenInput(); 文本域:textarea(['ro 阅读全文
posted @ 2017-01-14 13:42 班尼 阅读(141) 评论(0) 推荐(1) 编辑
摘要: 阅读全文
posted @ 2017-01-06 21:26 班尼 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 1、查找字符位置函数 strpos($str,search,[int]):查找search在$str中的第一次位置从int开始; stripos($str,search,[int]):函数返回字符串在另一个字符串中第一次出现的位置。该函数对大小写不敏感 strrpos($str,search,[in 阅读全文
posted @ 2017-01-06 21:16 班尼 阅读(105) 评论(0) 推荐(0) 编辑
摘要: //简单数组排序的使用 $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);//元素 阅读全文
posted @ 2017-01-06 21:15 班尼 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 1.生成验证码专门重新定义生成验证码的方法,相当于仓库备料备用;2.表单页面通过Img src调用验证码图片 设置点击更新验证码事件: function fun(obj){ obj.src="__URL__/verify/(注意:一定要加/)"+Math.random(); }3.验证 验证码是否正 阅读全文
posted @ 2017-01-06 21:13 班尼 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 步骤:1.接收ajax传过来的搜索条件 id,name...2.拼接搜索条件 $where='1=1' 判断使用哪一条搜索条件 if(!empty($id)){ $where.=" and name like '%$name%'"}else{ $where.=" and name like '%$n 阅读全文
posted @ 2017-01-06 21:12 班尼 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 表格:<center> <form action="upload_do.php" method="post" enctype="multipart/form-data"> <table> <tr> <td>请选择要上传的文件</td> <td><input type="file" name="myf 阅读全文
posted @ 2017-01-06 21:11 班尼 阅读(82) 评论(0) 推荐(0) 编辑