├── .drone.yml
├── .editorconfig
├── .gitignore
├── Makefile
├── README.md
├── cilexer
├── README
├── cilexer
│ ├── __init__.py
│ └── cilexer.py
└── setup.py
└── source
├── DCO.rst
├── _themes
└── sphinx_rtd_theme
│ ├── LICENSE
│ ├── __init__.py
│ ├── breadcrumbs.html
│ ├── footer.html
│ ├── layout.html
│ ├── layout_old.html
│ ├── search.html
│ ├── searchbox.html
│ ├── static
│ ├── css
│ │ ├── badge_only.css
│ │ └── theme.css
│ ├── fonts
│ │ ├── FontAwesome.otf
│ │ ├── fontawesome-webfont.eot
│ │ ├── fontawesome-webfont.svg
│ │ ├── fontawesome-webfont.ttf
│ │ └── fontawesome-webfont.woff
│ └── js
│ │ └── theme.js
│ ├── theme.conf
│ └── versions.html
├── changelog.rst
├── conf.py
├── contributing
└── index.rst
├── database
├── caching.rst
├── call_function.rst
├── configuration.rst
├── connecting.rst
├── db_driver_reference.rst
├── examples.rst
├── forge.rst
├── helpers.rst
├── index.rst
├── metadata.rst
├── queries.rst
├── query_builder.rst
├── results.rst
├── transactions.rst
└── utilities.rst
├── documentation
├── ELDocs.tmbundle.zip
└── index.rst
├── general
├── alternative_php.rst
├── ancillary_classes.rst
├── autoloader.rst
├── caching.rst
├── cli.rst
├── common_functions.rst
├── compatibility_functions.rst
├── controllers.rst
├── core_classes.rst
├── creating_drivers.rst
├── creating_libraries.rst
├── credits.rst
├── drivers.rst
├── environments.rst
├── errors.rst
├── helpers.rst
├── hooks.rst
├── index.rst
├── libraries.rst
├── managing_apps.rst
├── models.rst
├── profiling.rst
├── requirements.rst
├── reserved_names.rst
├── routing.rst
├── security.rst
├── styleguide.rst
├── urls.rst
├── views.rst
└── welcome.rst
├── helpers
├── array_helper.rst
├── captcha_helper.rst
├── cookie_helper.rst
├── date_helper.rst
├── directory_helper.rst
├── download_helper.rst
├── email_helper.rst
├── file_helper.rst
├── form_helper.rst
├── html_helper.rst
├── index.rst
├── inflector_helper.rst
├── language_helper.rst
├── number_helper.rst
├── path_helper.rst
├── security_helper.rst
├── smiley_helper.rst
├── string_helper.rst
├── text_helper.rst
├── typography_helper.rst
├── url_helper.rst
└── xml_helper.rst
├── images
├── appflowchart.gif
├── arrow.gif
├── ci-icon.ico
├── ci_logo.jpg
├── ci_logo_flame.jpg
├── file.gif
├── folder.gif
└── smile.gif
├── index.rst
├── installation
├── downloads.rst
├── index.rst
├── troubleshooting.rst
├── upgrade_120.rst
├── upgrade_130.rst
├── upgrade_131.rst
├── upgrade_132.rst
├── upgrade_133.rst
├── upgrade_140.rst
├── upgrade_141.rst
├── upgrade_150.rst
├── upgrade_152.rst
├── upgrade_153.rst
├── upgrade_154.rst
├── upgrade_160.rst
├── upgrade_161.rst
├── upgrade_162.rst
├── upgrade_163.rst
├── upgrade_170.rst
├── upgrade_171.rst
├── upgrade_172.rst
├── upgrade_200.rst
├── upgrade_201.rst
├── upgrade_202.rst
├── upgrade_203.rst
├── upgrade_210.rst
├── upgrade_211.rst
├── upgrade_212.rst
├── upgrade_213.rst
├── upgrade_214.rst
├── upgrade_220.rst
├── upgrade_221.rst
├── upgrade_222.rst
├── upgrade_223.rst
├── upgrade_300.rst
├── upgrade_301.rst
├── upgrade_302.rst
├── upgrade_303.rst
├── upgrade_304.rst
├── upgrade_305.rst
├── upgrade_306.rst
├── upgrade_310.rst
├── upgrade_311.rst
├── upgrade_312.rst
├── upgrade_313.rst
├── upgrade_314.rst
├── upgrade_315.rst
├── upgrade_316.rst
├── upgrade_b11.rst
└── upgrading.rst
├── libraries
├── benchmark.rst
├── caching.rst
├── calendar.rst
├── cart.rst
├── config.rst
├── email.rst
├── encrypt.rst
├── encryption.rst
├── file_uploading.rst
├── form_validation.rst
├── ftp.rst
├── image_lib.rst
├── index.rst
├── input.rst
├── javascript.rst
├── language.rst
├── loader.rst
├── migration.rst
├── output.rst
├── pagination.rst
├── parser.rst
├── security.rst
├── sessions.rst
├── table.rst
├── trackback.rst
├── typography.rst
├── unit_testing.rst
├── uri.rst
├── user_agent.rst
├── xmlrpc.rst
└── zip.rst
├── license.rst
├── overview
├── appflow.rst
├── at_a_glance.rst
├── features.rst
├── getting_started.rst
├── goals.rst
├── index.rst
└── mvc.rst
└── tutorial
├── conclusion.rst
├── create_news_items.rst
├── index.rst
├── news_section.rst
└── static_pages.rst
/.drone.yml:
--------------------------------------------------------------------------------
1 | clone:
2 | git:
3 | image: plugins/git
4 | depth: 50
5 | tags: true
6 |
7 | pipeline:
8 | build:
9 | image: appleboy/codeigniter-docs
10 | pull: true
11 | commands:
12 | - locale
13 | - make pygments
14 | - make html
15 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # unifying the coding style for different editors and IDEs => editorconfig.org
2 |
3 | ; indicate this is the root of the project
4 | root = true
5 |
6 | ###########################################################
7 | ; common
8 | ###########################################################
9 |
10 | [*]
11 | charset = utf-8
12 |
13 | end_of_line = LF
14 | insert_final_newline = true
15 | trim_trailing_whitespace = true
16 |
17 | indent_style = space
18 | indent_size = 2
19 |
20 | ###########################################################
21 | ; make
22 | ###########################################################
23 |
24 | [Makefile]
25 | indent_style = tab
26 |
27 | [makefile]
28 | indent_style = tab
29 |
30 | ###########################################################
31 | ; markdown
32 | ###########################################################
33 |
34 | [*.md]
35 | trim_trailing_whitespace = false
36 |
37 | ###########################################################
38 | ; golang
39 | ###########################################################
40 |
41 | [*.go]
42 | indent_style = tab
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | .idea/
3 | cilexer/dist
4 | cilexer/pycilexer.egg-info
5 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CodeIgniter 台灣繁體中文文件
2 |
3 | ## 翻譯準則
4 |
5 | 繁體中文翻譯請遵守 [Chinese Copywriting Guidelines](https://github.com/sparanoid/chinese-copywriting-guidelines)。
6 |
7 | * [線上翻譯手冊 2](http://codeigniter.org.tw/user_guide/)
8 | * [線上翻譯手冊 3](http://codeigniter.org.tw/userguide3/)
9 |
10 | ## 尚未翻譯列表
11 |
12 | 一般主題
13 |
14 | * [x] PHP Style Guide
15 |
16 | 函示庫
17 |
18 | * [x] Benchmarking Class
19 | * [x] Caching Driver
20 | * [x] Calendaring Class
21 | * [x] Shopping Cart Class
22 | * [x] Config Class
23 | * [x] Email Class
24 | * [ ] Encrypt Class
25 | * [ ] Encryption Library
26 | * [ ] File Uploading Class
27 | * [ ] Form Validation
28 | * [ ] FTP Class
29 | * [ ] Image Manipulation Class
30 | * [ ] Input Class
31 | * [ ] Javascript Class
32 | * [ ] Language Class
33 | * [ ] Loader Class
34 | * [ ] Migrations Class
35 | * [ ] Output Class
36 | * [ ] Pagination Class
37 | * [ ] Template Parser Class
38 | * [ ] Security Class
39 | * [ ] Session Driver
40 | * [x] HTML Table Class
41 | * [x] Trackback Class
42 | * [x] Typography Class
43 | * [x] Unit Testing Class
44 | * [x] URI Class
45 | * [x] User Agent Class
46 | * [x] XML-RPC and XML-RPC Server Classes
47 | * [x] Zip Encoding Class
48 |
49 | 資料庫
50 |
51 | * [x] 查詢補助函式
52 | * [x] 查詢生成器類別
53 | * [ ] 交易
54 | * [ ] 取得資料表資訊
55 | * [ ] 自訂函數
56 | * [ ] 查詢快取
57 | * [ ] 使用 Database Forge 管理資料庫
58 | * [ ] Database Utilities 類別
59 | * [ ] Database Driver 參考
60 |
61 | 補助函式
62 |
63 | * [x] Array Helper
64 | * [x] CAPTCHA Helper
65 | * [x] Cookie Helper
66 | * [x] Date Helper
67 | * [ ] Directory Helper
68 | * [ ] Download Helper
69 | * [ ] Email Helper
70 | * [ ] File Helper
71 | * [ ] Form Helper
72 | * [ ] HTML Helper
73 | * [ ] Inflector Helper
74 | * [x] Language Helper
75 | * [ ] Number Helper
76 | * [ ] Path Helper
77 | * [ ] Security Helper
78 | * [ ] Smiley Helper
79 | * [ ] String Helper
80 | * [ ] Text Helper
81 | * [ ] Typography Helper
82 | * [ ] URL Helper
83 | * [ ] XML Helper
84 |
85 | 貢獻翻譯
86 |
87 | * [ ] Writing CodeIgniter Documentation
88 | * [ ] Developer’s Certificate of Origin 1.1
89 |
--------------------------------------------------------------------------------
/cilexer/README:
--------------------------------------------------------------------------------
1 | To install the CodeIgniter Lexer to Pygments, run:
2 |
3 | sudo python setup.py install
4 |
5 | Confirm with
6 |
7 | pygmentize -L
8 |
9 |
10 | You should see in the lexer output:
11 |
12 | * ci, codeigniter:
13 | CodeIgniter (filenames *.html, *.css, *.php, *.xml, *.static)
14 |
15 | You will need to run setup.py and install the cilexer package anytime after cilexer/cilexer.py is updated
16 |
17 | NOTE: Depending on how you installed Sphinx and Pygments,
18 | you may be installing to the wrong version.
19 | If you need to install to a different version of python
20 | specify its path when using setup.py, e.g.:
21 |
22 | sudo /usr/bin/python2.5 setup.py install
--------------------------------------------------------------------------------
/cilexer/cilexer/__init__.py:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/cilexer/cilexer/cilexer.py:
--------------------------------------------------------------------------------
1 | # CodeIgniter
2 | # https://codeigniter.com
3 | # # An open source application development framework for PHP
4 | #
5 | # This content is released under the MIT License (MIT)
6 | #
7 | # Copyright (c) 2014 - 2016, British Columbia Institute of Technology
8 | #
9 | # Permission is hereby granted, free of charge, to any person obtaining a copy
10 | # of this software and associated documentation files (the "Software"), to deal
11 | # in the Software without restriction, including without limitation the rights
12 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | # copies of the Software, and to permit persons to whom the Software is
14 | # furnished to do so, subject to the following conditions:
15 | #
16 | # The above copyright notice and this permission notice shall be included in
17 | # all copies or substantial portions of the Software.
18 | #
19 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | # THE SOFTWARE.
26 | #
27 | # Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
28 | # Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
29 | #
30 | # http://opensource.org/licenses/MIT MIT License
31 |
32 | import re
33 | import copy
34 |
35 | from pygments.lexer import DelegatingLexer
36 | from pygments.lexers.web import PhpLexer, HtmlLexer
37 |
38 | __all__ = ['CodeIgniterLexer']
39 |
40 |
41 | class CodeIgniterLexer(DelegatingLexer):
42 | """
43 | Handles HTML, PHP, JavaScript, and CSS is highlighted
44 | PHP is highlighted with the "startline" option
45 | """
46 |
47 | name = 'CodeIgniter'
48 | aliases = ['ci', 'codeigniter']
49 | filenames = ['*.html', '*.css', '*.php', '*.xml', '*.static']
50 | mimetypes = ['text/html', 'application/xhtml+xml']
51 |
52 | def __init__(self, **options):
53 | super(CodeIgniterLexer, self).__init__(HtmlLexer,
54 | PhpLexer,
55 | startinline=True)
56 |
--------------------------------------------------------------------------------
/cilexer/setup.py:
--------------------------------------------------------------------------------
1 | """
2 | Install and setup CodeIgniter highlighting for Pygments.
3 | """
4 |
5 | from setuptools import setup
6 |
7 | entry_points = """
8 | [pygments.lexers]
9 | cilexer = cilexer.cilexer:CodeIgniterLexer
10 | """
11 |
12 | setup(
13 | name='pycilexer',
14 | version='0.1',
15 | description=__doc__,
16 | author="EllisLab, Inc.",
17 | packages=['cilexer'],
18 | install_requires=(
19 | 'sphinx >= 1.0.7',
20 | 'sphinxcontrib-phpdomain >= 0.1.3-1'
21 | ),
22 | entry_points=entry_points
23 | )
24 |
--------------------------------------------------------------------------------
/source/DCO.rst:
--------------------------------------------------------------------------------
1 | #####################################
2 | Developer's Certificate of Origin 1.1
3 | #####################################
4 |
5 | By making a contribution to this project, I certify that:
6 |
7 | (1) The contribution was created in whole or in part by me and I
8 | have the right to submit it under the open source license
9 | indicated in the file; or
10 |
11 | (2) The contribution is based upon previous work that, to the best
12 | of my knowledge, is covered under an appropriate open source
13 | license and I have the right under that license to submit that
14 | work with modifications, whether created in whole or in part
15 | by me, under the same open source license (unless I am
16 | permitted to submit under a different license), as indicated
17 | in the file; or
18 |
19 | (3) The contribution was provided directly to me by some other
20 | person who certified (1), (2) or (3) and I have not modified
21 | it.
22 |
23 | (4) I understand and agree that this project and the contribution
24 | are public and that a record of the contribution (including all
25 | personal information I submit with it, including my sign-off) is
26 | maintained indefinitely and may be redistributed consistent with
27 | this project or the open source license(s) involved.
28 |
--------------------------------------------------------------------------------
/source/_themes/sphinx_rtd_theme/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Dave Snider
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/source/_themes/sphinx_rtd_theme/__init__.py:
--------------------------------------------------------------------------------
1 | """Sphinx ReadTheDocs theme.
2 |
3 | From https://github.com/ryan-roemer/sphinx-bootstrap-theme.
4 |
5 | """
6 | import os
7 |
8 | VERSION = (0, 1, 5)
9 |
10 | __version__ = ".".join(str(v) for v in VERSION)
11 | __version_full__ = __version__
12 |
13 |
14 | def get_html_theme_path():
15 | """Return list of HTML theme paths."""
16 | cur_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
17 | return cur_dir
18 |
--------------------------------------------------------------------------------
/source/_themes/sphinx_rtd_theme/breadcrumbs.html:
--------------------------------------------------------------------------------
1 |
您的搜尋沒有符合使用手冊當中的資料。請確定您沒有輸入錯別字,並且已經選擇了足夠的類別。
35 | {% endif %} 36 | {% endif %} 37 |{{ context|e }}
44 |tags. 59 | This function is identical to the native PHP ``nl2br()`` function, 60 | except that it ignorestags. 61 | 62 | Usage example:: 63 | 64 | $string = nl2br_except_pre($string); 65 | 66 | .. php:function:: entity_decode($str, $charset = NULL) 67 | 68 | :param string $str: Input string 69 | :param string $charset: Character set 70 | :returns: String with decoded HTML entities 71 | :rtype: string 72 | 73 | This function is an alias for ``CI_Security::entity_decode()``. 74 | Fore more info, please see the :doc:`Security Library 75 | <../libraries/security>` documentation. 76 | -------------------------------------------------------------------------------- /source/helpers/xml_helper.rst: -------------------------------------------------------------------------------- 1 | ########## 2 | XML 輔助函式 3 | ########## 4 | 5 | XML 輔助函式包含了各種處理 XML 的相關函式。 6 | 7 | .. contents:: 8 | :local: 9 | 10 | .. raw:: html 11 | 12 | 13 | 14 | Loading this Helper 15 | =================== 16 | 17 | This helper is loaded using the following code 18 | 19 | :: 20 | 21 | $this->load->helper('xml'); 22 | 23 | Available Functions 24 | =================== 25 | 26 | The following functions are available: 27 | 28 | .. php:function:: xml_convert($str[, $protect_all = FALSE]) 29 | 30 | :param string $str: the text string to convert 31 | :param bool $protect_all: Whether to protect all content that looks like a potential entity instead of just numbered entities, e.g. &foo; 32 | :returns: XML-converted string 33 | :rtype: string 34 | 35 | Takes a string as input and converts the following reserved XML 36 | characters to entities: 37 | 38 | - Ampersands: & 39 | - Less than and greater than characters: < > 40 | - Single and double quotes: ' " 41 | - Dashes: - 42 | 43 | This function ignores ampersands if they are part of existing numbered 44 | character entities, e.g. {. Example:: 45 | 46 | $string = 'Here is a paragraph & an entity ({).
'; 47 | $string = xml_convert($string); 48 | echo $string; 49 | 50 | outputs: 51 | 52 | .. code-block:: html 53 | 54 | <p>Here is a paragraph & an entity ({).</p> 55 | -------------------------------------------------------------------------------- /source/images/appflowchart.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeIgniter-TW/CodeIgniter-UserGuide/282470ad4c0d53e3ef8e6d8dd334787a2270fc7b/source/images/appflowchart.gif -------------------------------------------------------------------------------- /source/images/arrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeIgniter-TW/CodeIgniter-UserGuide/282470ad4c0d53e3ef8e6d8dd334787a2270fc7b/source/images/arrow.gif -------------------------------------------------------------------------------- /source/images/ci-icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeIgniter-TW/CodeIgniter-UserGuide/282470ad4c0d53e3ef8e6d8dd334787a2270fc7b/source/images/ci-icon.ico -------------------------------------------------------------------------------- /source/images/ci_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeIgniter-TW/CodeIgniter-UserGuide/282470ad4c0d53e3ef8e6d8dd334787a2270fc7b/source/images/ci_logo.jpg -------------------------------------------------------------------------------- /source/images/ci_logo_flame.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeIgniter-TW/CodeIgniter-UserGuide/282470ad4c0d53e3ef8e6d8dd334787a2270fc7b/source/images/ci_logo_flame.jpg -------------------------------------------------------------------------------- /source/images/file.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeIgniter-TW/CodeIgniter-UserGuide/282470ad4c0d53e3ef8e6d8dd334787a2270fc7b/source/images/file.gif -------------------------------------------------------------------------------- /source/images/folder.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeIgniter-TW/CodeIgniter-UserGuide/282470ad4c0d53e3ef8e6d8dd334787a2270fc7b/source/images/folder.gif -------------------------------------------------------------------------------- /source/images/smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeIgniter-TW/CodeIgniter-UserGuide/282470ad4c0d53e3ef8e6d8dd334787a2270fc7b/source/images/smile.gif -------------------------------------------------------------------------------- /source/index.rst: -------------------------------------------------------------------------------- 1 | #################### 2 | CodeIgniter 使用手冊 3 | #################### 4 | 5 | - :doc:`許可協議` 6 | - :doc:`版本紀錄 ` 7 | 8 | .. contents:: 9 | :local: 10 | :depth: 2 11 | 12 | **** 13 | 歡迎 14 | **** 15 | 16 | .. toctree:: 17 | :titlesonly: 18 | 19 | general/welcome 20 | 21 | ******** 22 | 基本資訊 23 | ******** 24 | 25 | - :doc:`general/requirements` 26 | - :doc:`general/credits` 27 | 28 | **** 29 | 安裝 30 | **** 31 | .. toctree:: 32 | :includehidden: 33 | :maxdepth: 2 34 | :titlesonly: 35 | 36 | installation/index 37 | 38 | **** 39 | 簡介 40 | **** 41 | 42 | .. toctree:: 43 | :titlesonly: 44 | 45 | overview/index 46 | 47 | ******** 48 | 指導手冊 49 | ******** 50 | 51 | .. toctree:: 52 | :includehidden: 53 | :titlesonly: 54 | 55 | tutorial/index 56 | 57 | ******** 58 | 一般主題 59 | ******** 60 | 61 | .. toctree:: 62 | :glob: 63 | :titlesonly: 64 | 65 | general/index 66 | 67 | ******** 68 | 類別參考 69 | ******** 70 | 71 | .. toctree:: 72 | :glob: 73 | :titlesonly: 74 | 75 | libraries/index 76 | 77 | ********** 78 | 資料庫參考 79 | ********** 80 | 81 | .. toctree:: 82 | :glob: 83 | :titlesonly: 84 | 85 | database/index 86 | 87 | ************ 88 | 輔助函式 89 | ************ 90 | 91 | .. toctree:: 92 | :glob: 93 | :titlesonly: 94 | 95 | helpers/index 96 | 97 | **************** 98 | 貢獻 CodeIgniter 99 | **************** 100 | 101 | .. toctree:: 102 | :glob: 103 | :titlesonly: 104 | 105 | contributing/index 106 | 107 | .. toctree:: 108 | :glob: 109 | :titlesonly: 110 | :hidden: 111 | 112 | * 113 | overview/index 114 | general/requirements 115 | general/welcome 116 | installation/index 117 | general/index 118 | libraries/index 119 | database/index 120 | helpers/index 121 | tutorial/index 122 | general/credits 123 | -------------------------------------------------------------------------------- /source/installation/index.rst: -------------------------------------------------------------------------------- 1 | ######################### 2 | 安裝指引 3 | ######################### 4 | 5 | CodeIgniter 安裝分 4 個部份: 6 | 7 | #. 解壓縮下載個安裝包。 8 | #. 上傳 Codeigniter 的目錄以及檔案到你的 Server,一般來說 *index.php* 會在 Server 的根目錄。 9 | #. 用文字編輯器或開發工具打開 *application/config/config.php* 然後設定你的 base URL。如果你想要設定 encryption 或 sessions,那就設定 encryption key。 10 | #. 如果你想要用 database,請打開 *application/config/database.php* 檔案,然後設定你的 database 設定。 11 | 12 | 如果你想要增加安全性以及隱藏 Codeigniter 的目錄位置,你可以重新命名 system 目錄以及 application 目錄。 13 | 如果你重新命名它們,你必須打開根目錄的 *index.php* 檔案然後設定 ``$system_path`` 以及 ``$application_folder`` 變數,改成你所改變目錄的名稱。 14 | 15 | 至於最安全的方法,讓放在 web 根目錄上的 system 以及所有 application 目錄,移動到瀏覽器無法直接存取的位置。 16 | 預設的方法是 *.htaccess* 檔案放在所有的資料夾來避免直接存取,如果 Server 設定不支持 *.htaccess*,那麼最好的方法還是把它們從公開存取的資料夾移走。 17 | 18 | 如果你想要保持你的 views 資料夾公開的,那麼也可能地請把它從 application 資料夾移出。 19 | 20 | 移開它們之後,請到根目錄修改 index.php 檔案以及設定 ``$system_path``、``$application_folder``、``$view_folder`` 變數,最好是完整的路徑,像是'*/www/MyUser/system*'。 21 | 22 | 除此之外一個額外的 production environments(在根目錄的index.php)預設是取消 PHP 錯誤訊息以及取消所有只允許開發者使用的功能。 23 | 可以在 CodeIgniter 中,通過設定 ``ENVIRONMENT`` 變數來達成,這裡有完整的描述 :doc:`security 24 | page <../general/security>`. 25 | 26 | 就這樣! 27 | 28 | 如果你是初學 CodeIgniter,請閱讀 :doc:`Getting 29 | Started <../overview/getting_started>` 章節,來開始學習如何建立一個動態的 PHP 應用程式。享受它吧! 30 | 31 | .. toctree:: 32 | :hidden: 33 | :titlesonly: 34 | 35 | downloads 36 | self 37 | upgrading 38 | troubleshooting 39 | 40 | -------------------------------------------------------------------------------- /source/installation/troubleshooting.rst: -------------------------------------------------------------------------------- 1 | ############### 2 | 故障排除 3 | ############### 4 | 5 | 如果無論如何對不同URL發出請求,你的網頁都在預設頁面讀取了話,有可能你的 Server 不支援 PATH_INFO 變數,它主要是為了增加搜尋引擎友好的 URLs。 6 | 第一步,打開 *application/config/config.php* 檔案然後尋找 URI Protocol 資訊。 7 | 它會建議你修改幾個設定。 如果修改了這些設定還是無法解決,你需要強制 CodeIgniter 去增加『?』到你的 URLs。打開你的 *application/config/config.php* 檔案以及修改它們:: 8 | 9 | $config['index_page'] = "index.php"; 10 | 11 | 改成:: 12 | 13 | $config['index_page'] = "index.php?"; 14 | 15 | -------------------------------------------------------------------------------- /source/installation/upgrade_120.rst: -------------------------------------------------------------------------------- 1 | #################################### 2 | Upgrading From Beta 1.0 to Final 1.2 3 | #################################### 4 | 5 | To upgrade to Version 1.2 please replace the following directories with 6 | the new versions: 7 | 8 | .. note:: If you have any custom developed files in these folders please 9 | make copies of them first. 10 | 11 | - drivers 12 | - helpers 13 | - init 14 | - language 15 | - libraries 16 | - plugins 17 | - scaffolding 18 | 19 | Please also replace your local copy of the user guide with the new 20 | version. 21 | -------------------------------------------------------------------------------- /source/installation/upgrade_130.rst: -------------------------------------------------------------------------------- 1 | ######################### 2 | Upgrading from 1.2 to 1.3 3 | ######################### 4 | 5 | .. note:: The instructions on this page assume you are running version 6 | 1.2. If you have not upgraded to that version please do so first. 7 | 8 | Before performing an update you should take your site offline by 9 | replacing the index.php file with a static one. 10 | 11 | Step 1: Update your CodeIgniter files 12 | ===================================== 13 | 14 | Replace the following directories in your "system" folder with the new 15 | versions: 16 | 17 | .. note:: If you have any custom developed files in these folders please 18 | make copies of them first. 19 | 20 | - application/**models**/ (new for 1.3) 21 | - codeigniter (new for 1.3) 22 | - drivers 23 | - helpers 24 | - init 25 | - language 26 | - libraries 27 | - plugins 28 | - scaffolding 29 | 30 | Step 2: Update your error files 31 | =============================== 32 | 33 | Version 1.3 contains two new error templates located in 34 | application/errors, and for naming consistency the other error templates 35 | have been renamed. 36 | 37 | If you **have not** customized any of the error templates simply replace 38 | this folder: 39 | 40 | - application/errors/ 41 | 42 | If you **have** customized your error templates, rename them as follows: 43 | 44 | - 404.php = error_404.php 45 | - error.php = error_general.php 46 | - error_db.php (new) 47 | - error_php.php (new) 48 | 49 | Step 3: Update your index.php file 50 | ================================== 51 | 52 | Please open your main index.php file (located at your root). At the very 53 | bottom of the file, change this:: 54 | 55 | require_once BASEPATH.'libraries/Front_controller'.EXT; 56 | 57 | To this:: 58 | 59 | require_once BASEPATH.'codeigniter/CodeIgniter'.EXT; 60 | 61 | Step 4: Update your config.php file 62 | =================================== 63 | 64 | Open your application/config/config.php file and add these new items:: 65 | 66 | 67 | /* 68 | |------------------------------------------------ 69 | | URL suffix 70 | |------------------------------------------------ 71 | | 72 | | This option allows you to add a suffix to all URLs. 73 | | For example, if a URL is this: 74 | | 75 | | example.com/index.php/products/view/shoes 76 | | 77 | | You can optionally add a suffix, like ".html", 78 | | making the page appear to be of a certain type: 79 | | 80 | | example.com/index.php/products/view/shoes.html 81 | | 82 | */ 83 | $config['url_suffix'] = ""; 84 | 85 | 86 | /* 87 | |------------------------------------------------ 88 | | Enable Query Strings 89 | |------------------------------------------------ 90 | | 91 | | By default CodeIgniter uses search-engine and 92 | | human-friendly segment based URLs: 93 | | 94 | | example.com/who/what/where/ 95 | | 96 | | You can optionally enable standard query string 97 | | based URLs: 98 | | 99 | | example.com?who=me&what=something&where=here 100 | | 101 | | Options are: TRUE or FALSE (boolean) 102 | | 103 | | The two other items let you set the query string "words" 104 | | that will invoke your controllers and functions: 105 | | example.com/index.php?c=controller&m=function 106 | | 107 | */ 108 | $config['enable_query_strings'] = FALSE; 109 | $config['controller_trigger'] = 'c'; 110 | $config['function_trigger'] = 'm'; 111 | 112 | Step 5: Update your database.php file 113 | ===================================== 114 | 115 | Open your application/config/database.php file and add these new items:: 116 | 117 | 118 | $db['default']['dbprefix'] = ""; 119 | $db['default']['active_r'] = TRUE; 120 | 121 | Step 6: Update your user guide 122 | ============================== 123 | 124 | Please also replace your local copy of the user guide with the new 125 | version. 126 | -------------------------------------------------------------------------------- /source/installation/upgrade_131.rst: -------------------------------------------------------------------------------- 1 | ########################### 2 | Upgrading from 1.3 to 1.3.1 3 | ########################### 4 | 5 | .. note:: The instructions on this page assume you are running version 6 | 1.3. If you have not upgraded to that version please do so first. 7 | 8 | Before performing an update you should take your site offline by 9 | replacing the index.php file with a static one. 10 | 11 | Step 1: Update your CodeIgniter files 12 | ===================================== 13 | 14 | Replace the following directories in your "system" folder with the new 15 | versions: 16 | 17 | .. note:: If you have any custom developed files in these folders please 18 | make copies of them first. 19 | 20 | - drivers 21 | - init/init_unit_test.php (new for 1.3.1) 22 | - language/ 23 | - libraries 24 | - scaffolding 25 | 26 | Step 2: Update your user guide 27 | ============================== 28 | 29 | Please also replace your local copy of the user guide with the new 30 | version. 31 | -------------------------------------------------------------------------------- /source/installation/upgrade_132.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | Upgrading from 1.3.1 to 1.3.2 3 | ############################# 4 | 5 | .. note:: The instructions on this page assume you are running version 6 | 1.3.1. If you have not upgraded to that version please do so first. 7 | 8 | Before performing an update you should take your site offline by 9 | replacing the index.php file with a static one. 10 | 11 | Step 1: Update your CodeIgniter files 12 | ===================================== 13 | 14 | Replace the following directories in your "system" folder with the new 15 | versions: 16 | 17 | .. note:: If you have any custom developed files in these folders please 18 | make copies of them first. 19 | 20 | - drivers 21 | - init 22 | - libraries 23 | 24 | Step 2: Update your user guide 25 | ============================== 26 | 27 | Please also replace your local copy of the user guide with the new 28 | version. 29 | -------------------------------------------------------------------------------- /source/installation/upgrade_133.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | Upgrading from 1.3.2 to 1.3.3 3 | ############################# 4 | 5 | .. note:: The instructions on this page assume you are running version 6 | 1.3.2. If you have not upgraded to that version please do so first. 7 | 8 | Before performing an update you should take your site offline by 9 | replacing the index.php file with a static one. 10 | 11 | Step 1: Update your CodeIgniter files 12 | ===================================== 13 | 14 | Replace the following directories in your "system" folder with the new 15 | versions: 16 | 17 | .. note:: If you have any custom developed files in these folders please 18 | make copies of them first. 19 | 20 | - codeigniter 21 | - drivers 22 | - helpers 23 | - init 24 | - libraries 25 | 26 | Step 2: Update your Models 27 | ========================== 28 | 29 | If you are **NOT** using CodeIgniter's 30 | :doc:`Models <../general/models>` feature disregard this step. 31 | 32 | As of version 1.3.3, CodeIgniter does **not** connect automatically to 33 | your database when a model is loaded. This allows you greater 34 | flexibility in determining which databases you would like used with your 35 | models. If your application is not connecting to your database prior to 36 | a model being loaded you will have to update your code. There are 37 | several options for connecting, :doc:`as described 38 | here <../general/models>`. 39 | 40 | Step 3: Update your user guide 41 | ============================== 42 | 43 | Please also replace your local copy of the user guide with the new 44 | version. 45 | -------------------------------------------------------------------------------- /source/installation/upgrade_140.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | Upgrading from 1.3.3 to 1.4.0 3 | ############################# 4 | 5 | .. note:: The instructions on this page assume you are running version 6 | 1.3.3. If you have not upgraded to that version please do so first. 7 | 8 | Before performing an update you should take your site offline by 9 | replacing the index.php file with a static one. 10 | 11 | Step 1: Update your CodeIgniter files 12 | ===================================== 13 | 14 | Replace the following directories in your "system" folder with the new 15 | versions: 16 | 17 | .. note:: If you have any custom developed files in these folders please 18 | make copies of them first. 19 | 20 | - application/config/**hooks.php** 21 | - application/config/**mimes.php** 22 | - codeigniter 23 | - drivers 24 | - helpers 25 | - init 26 | - language 27 | - libraries 28 | - scaffolding 29 | 30 | Step 2: Update your config.php file 31 | =================================== 32 | 33 | Open your application/config/config.php file and add these new items:: 34 | 35 | 36 | 37 | /* 38 | |-------------------------------------------------------------------------- 39 | | Enable/Disable System Hooks 40 | |-------------------------------------------------------------------------- 41 | | 42 | | If you would like to use the "hooks" feature you must enable it by 43 | | setting this variable to TRUE (boolean). See the user guide for details. 44 | | 45 | */ 46 | $config['enable_hooks'] = FALSE; 47 | 48 | 49 | /* 50 | |-------------------------------------------------------------------------- 51 | | Allowed URL Characters 52 | |-------------------------------------------------------------------------- 53 | | 54 | | This lets you specify which characters are permitted within your URLs. 55 | | When someone tries to submit a URL with disallowed characters they will 56 | | get a warning message. 57 | | 58 | | As a security measure you are STRONGLY encouraged to restrict URLs to 59 | | as few characters as possible. By default only these are allowed: a-z 0-9~%.:_- 60 | | 61 | | Leave blank to allow all characters -- but only if you are insane. 62 | | 63 | | DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!! 64 | | 65 | */ 66 | $config['permitted_uri_chars'] = 'a-z 0-9~%.:_-'; 67 | 68 | Step 3: Update your user guide 69 | ============================== 70 | 71 | Please also replace your local copy of the user guide with the new 72 | version. 73 | -------------------------------------------------------------------------------- /source/installation/upgrade_141.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | Upgrading from 1.4.0 to 1.4.1 3 | ############################# 4 | 5 | .. note:: The instructions on this page assume you are running version 6 | 1.4.0. If you have not upgraded to that version please do so first. 7 | 8 | Before performing an update you should take your site offline by 9 | replacing the index.php file with a static one. 10 | 11 | Step 1: Update your CodeIgniter files 12 | ===================================== 13 | 14 | Replace the following directories in your "system" folder with the new 15 | versions: 16 | 17 | .. note:: If you have any custom developed files in these folders please 18 | make copies of them first. 19 | 20 | - codeigniter 21 | - drivers 22 | - helpers 23 | - libraries 24 | 25 | Step 2: Update your config.php file 26 | =================================== 27 | 28 | Open your application/config/config.php file and add this new item:: 29 | 30 | 31 | 32 | /* 33 | |-------------------------------------------------------------------------- 34 | | Output Compression 35 | |-------------------------------------------------------------------------- 36 | | 37 | | Enables Gzip output compression for faster page loads. When enabled, 38 | | the output class will test whether your server supports Gzip. 39 | | Even if it does, however, not all browsers support compression 40 | | so enable only if you are reasonably sure your visitors can handle it. 41 | | 42 | | VERY IMPORTANT: If you are getting a blank page when compression is enabled it 43 | | means you are prematurely outputting something to your browser. It could 44 | | even be a line of whitespace at the end of one of your scripts. For 45 | | compression to work, nothing can be sent before the output buffer is called 46 | | by the output class. Do not "echo" any values with compression enabled. 47 | | 48 | */ 49 | $config['compress_output'] = FALSE; 50 | 51 | Step 3: Rename an Autoload Item 52 | =============================== 53 | 54 | Open the following file: application/config/autoload.php 55 | 56 | Find this array item:: 57 | 58 | $autoload['core'] = array(); 59 | 60 | And rename it to this:: 61 | 62 | $autoload['libraries'] = array(); 63 | 64 | This change was made to improve clarity since some users were not sure 65 | that their own libraries could be auto-loaded. 66 | 67 | Step 4: Update your user guide 68 | ============================== 69 | 70 | Please also replace your local copy of the user guide with the new 71 | version. 72 | -------------------------------------------------------------------------------- /source/installation/upgrade_150.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | Upgrading from 1.4.1 to 1.5.0 3 | ############################# 4 | 5 | .. note:: The instructions on this page assume you are running version 6 | 1.4.1. If you have not upgraded to that version please do so first. 7 | 8 | Before performing an update you should take your site offline by 9 | replacing the index.php file with a static one. 10 | 11 | Step 1: Update your CodeIgniter files 12 | ===================================== 13 | 14 | Replace these files and directories in your "system" folder with the new 15 | versions: 16 | 17 | - application/config/user_agents.php (new file for 1.5) 18 | - application/config/smileys.php (new file for 1.5) 19 | - codeigniter/ 20 | - database/ (new folder for 1.5. Replaces the "drivers" folder) 21 | - helpers/ 22 | - language/ 23 | - libraries/ 24 | - scaffolding/ 25 | 26 | .. note:: If you have any custom developed files in these folders please 27 | make copies of them first. 28 | 29 | Step 2: Update your database.php file 30 | ===================================== 31 | 32 | Open your application/config/database.php file and add these new items:: 33 | 34 | 35 | $db['default']['cache_on'] = FALSE; 36 | $db['default']['cachedir'] = ''; 37 | 38 | Step 3: Update your config.php file 39 | =================================== 40 | 41 | Open your application/config/config.php file and ADD these new items:: 42 | 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Class Extension Prefix 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This item allows you to set the filename/classname prefix when extending 50 | | native libraries. For more information please see the user guide: 51 | | 52 | | https://codeigniter.com/user_guide/general/core_classes.html 53 | | https://codeigniter.com/user_guide/general/creating_libraries.html 54 | | 55 | */ 56 | $config['subclass_prefix'] = 'MY_'; 57 | 58 | /* 59 | |-------------------------------------------------------------------------- 60 | | Rewrite PHP Short Tags 61 | |-------------------------------------------------------------------------- 62 | | 63 | | If your PHP installation does not have short tag support enabled CI 64 | | can rewrite the tags on-the-fly, enabling you to utilize that syntax 65 | | in your view files. Options are TRUE or FALSE (boolean) 66 | | 67 | */ 68 | $config['rewrite_short_tags'] = FALSE; 69 | 70 | In that same file REMOVE this item:: 71 | 72 | 73 | /* 74 | |-------------------------------------------------------------------------- 75 | | Enable/Disable Error Logging 76 | |-------------------------------------------------------------------------- 77 | | 78 | | If you would like errors or debug messages logged set this variable to 79 | | TRUE (boolean). Note: You must set the file permissions on the "logs" folder 80 | | such that it is writable. 81 | | 82 | */ 83 | $config['log_errors'] = FALSE; 84 | 85 | Error logging is now disabled simply by setting the threshold to zero. 86 | 87 | Step 4: Update your main index.php file 88 | ======================================= 89 | 90 | If you are running a stock index.php file simply replace your version 91 | with the new one. 92 | 93 | If your index.php file has internal modifications, please add your 94 | modifications to the new file and use it. 95 | 96 | Step 5: Update your user guide 97 | ============================== 98 | 99 | Please also replace your local copy of the user guide with the new 100 | version. 101 | -------------------------------------------------------------------------------- /source/installation/upgrade_152.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | Upgrading from 1.5.0 to 1.5.2 3 | ############################# 4 | 5 | .. note:: The instructions on this page assume you are running version 6 | 1.5.0 or 1.5.1. If you have not upgraded to that version please do so 7 | first. 8 | 9 | Before performing an update you should take your site offline by 10 | replacing the index.php file with a static one. 11 | 12 | Step 1: Update your CodeIgniter files 13 | ===================================== 14 | 15 | Replace these files and directories in your "system" folder with the new 16 | versions: 17 | 18 | - system/helpers/download_helper.php 19 | - system/helpers/form_helper.php 20 | - system/libraries/Table.php 21 | - system/libraries/User_agent.php 22 | - system/libraries/Exceptions.php 23 | - system/libraries/Input.php 24 | - system/libraries/Router.php 25 | - system/libraries/Loader.php 26 | - system/libraries/Image_lib.php 27 | - system/language/english/unit_test_lang.php 28 | - system/database/DB_active_rec.php 29 | - system/database/drivers/mysqli/mysqli_driver.php 30 | - codeigniter/ 31 | 32 | .. note:: If you have any custom developed files in these folders please 33 | make copies of them first. 34 | 35 | Step 2: Update your user guide 36 | ============================== 37 | 38 | Please also replace your local copy of the user guide with the new 39 | version. 40 | -------------------------------------------------------------------------------- /source/installation/upgrade_153.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | Upgrading from 1.5.2 to 1.5.3 3 | ############################# 4 | 5 | Before performing an update you should take your site offline by 6 | replacing the index.php file with a static one. 7 | 8 | Step 1: Update your CodeIgniter files 9 | ===================================== 10 | 11 | Replace these files and directories in your "system" folder with the new 12 | versions: 13 | 14 | - system/database/drivers 15 | - system/helpers 16 | - system/libraries/Input.php 17 | - system/libraries/Loader.php 18 | - system/libraries/Profiler.php 19 | - system/libraries/Table.php 20 | 21 | .. note:: If you have any custom developed files in these folders please 22 | make copies of them first. 23 | 24 | Step 2: Update your user guide 25 | ============================== 26 | 27 | Please also replace your local copy of the user guide with the new 28 | version. 29 | -------------------------------------------------------------------------------- /source/installation/upgrade_154.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | Upgrading from 1.5.3 to 1.5.4 3 | ############################# 4 | 5 | Before performing an update you should take your site offline by 6 | replacing the index.php file with a static one. 7 | 8 | Step 1: Update your CodeIgniter files 9 | ===================================== 10 | 11 | Replace these files and directories in your "system" folder with the new 12 | versions: 13 | 14 | - application/config/mimes.php 15 | - system/codeigniter 16 | - system/database 17 | - system/helpers 18 | - system/libraries 19 | - system/plugins 20 | 21 | .. note:: If you have any custom developed files in these folders please 22 | make copies of them first. 23 | 24 | Step 2: Add charset to your config.php 25 | ====================================== 26 | 27 | Add the following to application/config/config.php 28 | 29 | :: 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Default Character Set 34 | |-------------------------------------------------------------------------- 35 | | 36 | | This determines which character set is used by default in various methods 37 | | that require a character set to be provided. 38 | | 39 | */ 40 | $config['charset'] = "UTF-8"; 41 | 42 | Step 3: Autoloading language files 43 | ================================== 44 | 45 | If you want to autoload any language files, add this line to 46 | application/config/autoload.php 47 | 48 | :: 49 | 50 | $autoload['language'] = array(); 51 | 52 | Step 4: Update your user guide 53 | ============================== 54 | 55 | Please also replace your local copy of the user guide with the new 56 | version. 57 | -------------------------------------------------------------------------------- /source/installation/upgrade_160.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | Upgrading from 1.5.4 to 1.6.0 3 | ############################# 4 | 5 | Before performing an update you should take your site offline by 6 | replacing the index.php file with a static one. 7 | 8 | Step 1: Update your CodeIgniter files 9 | ===================================== 10 | 11 | Replace these files and directories in your "system" folder with the new 12 | versions: 13 | 14 | - system/codeigniter 15 | - system/database 16 | - system/helpers 17 | - system/libraries 18 | - system/plugins 19 | - system/language 20 | 21 | .. note:: If you have any custom developed files in these folders please 22 | make copies of them first. 23 | 24 | Step 2: Add time_to_update to your config.php 25 | =============================================== 26 | 27 | Add the following to application/config/config.php with the other 28 | session configuration options 29 | 30 | :: 31 | 32 | $config['sess_time_to_update'] = 300; 33 | 34 | 35 | Step 3: Add $autoload['model'] 36 | ============================== 37 | 38 | Add the following to application/config/autoload.php 39 | 40 | :: 41 | 42 | /* 43 | | ------------------------------------------------------------------- 44 | | Auto-load Model files 45 | | ------------------------------------------------------------------- 46 | | Prototype: 47 | | 48 | | $autoload['model'] = array('my_model'); 49 | | 50 | */ 51 | 52 | $autoload['model'] = array(); 53 | 54 | 55 | Step 4: Add to your database.php 56 | ================================ 57 | 58 | Make the following changes to your application/config/database.php file: 59 | 60 | Add the following variable above the database configuration options, 61 | with $active_group 62 | 63 | :: 64 | 65 | $active_record = TRUE; 66 | 67 | 68 | Remove the following from your database configuration options 69 | 70 | :: 71 | 72 | $db['default']['active_r'] = TRUE; 73 | 74 | 75 | Add the following to your database configuration options 76 | 77 | :: 78 | 79 | $db['default']['char_set'] = "utf8"; 80 | $db['default']['dbcollat'] = "utf8_general_ci"; 81 | 82 | 83 | Step 5: Update your user guide 84 | ============================== 85 | 86 | Please also replace your local copy of the user guide with the new 87 | version. 88 | -------------------------------------------------------------------------------- /source/installation/upgrade_161.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | Upgrading from 1.6.0 to 1.6.1 3 | ############################# 4 | 5 | Before performing an update you should take your site offline by 6 | replacing the index.php file with a static one. 7 | 8 | Step 1: Update your CodeIgniter files 9 | ===================================== 10 | 11 | Replace these files and directories in your "system" folder with the new 12 | versions: 13 | 14 | - system/codeigniter 15 | - system/database 16 | - system/helpers 17 | - system/language 18 | - system/libraries 19 | 20 | .. note:: If you have any custom developed files in these folders please 21 | make copies of them first. 22 | 23 | Step 2: Update your user guide 24 | ============================== 25 | 26 | Please also replace your local copy of the user guide with the new 27 | version. 28 | -------------------------------------------------------------------------------- /source/installation/upgrade_162.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | Upgrading from 1.6.1 to 1.6.2 3 | ############################# 4 | 5 | Before performing an update you should take your site offline by 6 | replacing the index.php file with a static one. 7 | 8 | Step 1: Update your CodeIgniter files 9 | ===================================== 10 | 11 | Replace these files and directories in your "system" folder with the new 12 | versions: 13 | 14 | - system/codeigniter 15 | - system/database 16 | - system/helpers 17 | - system/language 18 | - system/libraries 19 | 20 | .. note:: If you have any custom developed files in these folders please 21 | make copies of them first. 22 | 23 | Step 2: Encryption Key 24 | ====================== 25 | 26 | If you are using sessions, open up application/config/config.php and 27 | verify you've set an encryption key. 28 | 29 | Step 3: Constants File 30 | ====================== 31 | 32 | Copy /application/config/constants.php to your installation, and modify 33 | if necessary. 34 | 35 | Step 4: Mimes File 36 | ================== 37 | 38 | Replace /application/config/mimes.php with the dowloaded version. If 39 | you've added custom mime types, you'll need to re-add them. 40 | 41 | Step 5: Update your user guide 42 | ============================== 43 | 44 | Please also replace your local copy of the user guide with the new 45 | version. 46 | -------------------------------------------------------------------------------- /source/installation/upgrade_163.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | Upgrading from 1.6.2 to 1.6.3 3 | ############################# 4 | 5 | Before performing an update you should take your site offline by 6 | replacing the index.php file with a static one. 7 | 8 | Step 1: Update your CodeIgniter files 9 | ===================================== 10 | 11 | Replace these files and directories in your "system" folder with the new 12 | versions: 13 | 14 | - system/codeigniter 15 | - system/database 16 | - system/helpers 17 | - system/language 18 | - system/libraries 19 | 20 | .. note:: If you have any custom developed files in these folders please 21 | make copies of them first. 22 | 23 | Step 2: Update your user guide 24 | ============================== 25 | 26 | Please also replace your local copy of the user guide with the new 27 | version. 28 | -------------------------------------------------------------------------------- /source/installation/upgrade_170.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | Upgrading from 1.6.3 to 1.7.0 3 | ############################# 4 | 5 | Before performing an update you should take your site offline by 6 | replacing the index.php file with a static one. 7 | 8 | Step 1: Update your CodeIgniter files 9 | ===================================== 10 | 11 | Replace these files and directories in your "system" folder with the new 12 | versions: 13 | 14 | - system/codeigniter 15 | - system/database 16 | - system/helpers 17 | - system/language 18 | - system/libraries 19 | 20 | .. note:: If you have any custom developed files in these folders please 21 | make copies of them first. 22 | 23 | Step 2: Update your Session Table 24 | ================================= 25 | 26 | If you are using the Session class in your application, AND if you are 27 | storing session data to a database, you must add a new column named 28 | user_data to your session table. Here is an example of what this column 29 | might look like for MySQL:: 30 | 31 | user_data text NOT NULL 32 | 33 | To add this column you will run a query similar to this:: 34 | 35 | ALTER TABLE `ci_sessions` ADD `user_data` text NOT NULL 36 | 37 | You'll find more information regarding the new Session functionality in 38 | the :doc:`Session class <../libraries/sessions>` page. 39 | 40 | Step 3: Update your Validation Syntax 41 | ===================================== 42 | 43 | This is an **optional**, but recommended step, for people currently 44 | using the Validation class. CI 1.7 introduces a new :doc:`Form Validation 45 | class <../libraries/form_validation>`, which deprecates the old 46 | Validation library. We have left the old one in place so that existing 47 | applications that use it will not break, but you are encouraged to 48 | migrate to the new version as soon as possible. Please read the user 49 | guide carefully as the new library works a little differently, and has 50 | several new features. 51 | 52 | Step 4: Update your user guide 53 | ============================== 54 | 55 | Please replace your local copy of the user guide with the new version, 56 | including the image files. 57 | -------------------------------------------------------------------------------- /source/installation/upgrade_171.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | Upgrading from 1.7.0 to 1.7.1 3 | ############################# 4 | 5 | Before performing an update you should take your site offline by 6 | replacing the index.php file with a static one. 7 | 8 | Step 1: Update your CodeIgniter files 9 | ===================================== 10 | 11 | Replace these files and directories in your "system" folder with the new 12 | versions: 13 | 14 | - system/codeigniter 15 | - system/database 16 | - system/helpers 17 | - system/language 18 | - system/libraries 19 | 20 | .. note:: If you have any custom developed files in these folders please 21 | make copies of them first. 22 | 23 | Step 2: Update your user guide 24 | ============================== 25 | 26 | Please replace your local copy of the user guide with the new version, 27 | including the image files. 28 | -------------------------------------------------------------------------------- /source/installation/upgrade_172.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | Upgrading from 1.7.1 to 1.7.2 3 | ############################# 4 | 5 | Before performing an update you should take your site offline by 6 | replacing the index.php file with a static one. 7 | 8 | Step 1: Update your CodeIgniter files 9 | ===================================== 10 | 11 | Replace these files and directories in your "system" folder with the new 12 | versions: 13 | 14 | - system/codeigniter 15 | - system/database 16 | - system/helpers 17 | - system/language 18 | - system/libraries 19 | - index.php 20 | 21 | .. note:: If you have any custom developed files in these folders please 22 | make copies of them first. 23 | 24 | Step 2: Remove header() from 404 error template 25 | =============================================== 26 | 27 | If you are using header() in your 404 error template, such as the case 28 | with the default error_404.php template shown below, remove that line 29 | of code. 30 | 31 | :: 32 | 33 | 34 | 35 | 404 status headers are now properly handled in the show_404() method 36 | itself. 37 | 38 | Step 3: Confirm your system_path 39 | ================================= 40 | 41 | In your updated index.php file, confirm that the $system_path variable 42 | is set to your application's system folder. 43 | 44 | Step 4: Update your user guide 45 | ============================== 46 | 47 | Please replace your local copy of the user guide with the new version, 48 | including the image files. 49 | -------------------------------------------------------------------------------- /source/installation/upgrade_201.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | Upgrading from 2.0.0 to 2.0.1 3 | ############################# 4 | 5 | Before performing an update you should take your site offline by 6 | replacing the index.php file with a static one. 7 | 8 | Step 1: Update your CodeIgniter files 9 | ===================================== 10 | 11 | Replace all files and directories in your "system" folder and replace 12 | your index.php file. If any modifications were made to your index.php 13 | they will need to be made fresh in this new one. 14 | 15 | .. note:: If you have any custom developed files in these folders please 16 | make copies of them first. 17 | 18 | Step 2: Replace config/mimes.php 19 | ================================ 20 | 21 | This config file has been updated to contain more mime types, please 22 | copy it to application/config/mimes.php. 23 | 24 | Step 3: Check for forms posting to default controller 25 | ===================================================== 26 | 27 | The default behavior for form_open() when called with no parameters 28 | used to be to post to the default controller, but it will now just leave 29 | an empty action="" meaning the form will submit to the current URL. If 30 | submitting to the default controller was the expected behavior it will 31 | need to be changed from:: 32 | 33 | echo form_open(); //