@$word = urldecode($this->post['word'] ? $this->post['word'] : $this->get[3])word   经过 urldecode编码 如果是post提交那么就  $this->post['word']  否则就  $this->get[3])对吗???如果对
那么$this->get[3]) 是啥意思  取前三个值吗??如果不对 
那是什么意思啊??

解决方案 »

  1.   

    如果$this->post['word']不为空就取$this->post['word'],否则取后者
      

  2.   

    GET返回的是数组,$this->get[3]就很容易理解了
      

  3.   

    如果 $this->post['word'] 存在,则对$this->post['word']解码,如果为假,也就是不存在的话,对$this->get[3] .
    你得参看这个类才能知道$this->get 是什么,反正不是取前三个值.
      

  4.   


    function onsearch() { 
            $navtitle = '搜索问题'; 
            $qstatus = $status = $this->get[2]; 
            (3 == $status) && ($qstatus = "1,2"); 
            @$word = urldecode($this->post['word'] ? $this->post['word'] : $this->get[3]);//
      

  5.   

    function onsearch() { 
            $navtitle = '搜索问题'; 
            $qstatus = $status = $this->get[2]; 
            (3 == $status) && ($qstatus = "1,2"); 
            @$word = urldecode($this->post['word'] ? $this->post['word'] : $this->get[3]);//
      

  6.   

    找到这个类里的get(xx) 看看代码....
      

  7.   

    还是没有上下文啊。。鬼才知道$this->post和 $this->get是怎么定义。。只有你自己知道!
      

  8.   


    function onsearch() {
            $navtitle = '搜索问题';
            $qstatus = $status = $this->get[2];
            (3 == $status) && ($qstatus = "1,2");
            @$word = urldecode($this->post['word'] ? $this->post['word'] : $this->get[3]);//这句话的意思
            empty($word) && $this->message("搜索关键!", 'BACK');
            $encodeword = urlencode($word);        @$page = max(1, intval($this->get[4]));
            $pagesize = $this->setting['list_default']; 
            $startindex = ($page - 1) * $pagesize; //每页面显示25条
            $rownum = $_ENV['question']->search_title_num($word, $qstatus); //获取总的记录数  
            $questionlist = $_ENV['question']->search_title($word, $qstatus, $startindex, $pagesize); //问题列表数据  
            $departstr = page($rownum, $pagesize, $page, "question/search/$status/$word"); //得到分页字符串
           
            $this->load('setting');
                    $wordslist = unserialize($this->setting['hot_words']);
            
            include template('search');;
        }
      

  9.   

    function onsearch() {
            $navtitle = '搜索问题';
            $qstatus = $status = $this->get[2];
            (3 == $status) && ($qstatus = "1,2");
            @$word = urldecode($this->post['word'] ? $this->post['word'] : $this->get[3]);//这句话的意思
            empty($word) && $this->message("搜索关键!", 'BACK');
            $encodeword = urlencode($word);        @$page = max(1, intval($this->get[4]));
            $pagesize = $this->setting['list_default']; 
            $startindex = ($page - 1) * $pagesize; //每页面显示25条
            $rownum = $_ENV['question']->search_title_num($word, $qstatus); //获取总的记录数  
            $questionlist = $_ENV['question']->search_title($word, $qstatus, $startindex, $pagesize); //问题列表数据  
            $departstr = page($rownum, $pagesize, $page, "question/search/$status/$word"); //得到分页字符串
           
            $this->load('setting');
                    $wordslist = unserialize($this->setting['hot_words']);
            
            include template('search');;
        }
      

  10.   

    function onsearch() {
            $navtitle = '搜索问题';
            $qstatus = $status = $this->get[2];
            (3 == $status) && ($qstatus = "1,2");
            @$word = urldecode($this->post['word'] ? $this->post['word'] : $this->get[3]);//这句话的意思
            empty($word) && $this->message("搜索关键!", 'BACK');
            $encodeword = urlencode($word);        @$page = max(1, intval($this->get[4]));
            $pagesize = $this->setting['list_default']; 
            $startindex = ($page - 1) * $pagesize; //每页面显示25条
            $rownum = $_ENV['question']->search_title_num($word, $qstatus); //获取总的记录数  
            $questionlist = $_ENV['question']->search_title($word, $qstatus, $startindex, $pagesize); //问题列表数据  
            $departstr = page($rownum, $pagesize, $page, "question/search/$status/$word"); //得到分页字符串
           
            $this->load('setting');
                    $wordslist = unserialize($this->setting['hot_words']);
            
            include template('search');;
        }
      

  11.   

    请找到定义这个类的get方法
    我估计是如果没有post就认为是get传过来的值,取得出去域名后的第3个参数的值(有点像ci)