1.2 에서 1.3 으로 업그레이드

참고

이 페이지의 지침은 버전 1.2를 실행하고 있다고 가정합니다. 해당 버전으로 먼저 업그레이드하지 않은 경우, 먼저 업그레이드하세요.

업데이트를 수행하기 전에 index.php 파일을 정적 파일로 교체하여 사이트를 오프라인 상태로 만들어야 합니다.

Step 1: CodeIgniter 파일 업데이트

“system” 폴더에서 다음 디렉터리를 새 버전으로 교체합니다:

참고

이 폴더에 사용자 정의 파일이 있는 경우, 먼저 복사본을 만들어 두세요.

  • application/models/ (1.3 의 새 폴더)

  • codeigniter (1.3 의 새 폴더)

  • drivers

  • helpers

  • init

  • language

  • libraries

  • plugins

  • scaffolding

Step 2: 에러 파일 업데이트

버전 1.3에는 application/errors 에 두 개의 새 에러 템플릿이 있으며, 명명 일관성을 위해 다른 에러 템플릿의 이름이 변경되었습니다.

에러 템플릿을 사용자 정의하지 않은 경우 다음 폴더를 교체하세요:

  • application/errors/

에러 템플릿을 사용자 정의한 경우 다음과 같이 이름을 변경하세요:

  • 404.php = error_404.php

  • error.php = error_general.php

  • error_db.php (새 파일)

  • error_php.php (새 파일)

Step 3: index.php 파일 업데이트

루트에 있는 메인 index.php 파일을 여세요. 파일 맨 아래에서 다음을:

require_once BASEPATH.'libraries/Front_controller'.EXT;

다음으로 변경하세요:

require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;

Step 4: config.php 파일 업데이트

application/config/config.php 파일을 열고 다음 새 항목을 추가하세요:

/*
|------------------------------------------------
| URL suffix
|------------------------------------------------
|
| This option allows you to add a suffix to all URLs.
| For example, if a URL is this:
|
| example.com/index.php/products/view/shoes
|
| You can optionally add a suffix, like ".html",
| making the page appear to be of a certain type:
|
| example.com/index.php/products/view/shoes.html
|
*/
$config['url_suffix'] = "";


/*
|------------------------------------------------
| Enable Query Strings
|------------------------------------------------
|
| By default CodeIgniter uses search-engine and
| human-friendly segment based URLs:
|
| example.com/who/what/where/
|
| You can optionally enable standard query string
| based URLs:
|
| example.com?who=me&what=something&where=here
|
| Options are: TRUE or FALSE (boolean)
|
| The two other items let you set the query string "words"
| that will invoke your controllers and functions:
| example.com/index.php?c=controller&m=function
|
*/
$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';

Step 5: database.php 파일 업데이트

application/config/database.php 파일을 열고 다음 새 항목을 추가하세요:

$db['default']['dbprefix'] = "";
$db['default']['active_r'] = TRUE;

Step 6: 사용자 가이드 업데이트

로컬에 보유한 사용자 가이드도 새 버전으로 교체해 주세요.