yangzailu

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

01 2017 档案

打印thinkphp中的sql语句
摘要:var_dump($repair->fetchSql(true)->where(array('cuername' =>$cuername))->order('applytime desc')->limit($page1*$listRows,$listRows)->select()); $list=$repair->where(array('cuername'=>$cuername))->or... 阅读全文

posted @ 2017-01-23 11:39 飞离地平线 阅读(1352) 评论(3) 推荐(0) 编辑

jquery点击导航栏选中更换样式
摘要:new document 首页 列表 内容 联系 关于 阅读全文

posted @ 2017-01-23 11:37 飞离地平线 阅读(719) 评论(0) 推荐(0) 编辑

怎么让div显示一行,其余的隐藏。
摘要: 阅读全文

posted @ 2017-01-23 11:30 飞离地平线 阅读(430) 评论(0) 推荐(0) 编辑

php字符集转换
摘要:PHP通过iconv将字符串从GBK转换为UTF8字符集。 1. iconv()介绍 iconv函数可以将一种已知的字符集文件转换成另一种已知的字符集文件。例如:从GB2312转换为UTF-8。 iconv函数在php5中内置,GB字符集默认打开。 2. iconv()错误 iconv在转换字符”— 阅读全文

posted @ 2017-01-23 11:25 飞离地平线 阅读(423) 评论(1) 推荐(1) 编辑

thinkphp更新数据库的时候where('')为字符串
摘要:thinkphp更新数据库的时候where('')为字符串,要么为数组。为字符串要点连接 阅读全文

posted @ 2017-01-21 16:49 飞离地平线 阅读(278) 评论(1) 推荐(0) 编辑

thinkphp分页
摘要:1.在thinkphp控制器类使用命名空间 2.把Page.class.php放入到该目录 3. 4.前台接收{$page} 5.css样式 6.class类已经上传 阅读全文

posted @ 2017-01-21 14:55 飞离地平线 阅读(190) 评论(1) 推荐(0) 编辑

怎么让textarea的光标靠左对齐
摘要:1.怎么让textarea的光标靠左对齐: 把<textarea></textarea>之间空隙去掉就可以了。 2.怎么限制textarea的字数,利用maxlength属性限制textarea的字数。 阅读全文

posted @ 2017-01-21 11:10 飞离地平线 阅读(1031) 评论(0) 推荐(0) 编辑

thinkphp传送文章id值
摘要: 阅读全文

posted @ 2017-01-21 10:31 飞离地平线 阅读(164) 评论(1) 推荐(0) 编辑

