php中遇到这个问题,是怎么回事,哪儿有问题?
怎么解决

解决方案 »

  1.   

    function comment_count( $count ) {
            if ( ! is_admin() ) {
                    global $id;
                    $comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));
                    return count($comments_by_type['comment']);
            } else {
                    return $count;
            }
    }我用的是wordpress程序,装了一个皮肤之后出现的这个错误,提示是  $comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));这行有问题?
    我服务器上的php版本为4.4.9
      

  2.   

    那要看你的 separate_comments 函数是如何写的了
      

  3.   

    给你重现下问题,你就明白了
    ===================================
    function &b(&$a)//因为形参指明了传递引用
    {
    return $a=2;
    }
    $x = 1;
    $a = &b($x);//实参为变量,传递引用
    echo $x;//2
    //以下会出错
    $a = &b(1);//实参为值会出错,无法传递引用
      

  4.   

    知道这个问题了,是mysql版本的问题,版本太低导致的