随笔分类 -  ci框架开发笔记

摘要:redirect('home/play/index'); 阅读全文
posted @ 2014-09-26 11:46 麦田守望者~ 阅读(171) 评论(0) 推荐(0) 编辑
摘要:" method="post" > 项目 状态 类型/数量 单价 ... 阅读全文
posted @ 2014-09-25 12:54 麦田守望者~ 阅读(384) 评论(0) 推荐(0) 编辑
摘要:1 #ci cookie 由于不能存放数组,所有必须序列化之后在存入数组中 2 3 #定义数组 4 $cookie_array=array( 5 'shop_id'=>$gid, 6 'shop_name'=>$... 阅读全文
posted @ 2014-09-22 14:12 麦田守望者~ 阅读(329) 评论(0) 推荐(0) 编辑
摘要:1.修改CodeIgniter/index.php,添加如下:define('ROOTDIR',dirname(__FILE__).'/');2.修改CodeIgniter/application/config/config.php,如下:$config['log_threshold'] = 1;$... 阅读全文
posted @ 2014-09-15 15:11 麦田守望者~ 阅读(1663) 评论(0) 推荐(0) 编辑
摘要:今天用CI框架整合微信发现了一个没见过的 file_get_contents('php://input'); 这个家伙是干嘛用的,然后自己直接写了验证的代码。好吧 废话不多说直接看下面的代码。";echo var_dump($_POST) . "";echo "-------php://input-... 阅读全文
posted @ 2014-09-15 14:52 麦田守望者~ 阅读(2345) 评论(0) 推荐(0) 编辑
摘要:1 因为CI 是外国的框架。购物逻辑和中国的不一样。所以需要改进ci 框架的 cart 类; 2 3 4 5 (1)先把 cart类拷贝一份到application/libaries/下 6 7 8 9 (2)因为cart中购车中的商品名称不支持中文,所以对于我们中国人来说,是一... 阅读全文
posted @ 2014-09-11 00:14 麦田守望者~ 阅读(631) 评论(0) 推荐(0) 编辑
摘要:1 $("#em").bind({ 2 focus:function(){ 3 var val=$(this).val(); 4 if(val==""){ 5 ... 阅读全文
posted @ 2014-08-25 23:33 麦田守望者~ 阅读(250) 评论(0) 推荐(0) 编辑
摘要:" onclick= this.src=""+Math.random() /> 阅读全文
posted @ 2014-08-21 23:09 麦田守望者~ 阅读(330) 评论(0) 推荐(0) 编辑
摘要:http://localhost/ci_tuangou/index.php/home/index/index?gid=2echo 'gid='. $this->input->get('gid');结果:gid=2 阅读全文
posted @ 2014-08-15 09:09 麦田守望者~ 阅读(362) 评论(0) 推荐(0) 编辑
摘要:var_dump($_SERVER); 阅读全文
posted @ 2014-08-14 16:58 麦田守望者~ 阅读(275) 评论(0) 推荐(0) 编辑
摘要:CI默认过滤了$_GET需要传递get参数时一般直接 /参数一/参数二详见手册说明:http://codeigniter.org.cn/user_guide/general/controllers.html#passinguri但是有时候需要传递很长的复杂的url,比如常用的 backURL=htt... 阅读全文
posted @ 2014-08-14 16:52 麦田守望者~ 阅读(194) 评论(0) 推荐(0) 编辑
摘要:1234$str_tag="";$s=$_POST['goods_server_name'];for($i=0;$i<count($s);$i++){ if($i==0){ $str_tag = $s[$i]; }else{ $str_tag = $str_tag .",".$s[$... 阅读全文
posted @ 2014-08-14 15:16 麦田守望者~ 阅读(370) 评论(0) 推荐(0) 编辑
摘要:#显示列表 public function index(){ //载入分页类 $this->load->library('pagination'); //每页显示的条数 $perPage=11; /****配置分页**... 阅读全文
posted @ 2014-08-14 11:05 麦田守望者~ 阅读(448) 评论(0) 推荐(0) 编辑
摘要:方法一:$this->db->query("sql 语句"); 直接写sql语句方法二: #多表关联查询 $data=$this->db->from('goods') ->join('shop','shop.shopid=goods.shopid') ... 阅读全文
posted @ 2014-08-14 10:57 麦田守望者~ 阅读(5315) 评论(0) 推荐(0) 编辑
摘要:$this->db->insert('goods',$data); $gid=$this->db->insert_id('goods');return $gid; 阅读全文
posted @ 2014-08-13 17:46 麦田守望者~ 阅读(1222) 评论(0) 推荐(0) 编辑
摘要:今天发现了一个特郁闷的事情,在调用百度编辑的时,window.UEDITOR_HOME_URL = "";window.onload = function(){ window.UEDITOR_CONFIG.initialFrameWidth = 600; window.UEDITOR_CONFIG.... 阅读全文
posted @ 2014-08-13 14:49 麦田守望者~ 阅读(246) 评论(0) 推荐(0) 编辑
摘要:Allowed memory size of 134217728 bytes exhausted (tried to allocate 261904 bytes) in 允许的内存大小为134217728字节用尽(试图分配261904字节) 这样说明出现了死循环或者内存不够用,查看php.... 阅读全文
posted @ 2014-08-12 11:07 麦田守望者~ 阅读(200) 评论(0) 推荐(0) 编辑
摘要:说明自己没有给session 加密 ,在配置文件config中 $config['encryption_key'] = '2rf3f3fwefwefwef2'; 阅读全文
posted @ 2014-07-30 15:29 麦田守望者~ 阅读(248) 评论(0) 推荐(0) 编辑
摘要:出现这样的错误时说明自己忘记加载数据库了, application/config/aotuload.php $autoload['libraries'] = array('database'); 阅读全文
posted @ 2014-07-29 17:40 麦田守望者~ 阅读(577) 评论(0) 推荐(0) 编辑
摘要:#根据ID来更新一个商品 public function byid_update(){ #获取页面传过来的id $id=$this->uri->segment(4); #根据id来查询出当前分类的子分类 $childs=$this->Category->by... 阅读全文
posted @ 2014-04-15 16:02 麦田守望者~ 阅读(116) 评论(0) 推荐(0) 编辑

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