thinkphp session设置
摘要:<?php namespace Home\Controller; use think\Controller; /*登录*/ class LoginController extends PublicController { function __construct(){ parent::__const 阅读全文

posted @ 2017-01-20 16:42 飞离地平线 阅读(522) 评论(1) 推荐(0) 编辑

thinkphp 手机号和用户名同时登录
摘要://在注册时用户名不能是纯数字, 防止一个人的用户名和另一个人的手机号相同public function Login(){ if (IS_AJAX) { $username = I('param.username'); //var_dump($username); $password = I('param.p... 阅读全文

posted @ 2017-01-20 13:15 飞离地平线 阅读(527) 评论(1) 推荐(0) 编辑

checkbox
摘要:<span style="vertical-align: middle;"> <input type="checkbox" id="agree" checked="checked"/> <label for="agree"> </label> </span> 阅读全文

posted @ 2017-01-20 13:15 飞离地平线 阅读(314) 评论(0) 推荐(0) 编辑

thinkphp注册并写入数据到数据库中
摘要:后台接收数据并写入数据库: 阅读全文

posted @ 2017-01-19 19:57 飞离地平线 阅读(335) 评论(0) 推荐(0) 编辑

thinkphp怎么把数据库中的列的值存到下拉框中
摘要:1. 先去数据库中查值,查询整个数据表,结果为二维数组。 2.前台获取遍历 阅读全文

posted @ 2017-01-19 19:54 飞离地平线 阅读(378) 评论(0) 推荐(0) 编辑

ajax提交手机号去数据库验证并返回状态值
摘要:后台接收ajax的提交值,去数据库查询,并返回。 阅读全文

posted @ 2017-01-19 14:54 飞离地平线 阅读(417) 评论(1) 推荐(1) 编辑

div中嵌套div中使用margin-top失效问题
摘要:div中嵌套div中使用margin-top失效问题 阅读全文

posted @ 2017-01-18 15:58 飞离地平线 阅读(256) 评论(2) 推荐(0) 编辑

thinkphp点击导航变色
摘要:1.从该处进入导航页面,点击分贝进入点击的页面。 2.点击1处进入对应的导航栏,导航栏变色。 3.在1图图片点击跳转是给地址添加参数status。 4.在后台IndexController.class.php处接收status的值并赋值给前台。 5.前台用hidden值接收status的值 6.写j 阅读全文

posted @ 2017-01-18 11:10 飞离地平线 阅读(394) 评论(1) 推荐(1) 编辑

thinkphp I() 方法
摘要:I() 方法用于获取前台提交的表单的value值。 后台I方法获取: 阅读全文

posted @ 2017-01-17 19:06 飞离地平线 阅读(558) 评论(1) 推荐(0) 编辑

判断是手机端还是电脑端 isMobile()
摘要:1.在PublicController控制器中写好判断手机端方法。 2.在php控制器 IndexController.class.php中继承该方法: 3.在方法中调用并实例化: 阅读全文

posted @ 2017-01-17 11:18 飞离地平线 阅读(659) 评论(1) 推荐(1) 编辑

手机端H5 header定义样式
摘要:<meta content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/> 1. width=device-width width:可视区域的宽度,值可为数字或关 阅读全文

posted @ 2017-01-16 21:06 飞离地平线 阅读(3026) 评论(0) 推荐(0) 编辑

jquery开头
摘要:jQuery(function(){});jQuery().ready(function(){}); 绑定点击事件: jQuery('#temp').click(function() {}); $(document).ready(function(){ $("p").click(function(){ $(this).hide(); }); }); 阅读全文

posted @ 2017-01-16 17:42 飞离地平线 阅读(301) 评论(0) 推荐(0) 编辑

win7无声音显示“未插入扬声器或耳机” 怎么解决
摘要:不知道是否有用户朋友跟本人遇到这么一个情况,电脑不论是不是有插上耳机或者扬声器,在机箱前面和后面的耳机插孔处都试了好几遍,win8纯净版系统依旧没有声音。 这时候我们来看一下桌面右下角音量图标显示一个“X”符号,将鼠标移到音量图标处,发现系统上显示“未插入扬声器或耳机”。 起初打开了音量图标设置了一 阅读全文

posted @ 2017-01-16 17:33 飞离地平线 阅读(2974) 评论(0) 推荐(0) 编辑

xhtml头文件设置
摘要:设置字符集编码: "Shortcut Icon":shortcut icon,特指浏览器中地址栏左侧显示的图标,一般大小为16x16,后缀名为.icon;icon,指的是图标,格式可为PNG\GIF\JPEG,尺寸一般为16x16、24x24、36x36等。 阅读全文

posted @ 2017-01-13 11:18 飞离地平线 阅读(210) 评论(0) 推荐(0) 编辑

break和continue的区别
摘要:break和continue的区别 阅读全文

posted @ 2017-01-13 11:14 飞离地平线 阅读(254) 评论(1) 推荐(0) 编辑

php目录函数
摘要:1.创建 mkdir()mkdir(目录地址,权限模式,是否递归创建)默认不支持递归创建,用第三个参数true表示递归创建 2.删除目录 3.读取文件夹内容: 4.递归获取文件的目录内容 阅读全文

posted @ 2017-01-12 13:49 飞离地平线 阅读(267) 评论(1) 推荐(0) 编辑

mysql语法
摘要:查询数据表中某个字段的值: Select from where order by 1.创建数据库:create database 数据库名 【charset 数据编码名】 【collate 排序规则名】; 2.修改数据库:alter database 数据库名 【charset 新的数据编码名】 【collate 新的排序规则名】 3.删除数据库:drop data... 阅读全文

posted @ 2017-01-12 09:15 飞离地平线 阅读(245) 评论(0) 推荐(0) 编辑

php中怎么导入自己写的类
摘要:如果写的类是写在当前php文件内,就直接实例化若你的类写在其他的php文件里,就要先用include或require,将类文件引入<?php include("class.php");//将目标文件包含进来 $className = new Class();//将目标类实例化 $className- 阅读全文

posted @ 2017-01-11 16:20 飞离地平线 阅读(398) 评论(1) 推荐(0) 编辑

截取文件后缀名
摘要:<?php $str='yang.zai.lu.jpg'; echo strrchr($str,'.'); echo '<br>'; echo substr($str,strrpos($str,'.')); 阅读全文

posted @ 2017-01-10 09:53 飞离地平线 阅读(382) 评论(1) 推荐(0) 编辑

上传form表单
摘要:<form name="theForm" method="post" action="index.php?m=back&c=Goods&a=insert" enctype="multipart/form-data"> </form> 阅读全文

posted @ 2017-01-10 09:36 飞离地平线 阅读(241) 评论(0) 推荐(0) 编辑

创建商城数据表
摘要: 阅读全文

posted @ 2017-01-10 09:33 飞离地平线 阅读(286) 评论(0) 推荐(0) 编辑

ThinkPHP 模板substr的截取字符串函数
该文被密码保护。

posted @ 2017-01-07 10:53 飞离地平线 阅读(89) 评论(0) 推荐(0) 编辑

thinkphp数据的查询和截取
摘要:前端获取数据: thinkphp读取数据库数据: 阅读全文

posted @ 2017-01-07 10:15 飞离地平线 阅读(325) 评论(0) 推荐(0) 编辑

验证码展示
摘要:展示验证码 /*在模板html中,使用一个img标签,请求一个可以生成图像的SRC地址。 back/views/login.html 所请求的地址,还是一个控制器的动作方法!*/ /*在控制器中增加相应的动作 back/AdminController->captchaAction() 生成登录表单验证码 public function captchaActi... 阅读全文

posted @ 2017-01-06 11:40 飞离地平线 阅读(246) 评论(0) 推荐(0) 编辑

ecshop验证码
摘要:封装验证码工具类: 阅读全文

posted @ 2017-01-06 11:17 飞离地平线 阅读(842) 评论(0) 推荐(0) 编辑

修改session垃圾回收几率
摘要:<?php //修改session垃圾回收几率 ini_set('session.gc_probability','1'); ini_set('session.gc_divisor','2'); session_start(); //持久化,session-id和session数据区垃圾判断时间。 //一个小时有效的session-ID ini_set('session.cookie_lif... 阅读全文

posted @ 2017-01-06 10:48 飞离地平线 阅读(244) 评论(0) 推荐(0) 编辑

创建画布(验证码)
摘要:<?php //创建画布 $width = 500; $height = 800; $image=imagecreatetruecolor($width,$height); //var_dump($image); //处理画布 //imagecolorallocate() 分配颜色到画布上,选择一个颜色。 //分配颜色 $green=imagecolorallocate($image,0,255, 阅读全文

posted @ 2017-01-04 15:02 飞离地平线 阅读(313) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示