摘要: {pc:content action="category" catid="0" num="100" siteid="$siteid" order="listorder ASC"} {loop $data $k $r} {if $catid==$r[catid] || $top_parentid==$r[catid]} ... 阅读全文
posted @ 2017-03-12 22:09 刘冉 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 男 女 $(".sex").click(function(){ $(".sex").remove("checked");//移除checked属性 $(this).attr('checked','checked');//获取checked属性 }) 阅读全文
posted @ 2017-01-17 10:53 刘冉 阅读(3372) 评论(0) 推荐(0) 编辑
摘要: 这个是字符串的长度 $("#changdu").each(function(){ //限制字符个数 var length=5; if($(this).text().length>width)//判断字符串的长度是否大于限制的长度 { $(this).text($(this).text().substring(... 阅读全文
posted @ 2017-01-12 11:28 刘冉 阅读(1532) 评论(0) 推荐(0) 编辑
摘要: public function shangchuan() { $this->display(); } public function upload() { $uplode= new \Think\Upload();//造实例化对象:造一个上传文件的类 $uplode->maxSize="31457280";... 阅读全文
posted @ 2016-12-30 08:32 刘冉 阅读(5785) 评论(2) 推荐(0) 编辑
摘要: //显示主页面 //删除 public function shanchu($code) { $n=D("Nation"); $r=$n->delete($code);//掉用delete方法实现删除 if($r) { $url=U("zhuyemian");//通过U方法连接到主页面 $this-> 阅读全文
posted @ 2016-12-28 16:56 刘冉 阅读(542) 评论(0) 推荐(0) 编辑
摘要: //增 阅读全文
posted @ 2016-12-28 16:46 刘冉 阅读(158) 评论(0) 推荐(0) 编辑
摘要: <?phpnamespace Admin\Controller;use Think\Controller; class MainController extends Controller { 阅读全文
posted @ 2016-12-28 16:12 刘冉 阅读(2659) 评论(0) 推荐(0) 编辑
摘要: //制定命名空间在Home 模块下Model文件夹下 如:namespace Home\Model; //引用父类 如:use Think\Model; //实例化表 如:class ZhuCeModel extends Model{ protected $tablePrefix="";//表示表名 阅读全文
posted @ 2016-12-28 11:46 刘冉 阅读(429) 评论(0) 推荐(0) 编辑
摘要: //必须在Config命名为Config.php的php文件下写 阅读全文
posted @ 2016-12-28 09:51 刘冉 阅读(838) 评论(0) 推荐(0) 编辑
摘要: //实现验证页面 //调方法实现验证<?php 阅读全文
posted @ 2016-12-27 17:14 刘冉 阅读(3088) 评论(0) 推荐(0) 编辑