官术网_书友最值得收藏!

Chapter 1. Getting Started

This chapter covers the basics of the CI development framework and its usage by reviewing some fundamental web application examples. We will start with a basic hello world example and move to an interactive contact-form integration with a database. We will construct the CI applications by following a step-by-step method. Throughout this chapter, we need to remember that the CI development framework is an MVC-based development architecture (for more information, refer to the Wikipedia definition at http://en.wikipedia.org/wiki/Model-view-controller).

This chapter will primarily focus on the following topics:

  • The CI project directory tree framework
  • Configurations (routing and autoloading are covered in this chapter, while the other issues are covered in Chapter 2, Configurations and Naming Conventions)
  • Example 1: hello world
  • Example 2: passing parameters to a view
  • Example 3: the database query by a model rendering results to a view
  • Example 4: interactive contact forms

By reviewing these examples, we will get the basics of using CI resources. We will begin by briefly reviewing the CI resources used. Then we will review a web application code that loads a static view page. Next we will use the model to retrieve data from a database and show it in a view. Finally, we'll add a view with a contact form to enter input and save it by calling a controller method into the database.

主站蜘蛛池模板: 克拉玛依市| 庆元县| 沧州市| 黄冈市| 禹城市| 通榆县| 周至县| 新津县| 九龙坡区| 成武县| 黄大仙区| 乡城县| 徐闻县| 南陵县| 渭源县| 安远县| 英吉沙县| 米脂县| 钟山县| 万年县| 贵德县| 临江市| 三明市| 荥阳市| 柘荣县| 子长县| 招远市| 南阳市| 增城市| 玉树县| 察隅县| 克拉玛依市| 荆门市| 兴义市| 老河口市| 金塔县| 从江县| 博白县| 阳谷县| 额尔古纳市| 西乌珠穆沁旗|