만들면서 배우는 CodeIgniter Q&A

제목 질문드립니다.
글쓴이 보헤미안 작성시각 2015/01/08 01:16:46
댓글 : 3 추천 : 0 스크랩 : 0 조회수 : 11902   RSS
본문 챕터 3을 하고 있습니다. 결과물을 확인하고 싶은마음에 소스폴더를 복사해서 넣었더니 실행예제가 나왔습니다.

문제는

====================================================================
A PHP Error was encountered

Severity: Notice

Message: Only variable references should be returned by reference

Filename: core/Common.php

Line Number: 257
=======================================================================
라고 오류메세지가 뜨고 아래에 화면구성이 이루어 집니다.  오류내용을 바탕으로  core/common.php
를 까보니깐



if ( ! function_exists('get_config'))
{
    function &get_config($replace = array())
    {
        static $_config;

        if (isset($_config))
        {
            return $_config[0];
        }

        // Is the config file in the environment folder?
        if ( ! defined('ENVIRONMENT') OR ! file_exists($file_path = APPPATH.'config/'.ENVIRONMENT.'/config.php'))
        {
            $file_path = APPPATH.'config/config.php';
        }

        // Fetch the config file
        if ( ! file_exists($file_path))
        {
            exit('The configuration file does not exist.');
        }

        require($file_path);

        // Does the $config array exist in the file?
        if ( ! isset($config) OR ! is_array($config))
        {
            exit('Your config file does not appear to be formatted correctly.');
        }

        // Are any values being dynamically replaced?
        if (count($replace) > 0)
        {
            foreach ($replace as $key => $val)
            {
                if (isset($config[$key]))
                {
                    $config[$key] = $val;
                }
            }
        }

        return $_config[0] =& $config;
    }
}




=>  return $_config[0] =& $config; 이부분이 오류더군요  (257라인)


무엇때문에 이런 증상이 일어나는지 원인과 해결방법이 궁금합니다.
 다음글 A Database Error Occurred (3)
 이전글 80page쪽 만들고있는데...ㅠㅠ (1)

댓글

변종원(웅파) / 2015/01/08 11:22:20 / 추천 0
http://cikorea.net/tip/view/1748/page/1/ 참고하세요.

php 최신버전 혹은 높은(?) 버전에서 발생하는 문제입니다.
보헤미안 / 2015/01/08 11:54:24 / 추천 0
옙 감사합니다!! 확인해보겠습니다!!
보헤미안 / 2015/01/08 12:07:20 / 추천 0
수정했습니다


return $_config[0] =& $config;  에서

$_config[0] = & $config;
return $_config[0];

으로 바꿨습니다.  아 가입한지 얼마 안되서 잘 몰랐습니다. 방금전 쪽지를 확인했습니다 

다음부터는 조금더 신중하게 질문을 올리고 글들도 천천히 신중하게 봐야겠습니다 

강의자료실에서 한번 삽질했던터라 ^^;;;; 다들 좋은하루 보내세요