We can modify the browser behavior via HTTP headers (redirect, force a download, etc.). Let's see how CodeIgniter's wrappers work so we can force a download on our application.
- [Instructor] There are different ways…to modify our browser behavior.…Whether it's a page redirect,…which is accomplished through headers,…or forcing a download,…CodeIgniter allows us to manipulate…what we wish the browser to do.…Let's see a few examples.…So let's load our files, with File, Open,…Desktop, ExerciseFiles, chapter two, 02_06_start.…And let's start our web server.…With cd Desktop/ExerciseFiles/Ch02/02_06_start…and let's start our web server…with our environment variables.…
Let's open up the web server, refresh,…and everything works fine.…Let's start by loading an XML into the browser.…So let's create a new method on our controller.…Controllers, properties, and let's create a new method…called KML export, public function kml_export.…And, let's load a view,…with this, load view…and inside our view…it's properties/kml_export.…
Now let's view it on the browser.…So it's called kml_export…and as we can see it doesn't look like an XML file.…But, if we look at the page source,…we can see that indeed it is an XML file.…
- Loading views and data from containers
- Routing with controllers
- Creating models
- Configuring the data
- Working with data, forms, sessions, and headers
- Logging and error logging
- Extending CodeIgniter to consume dependencies
Skill Level Beginner
PHP: Managing Persistent Sessionswith David Powers2h 41m Intermediate
PHP: Clean URLs on Apache Serverwith David Powers1h 36m Intermediate
1. Get Started with CodeIgniter
2. Work with Data, Logs, Forms, and Headers
3. Take CodeIgniter Further
CodeIgniter and Composer3m 13s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.