summaryrefslogtreecommitdiffstats
path: root/user_guide/tutorial/hard_coded_pages.html
diff options
context:
space:
mode:
authorJoël Cox <joel@joelcox.nl>2011-08-27 20:21:19 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-10-27 00:44:14 +0200
commit7bd6335c77cfc5fec9e7e788d45d110c1b09ffd1 (patch)
treec4bbf6c2f08df78fb0b1be5ad8f9aa58f1915b7e /user_guide/tutorial/hard_coded_pages.html
parent5cbced2f3899726241b7a3a83e47a92fb01dbf83 (diff)
Renamed introduction to index and small code style fixes (patch by @ericbarnes).
Diffstat (limited to 'user_guide/tutorial/hard_coded_pages.html')
-rw-r--r--user_guide/tutorial/hard_coded_pages.html7
1 files changed, 3 insertions, 4 deletions
diff --git a/user_guide/tutorial/hard_coded_pages.html b/user_guide/tutorial/hard_coded_pages.html
index e83f1ec80..408634a78 100644
--- a/user_guide/tutorial/hard_coded_pages.html
+++ b/user_guide/tutorial/hard_coded_pages.html
@@ -68,7 +68,7 @@ Features
&lt;?php
class Pages extends CI_Controller {
- function view($page = 'home')
+ public function view($page = 'home')
{
}
@@ -104,7 +104,7 @@ class Pages extends CI_Controller {
<p>In order to load these pages we'll have to check whether these page actually exists. When the page does exist, we load the view for that pages, including the header and footer and display it to the user. If it doesn't, we show a "404 Page not found" error.</p>
<textarea class="textarea" style="width:100%" cols="50" rows="16">
-function view($page = 'home')
+public function view($page = 'home')
{
if ( ! file_exists('application/views/pages/' . $page . EXT))
@@ -115,9 +115,8 @@ function view($page = 'home')
$data['title'] = ucfirst($page);
$this->load->view('templates/header', $data);
- $this->load->view('pages/' . $page);
+ $this->load->view('pages/'.$page);
$this->load->view('templates/footer');
-
}
</textarea>