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