In this chapter we will see several useful CI functions and helpers. Each of them is a good example of how a few lines of CI code give you seamless access to a range of applications and actions. It would take a lot of specialized knowledge to code them from scratch. In many cases, CI provides an interface to write the code for classes that are already out there—you could download them from PEAR or some other source. CI gives you a standard interface—you just treat it as native CI code, and the framework does all the interfacing work for you.
Let's look at the following activities in this chapter:
The
file
helper: This makes it easy to write to and read from filesThe
download
helper: This makes it easy for your users to download files directly from the website, rather than displaying them as HTMLThe file uploading class: This works the other way—allowing users to put files on your site, with built-in security precautions to limit what they can...