summaryrefslogtreecommitdiffstats
path: root/user_guide/libraries/file_uploading.html
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide/libraries/file_uploading.html')
-rw-r--r--user_guide/libraries/file_uploading.html18
1 files changed, 9 insertions, 9 deletions
diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html
index 31041341f..254b2666a 100644
--- a/user_guide/libraries/file_uploading.html
+++ b/user_guide/libraries/file_uploading.html
@@ -145,15 +145,15 @@ folder:</p>
<textarea class="textarea" style="width:100%" cols="50" rows="43">&lt;?php
class Upload extends Controller {
-
+
function Upload()
{
parent::Controller();
$this->load->helper(array('form', 'url'));
}
-
+
function index()
- {
+ {
$this->load->view('upload_form', array('error' => ' ' ));
}
@@ -164,22 +164,22 @@ class Upload extends Controller {
$config['max_size'] = '100';
$config['max_width'] = '1024';
$config['max_height'] = '768';
-
+
$this->load->library('upload', $config);
-
+
if ( ! $this->upload->do_upload())
{
$error = array('error' => $this->upload->display_errors());
-
+
$this->load->view('upload_form', $error);
- }
+ }
else
{
$data = array('upload_data' => $this->upload->data());
-
+
$this->load->view('upload_success', $data);
}
- }
+ }
}
?&gt;</textarea>