mahuatengBC 发表于 2013-8-27 11:32:39

用CI 框架代码无提示该怎么办?

这里所说的代码无提示是指在model 模型里面 当你设置了一个模型后
使用$this->db-> 后面的提示都没有,这个要怎么办才好?
<?
class News_model extends CI_Model
{
   public function __construct()
   {
           // 连接数据库
           $this->load->database();
   }

   // 取数据库记录

   public function get_news($slug=false)
   {
           // 如果没有where
           if($slug===false)
           {
                   $query=$this->db->get('news');
                   //返回结果集
                   return $query->result_array();
           }

           $query=$this->db->get_where('news',array("slug"=>$slug));
           return $query->row_array();
          
   }
   //想数据库插入数据
   public function set_news()
        {
          $this->load->helper('url');
          
          $slug = url_title($this->input->post('title'), 'dash', TRUE);
          
          $data = array(
                'title' => $this->input->post('title'),
                'slug' => $slug,
                'text' => $this->input->post('text')
          );
          
          return $this->db->insert('news', $data);
        }
          
}

?>
在使用$this 时,后面的方法什么的都没有提示么?难道都是要自己记住有什么方法吗?
我是用的DW 的编辑器,是不是需要什么插件么?
昨天又下载了 sublime text 2,发现也是一样,也是没有提示,请问大大们,这个问题是怎么解决的呢?

mahuatengBC 发表于 2013-8-27 11:33:10

各位大大们,帮帮忙哈!

kinwyb 发表于 2013-8-27 14:37:38

这个的确是没有提示的,可以用一些插件试试
参考下这帖子看看吧:http://codeigniter.org.cn/forums/thread-7982-1-1.html

浪迹天涯 发表于 2013-8-27 16:17:37

也可以参考这个帖子
http://codeigniter.org.cn/forums/thread-14013-1-1.html

muneo 发表于 2013-8-27 16:20:34

http://h5b.net/codeigniter-autocomplete/

qq907274532 发表于 2013-10-10 11:14:25

晕,换个编辑器呗
页: [1]
查看完整版本: 用CI 框架代码无提示该怎么办?